This example shows how loyalty program managers create a loyalty program partner with prepaid billing and how admins set up a process to manage partner points.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions with Loyalty Management - Growth or Loyalty Management - Advanced |
A loyalty program manager wants to add a partner with prepaid billing, Ursa Major Solar, to their organization’s loyalty program, Cloud Kicks Inner Circle. The non-qualifying currency for the program is Reward Points. Members can accrue and redeem Reward Points by purchasing products of Ursa Major Solar. The partner’s Reward Points conversion factor for member accruals is 1.0 and for member redemptions is 2.0. After the loyalty program manager creates the required records for the partner, the admin sets up the process to manage partner points. The admin wants to run the definition daily. Perform the following tasks:
- Create an Account for the Partner
- Create a Partner Account for Ursa Major Solar
- Add Points Conversion Factors for Partner
- Copy the Create Partner Ledgers and Update Partner Balances Definition
- Design a Flow to Run the Definition
- Review Definition Results
Create an Account Record for the Partner
Before you create a partner in a loyalty program, ensure that the partner has an account. To create an Account record:
- From the App Launcher, search for and select Accounts.
- Click New.
- Enter Ursa Major Solar as the name of the account.
- Save your changes.
Create a Partner Account for Ursa Major Solar
The loyalty program manager now creates a Loyalty Program Partner record for Ursa Major Solar and associates the record with the Cloud Kicks Inner Circle loyalty program.
- In the Loyalty Management app, go to the Cloud Kicks Inner Circle loyalty program.
- On the Loyalty Program Partner tab, click New.
- Provide the values for these fields:
Field Value Name Ursa Major Solar Program Partner Ursa Major Solar Type Both
Both includes Accrual and Redemption.
Program Partnership Start Date Current date Industry Solar Power
Your admin can add Solar Power as a picklist value for the Industry field of the Loyalty Program Partner in the Object Manager.
Billing Type Prepaid - Save your changes.
The partner’s Loyalty Program Partner record is created. The partner’s points balance, credited points, and purchased points are automatically set to zero.
Add Points Conversion Factors for Partner
Ursa Major Solar credits 1 point every time a member accrues Reward Points. Two points are added to Ursa Major Solar’s credited points for each point that the member redeems.
- In the Loyalty Program Partner Currencies related list of Ursa Major Solar Program Partner record, click New.
- Provide the values for these fields:
Field Value Name Pack 1 Purchased Points 10000 Purchased Date Date when the points pack was purchased. - Save your changes.
Ursa Major Solar’s points balance is updated to 10,000 points.
The loyalty program manager creates the records that are required to process partner transactions. Then, the admin sets up a process to evaluate processed partner transactions and to update the partner’s points.
Copy the Create Partner Ledgers and Update Partner Balances Definition
The admin creates a copy of the Create Partner Ledgers and Update Prepaid Partner Points Data Processing Engine definition template. After reviewing and customizing the definition, the Admin activates the definition. The definition can be run in a flow.
- From Setup, in the Quick Find box, enter Data Processing Engine, and then select Data Processing Engine.
- From the list of jobs, click Create Partner Ledgers and Update Partner Balance | Save As .
- In the Name field, prefix the definition name with Inner Circle.
- Save your changes.
- Activate the new definition.
The template definition runs daily by default. To run the definition at a different frequency, update and then activate the definition. Next, the admin adds this definition to a flow.
Design a Flow to Run the Definition
The admin adds the Cloud Kicks Inner Circle Create Partner Ledgers and Update Partner Balance definition to a flow. The definition runs based on the data the flow provides and at the frequency defined in the flow.
The admin has already set up flows that credit and debit points of members in real time. The admin now creates a flow that filters out transaction journals without a partner associated, and then runs the definition. Also, the definition is set to run daily to update the partner’s points for all the partner transactions that are processed throughout the day. To define the flow:
- From Setup, in the Quick Find box, enter Flows, and then select Flows.
- Click New Flow.
- Select Schedule-Triggered Flow, and then click Create.
- On the Start element, click Set Schedule.
- Provide the values for these fields:
Field Value Start Date Current date Start Time 12.00 AM Frequency Daily - Click Done | Choose Object
- In the Object field, search for and select Transaction Journal.
- Provide values for these fields:
Field Value Condition Requirements All Conditions Are Met (AND) Field PartnerId Operator Is Null Value {!$GlobalConstant.False} - Click Done.
- Click +.
- Select Action.
- In the Category column, select Data Processing Engine.
- Search and select the Inner Circle action.
- To define the element, provide values for these fields:
Field Value Label Update Partner Points API Name Update Partner Points - To set the value for the definition’s input variables, provide values for these fields:
Input Variable Value Loyalty_Program_Name Cloud Kicks Inner Circle Run_Date_And_Time {!$Flow.InterviewStartTime} - Click Done.
- Save your changes, and then activate the flow.
Review Definition Results
To test the definition, the admin creates sample partner transactions: Accrual transactions of US$500 and US$200 and a Redemption transaction of US$75. After running the definition, Ursa Major Solar partner record and the associated pack record are updated with these values:
| Record | Values |
|---|---|
| Ursa Major Solar’s Loyalty Program Partner record |
|
| Ursa Solar Major’s Pack 1 record | Remaining Points: 9250 |