The Customer Lifetime Value calculated insight aggregates the lifetime revenue generated
from the sale of vehicles, services, parts, and accessories for a specific customer. The
lifetime value of a customer includes the purchase of vehicles, parts, subscriptions, and
accessories from the original equipment manufacturer and from dealerships. The insight also
considers the order value from repair and maintenance of vehicles and parts.
Required Editions
Available in: Enterprise, Unlimited, and Developer
Editions
Here’s a breakdown of the logic.
Expression
Definition
SELECT ssot__Account__dlm.ssot__Name__c AS
CustomerName__c
Extracts a customer's name from the Account object and assigns the name an alias
CustomerName__c.
Vehicle_Sales_Detail__cio.CustomerId__c AS
CustomerId__c
Extracts the customer's unique ID from the Vehicle Sales Detail calculated insight and
assigns it an alias CustomerId__c.
SUM(Vehicle_Sales_Detail__cio.DealerSalesAmount__c +
Vehicle_Sales_Detail__cio.DirectSalesAmount__c + Vehicle_Sales_Detail__cio.PartsTxnAmount__c
+ Vehicle_Sales_Detail__cio.RepairOrderAmount__c) as TotalAmount__c
Calculates the total revenue generated for each customer from various sales activities
such as dealer sales of vehicles, direct sales of vehicles, parts sales, and repair
orders from the Vehicle Sales Detail calculated insight. The value is assigned an
alias TotalAmount__c.
FROM Vehicle_Sales_Detail__cio
Specifies the Vehicle Sales Detail calculated insight that the total amount is derived
from.
JOIN ssot__Account__dlm ON (Vehicle_Sales_Detail__cio.CustomerId__c =
ssot__Account__dlm.ssot__Id__c )
Joins the data in the Vehicle Sales Detail calculated insight and Account object by
matching the Customer ID field on Vehicle Sales Detail to the ID field on Account.
GROUP BY CustomerName__c, CustomerId__c
Groups the results based on the customer's name and ID, and applies the SUM aggregation
function to calculate the total revenue for each customer.
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.