---
schema_version: "1"
id: e0320d64ff6fa0505dd42ce1e0d335027f1ce738aa4cea8895c9daef6de5414c
title: "Calculated Insight: Vehicle Revenue From Dealer Sales"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/auto_cicalculated_insight_vehicle_revenue_from_dealer_sales.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.auto_cicalculated_insight_vehicle_revenue_from_dealer_sales.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1153728c7f14037c58223cbe623df055faf6f845ad6cd1c1a08472572002f9cd
description: The Vehicle Revenue From Dealer Sales calculated insight aggregates the lifetime revenue generated for a specific vehicle by all dealerships. The vehicle revenue from dealer sales considers the approved claim amount for all dealers who sold and resold a specific vehicle.
products:
  - Automotive
release: "264"
---
# Calculated Insight: Vehicle Revenue From Dealer Sales

The Vehicle Revenue From Dealer Sales calculated insight aggregates the lifetime revenue generated for a specific vehicle by all dealerships. The vehicle revenue from dealer sales considers the approved claim amount for all dealers who sold and resold a specific vehicle.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

Here’s a breakdown of the logic.

 
|   |   |
| --- | --- |
| SELECT SUM(ssot\_\_SalesOrderProduct\_\_dlm.ssot\_\_TotalPriceAmount\_\_c) AS DirectAmount\_\_c, ssot\_\_Vehicle\_\_dlm.ssot\_\_VehicleIdentificationNumber\_\_c AS VIN\_\_c | Applies the SUM aggregation function to the Total Price Amount field on the Sales Order Product object and assigns it an alias `DirectAmount_c`. Extracts the Vehicle Identification Number field from the Vehicle object and assigns it an alias `VIN__c`. |
| FROM ssot\_\_SalesOrder\_\_dlm JOIN ssot\_\_SalesOrderProduct\_\_dlm ON (ssot\_\_SalesOrder\_\_dlm.ssot\_\_Id\_\_c = ssot\_\_SalesOrderProduct\_\_dlm.ssot\_\_SalesOrderId\_\_c) | Joins the Sales Order and Sales Order Product objects by matching the ID field on Sales Order to the Sales Order ID field on Sales Order Product. |
| JOIN ssot\_\_Asset\_\_dlm ON (ssot\_\_SalesOrder\_\_dlm.ssot\_\_BillToAccountId\_\_c = ssot\_\_Asset\_\_dlm.ssot\_\_AccountContactId\_\_c AND ssot\_\_SalesOrderProduct\_\_dlm.ssot\_\_ProductId\_\_c = ssot\_\_Asset\_\_dlm.ssot\_\_ProductId\_\_c) | Joins the Sales Order and Asset objects by matching the Bill To Contact ID field on Sales Order to the Account Contact ID field on Asset. Joins the Sales Order and Asset objects by matching the Product ID field on Sales Order to the Product ID field on Asset. |
| JOIN ssot\_\_Vehicle\_\_dlm ON (ssot\_\_Asset\_\_dlm.ssot\_\_VehicleId\_\_c = ssot\_\_Vehicle\_\_dlm.ssot\_\_Id\_\_c) | Joins the Asset and Vehicle objects by matching the Vehicle ID field on Asset to the ID field on Vehicle. |
| GROUP BY VIN\_\_c | Groups the results by `VIN__c`, aggregating the direct sales for each unique vehicle. |