Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Design a Data Processing Engine Definition

Learning Objectives

After completing this unit, you’ll be able to:

  • Define the requirements of the DPE definition.
  • Design the flow of nodes for the DPE definition.

Evaluating Cloud Kicks’s Partner Liability

While the Cloud Kicks Inner Circle loyalty program steadily grows its member base, Mary looks for opportunities to improve member engagement. One such opportunity is a strategic partnership with Ursa Major Solar, a supplier of solar components and systems. Their products are popular with the young and environmentally conscious customer base of Cloud Kicks. Ursa Major Solar has been a partner in the program for a while, and Mary periodically evaluates the financial viability of the partnership.

When a member buys a partner product, the loyalty program gives them points, and the partner receives the revenue. Because the points have monetary value, the partner accrues what’s called a liability. The program bills the partner for this liability, and in turn, the partner pays the program.

The reverse happens when a member redeems points. The liability for the redemption accrues to the program, and it has to pay the partner the monetary value of the points.

To understand the liability that accrues to Ursa Major Solar, Mary wants to review the cost incurred at the end of every week. This will help her reevaluate the partnership when the time comes.

She discusses this requirement with Linda. Linda suggests setting up a DPE definition that runs weekly to calculate the liability.

Let’s follow along to understand Linda’s thought process behind setting up the DPE definition.

Outline the Definition

Before designing the definition, Linda analyzes the fundamental requirement. At the end of every week, Ursa Major’s total liability must be calculated. This amount needs to be captured in the Loyalty Program Partner record.

Linda breaks this down to understand what data she needs. To make things easier, she also creates a visual representation of the definition.

The first thing Linda requires is transaction details such as the dates, the amounts, and the nature of the transactions. She gets this data from the transaction journal object. She also requires the program name associated with these transactions. So the transaction journal and loyalty program objects become the data sources. She then joins these two data sources to consolidate transaction details for the Cloud Kicks Inner Circle program.

A flowchart representing the Data Sources and Join nodes used in the definition and how they’re connected.

The liability has to be calculated at the end of the week, which means the definition must process transactions a week at a time. So Linda further filters the data based on the program name and activity date to get transactions that fall within a particular week.

A flowchart representing the Filter node used in the definition and how it’s connected to the rest of the nodes.

The transaction journals only have details related to the amounts. To calculate liability, Linda also requires details of the points associated with those amounts. This data is available in the Loyalty Ledger object. The ledger entries help her understand the event type, the number of points credited or debited, and which transaction journal they’re associated with. So to the journal information, Linda adds the ledger details. With these additions, she gets details of all points.

A flowchart representing additional Data Sources and Join nodes used in the definition and how they’re connected.

Linda then sums up all the accrual and redemption transactions. To do this, she first groups the transactions based on the journal types (accrual and redemption) and then sums up the points.

A flowchart representing the Groups and Aggregates node used in the definition connected to the other nodes.

The data sources added so far provide Linda with information related to the points, but not the cost associated with those points. In a loyalty program, there’s an accrual cost per unit and a redemption cost per unit associated with the program partner. Linda gets these details from the Loyalty Program Partner object.

A flowchart representing an additional Data Sources node used in the definition.

She then filters the accruals and redemptions, and adds the aggregated information to the partner information. This results in all accrual and redemption details for the partner, Ursa Major Solar.

A flowchart representing additional Filter and Join nodes used in the definition and how they’re connected.

Linda then creates the formula for liability calculation and updates this amount to a custom field in the partner object.

A flowchart representing all the nodes used in the definition and how they’re connected.

Linda reviews the definition she has designed. She believes she has identified the data sources and nodes required to calculate partner liability at the end of each week. She can now create this definition in the builder. Follow along as Linda creates this definition in the Data Processing Engine Definition Modeling Trailhead module.

In Conclusion

All businesses run on data. This data is powerful as it helps businesses understand insights and trends. But managing such large volumes of data can be time-consuming and expensive. DPE is a cost-effective and time-efficient way to transform data required for business intelligence. With DPE, businesses can transform, customize, and analyze their data.

Resources

API Documentation: Data Processing Engine Metadata API

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"