---
schema_version: "1"
id: a2d9fde3f1715c143a0c5b60ef5de32bdaae023b58cb5ae598f16b0aab85e61d
title: "Calculated Insight: Vehicle Revenue From Parts 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_parts_sales.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.auto_cicalculated_insight_vehicle_revenue_from_parts_sales.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 81627ed484d6254aff5fad6c1a4b3890ea94afbe26abf9ed81b98780a368a0b9
description: The Vehicle Revenue From Parts Sales calculated insight aggregates the lifetime revenue generated from the sale of parts and accessories for a specific vehicle. The vehicle revenue from parts sales considers the spare parts and accessories sold by the original equipment manufacturer and the dealerships.
products:
  - Automotive
release: "264"
---
# Calculated Insight: Vehicle Revenue From Parts Sales

The Vehicle Revenue From Parts Sales calculated insight aggregates the lifetime revenue generated from the sale of parts and accessories for a specific vehicle. The vehicle revenue from parts sales considers the spare parts and accessories sold by the original equipment manufacturer and the dealerships.

### 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.

 
| Expression | Description |
| --- | --- |
| `SELECT SUM(ssot__LoyaltyTransactionJournal__dlm.ssot__TransactionAmount__c) AS PartsAmt__c` | Applies the SUM aggregation function to the Transaction Amount field in the Loyalty Transaction Journal object and assigns it an alias `PartsAmt__c`. |
| `ssot__Vehicle__dlm.ssot__VehicleIdentificationNumber__c AS VIN__c` | Extracts the Vehicle Identification Number field from the Vehicle object and assigns it an alias `VIN__c`. |
| `FROM ssot__LoyaltyTransactionJournal__dlm JOIN ssot__Vehicle__dlm ON (ssot__LoyaltyTransactionJournal__dlm.ssot__ExternalRecordId__c` | Joins the data in the Loyalty Transaction Journal and Vehicle objects by matching the External Record ID field on the Loyalty Transaction Journal to the ID field on the Vehicle object. |
| `GROUP BY VIN__c` | Groups the results by `VIN__c`, aggregating the parts sales for each unique vehicle. |