Example: Calculate Net Fund Flow Rollups for Flexible Hierarchy Summary Records
An asset management firm aggregates externally imported net fund flows across a Salesforce hierarchy. Use a custom Data Processing Engine definition to automatically calculate and roll up values from individual fund nodes to parent desks and divisions.
Required Editions
Available in: Lightning Experience Available in: Unlimited and Agentforce Editions |
An asset management firm tracks net fund flows—subscriptions minus redemptions—in a fund administration system and wants those values to roll up across its Salesforce hierarchy. The firm's hierarchy looks like this:
Investment Division
├── Equities Desk
│ ├── Large Cap Fund
│ └── Small Cap Fund
└── Fixed Income Desk
├── Government Bond Fund
└── Corporate Bond Fund
The fund administration system tracks each fund's net flow but doesn't store the Salesforce hierarchy. Only the individual funds (the leaf nodes) have flows; the desks and the division roll up values from their child nodes.
The firm imports one record per node into the Flexible Hierarchy Node Summary object, with Total Value set to 0. The records are shown in hierarchy order, starting from the root node.
| Node | Net Fund Flow (Node Value) |
|---|---|
| Large Cap Fund | $1.2B |
| Small Cap Fund | $700M |
| Government Bond Fund | $500M |
| Corporate Bond Fund | $400M |
Roll Up the Imported Values
To roll up these values, the firm completes the following steps:
- To import net fund flows into the flexible hierarchy node summary (FlexHierNodeSummary) object, complete these fields for each record: Node ID, Node Measure Type, Node Measure Unit, Node Value, and Total Value. Ensure each record references its flexible hierarchy node.
- Build and activate a custom Data Processing Engine definition.
- Run the definition.
- Open the hierarchy in the Graph view or Grid view in the hierarchy builder. Select a node to see its rolled-up values.
Rolled-Up Values on Each Node
After the Data Processing Engine definition runs, the following table shows the rolled-up node value, child aggregate value, and total value for each hierarchy level.
| Hierarchy Level | Flexible Hierarchy Node | Node Value | Child Aggregate Value | Total Value |
|---|---|---|---|---|
| 1 | Investment Division | 0 | $2.8B | $2.8B |
| 2 | Equities Desk | 0 | $1.9B | $1.9B |
| 3 | Large Cap Fund | $1.2B | 0 | $1.2B |
| 3 | Small Cap Fund | $700M | 0 | $700M |
| 2 | Fixed Income Desk | 0 | $900M | $900M |
| 3 | Government Bond Fund | $500M | 0 | $500M |
| 3 | Corporate Bond Fund | $400M | 0 | $400M |
The Equities Desk rolls up its two funds ($1.2B + $700M = $1.9B), and the Fixed Income Desk rolls up its two funds ($500M + $400M = $900M). The Investment Division rolls up the Equities and Fixed Income desks ($1.9B + $900M = $2.8B).
