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
Available in: Enterprise, Unlimited, and Developer
Editions
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.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.