---
schema_version: "1"
id: 3bbe0015c25ae0a634d9c6ecb360724f5ac4ed71f9c73a6794146c41aa96b7e4
title: "Calculated Insight: Vehicle Revenue From Repair Orders"
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_repairs.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.auto_cicalculated_insight_vehicle_revenue_from_repairs.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e955df21fe08fd3697959b7cf66acf5c265efc960b2cbdde9cc3d07081d951d7
description: The Vehicle Revenue From Repair Orders calculated insight aggregates the lifetime revenue generated from services, repairs, and maintenance activities for a specific vehicle. The vehicle revenue from repair orders considers the services done by both the original equipment manufacturer and the dealerships.
products:
  - Automotive
release: "264"
---
# Calculated Insight: Vehicle Revenue From Repair Orders

The Vehicle Revenue From Repair Orders calculated insight aggregates the lifetime revenue generated from services, repairs, and maintenance activities for a specific vehicle. The vehicle revenue from repair orders considers the services done by both 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__WorkOrder__dlm.ssot__TotalPriceAmount__c) AS RepairAmount__c, ssot__Vehicle__dlm.ssot__VehicleIdentificationNumber__c AS VIN__c` | Applies the SUM aggregation function to the Total Price Amount field in the Work Order object and assigns it an alias `RepairAmount__c`. Extracts the Vehicle Identification Number field from the Vehicle object and assigns it an alias `VIN__c`. |
| `FROM ssot__WorkOrder__dlm JOIN ssot__WorkOrderItem__dlm ON ssot__WorkOrder__dlm.ssot__Id__c = ssot__WorkOrderItem__dlm.ssot__WorkOrderId__c` | Joins the data in the Work Order and Work Order Item objects by matching the Work Order ID field on the Work Order Item object to the ID field on the Work Order object. |
| JOIN ssot\_\_Asset\_\_dlm ON (ssot\_\_WorkOrder\_\_dlm.ssot\_\_AssetId\_\_c = ssot\_\_Asset\_\_dlm.ssot\_\_Id\_\_c) | Joins the data in the Asset and Work Order objects by matching the ID field on the Asset object to the Asset ID field on the Work Order object. |
| JOIN ssot\_\_Vehicle\_\_dlm ON (ssot\_\_Asset\_\_dlm.ssot\_\_VehicleId\_\_c = ssot\_\_Vehicle\_\_dlm.ssot\_\_Id\_\_c) | Joins the data in the Asset and Vehicle objects by matching the Vehicle ID field on the Asset object to the ID field on the Vehicle object. |
| `GROUP BY VIN__c` | Groups the results by `VIN__c`, aggregating the revenue from repair orders for each unique vehicle. |