This example shows how you can use the Account Hierarchy Member Aggregate using Member template to aggregate values for all accounts within a hierarchy. If you have multiple accounts within a hierarchy added as members to a single rebate program, you can offer payouts only to the parent account.
Required Editions
| Available in: Enterprise, Unlimited, and Developer Editions that have Rebate Management enabled. |
Account Hierarchy
Acme is a large account with a global presence whose franchises are grouped by territory. The admin defines the account hierarchy by adding the accounts to different levels of the hierarchy.
| Account Name | Hierarchy Level | Parent Account Name |
|---|---|---|
| Acme Global | 1 | Not applicable |
| Acme APAC Group | 2 | Acme Global |
| Acme AMER Group | 2 | Acme Global |
| Acme Franchise 1 | 3 | Acme APAC Group |
| Acme Franchise 2 | 3 | Acme AMER Group |
| Acme Franchise 3 | 3 | Acme AMER Group |
Transaction Journal Records
Here are sample Transaction Journal records for January 2021.
| Member | Transaction Quantity | Transaction Amount |
|---|---|---|
| Acme Franchise 1 | 40 | $3500 |
| Acme Franchise 2 | 50 | $2000 |
| Acme Franchise 3 | 70 | $6000 |
| Acme Franchise 1 | 20 | $4000 |
| Acme Franchise 2 | 40 | $5500 |
Rebate Program Rules
The program manager creates an annual rebate program and generates 12 monthly payout periods. The Acme accounts are enrolled as members to the program. The program manager selects Skip Payout Calculation for the Rebate Program Member records except Acme Global. Transactions for the sub accounts contribute toward the payout calculation and the final payout is rewarded to Acme Global.
The program has a revenue-based rebate type. The benefit tiers are:
- Tier 1: Offers a 7% rebate on the total transaction amount when the total transaction amount is less than $20,000.
- Tier 2: Offers a 10% rebate on the total transaction amount when the total transaction amount exceeds $20,001.
Data Processing Engine
An organization’s account hierarchy setup is used to determine the parent account and sub accounts. Transactions are recorded at the sub account level in the currency of the transaction. Payouts for accounts are calculated by rolling up transactions for sub accounts.
The total values for each account are updated in the Rebate Member Product Aggregate object. For each member, one aggregate record is created for each rebate type.
Aggregate Data
These sample records are created in the Rebate Member Product Aggregate object for January.
| Program Member | Rollup Program Member | Total Quantity | Total Transaction Amount | Rebate Type | Payout Period |
|---|---|---|---|---|---|
| Acme Global | Not applicable | 250 | $21,000 | Revenue-Based | Jan FY21 |
| Acme APAC Group | Acme Global | 60 | $7,500 | Revenue-Based | Jan FY21 |
| Acme AMER Group | Acme Global | 160 | $13,500 | Revenue-Based | Jan FY21 |
| Acme Franchise 1 | Acme APAC Group | 60 | $7,500 | Revenue-Based | Jan FY21 |
| Acme Franchise 2 | Acme AMER Group | 90 | $7,500 | Revenue-Based | Jan FY21 |
| Acme Franchise 3 | Acme AMER Group | 70 | $6,000 | Revenue-Based | Jan FY21 |
These values update whenever the scheduled flow runs. The flow triggers the data processing engine definition. The aggregate values on the payout calculation date for Jan FY21 are used to update the final payout amounts in the Member Payout object. Only the aggregate values for Acme Global are considered on the payout calculation date because payouts are skipped for the sub accounts.
Final Payouts
Acme Global receives a payout based on Tier 2 benefit because the total transaction amount exceeds $20,000. The rebate is $1,470 (7% of $21,00).