Loading
Feature degradation | Gmail Email delivery failureRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Calculate Total Household Portfolio Value (Managed Package)

          Calculate Total Household Portfolio Value (Managed Package)

          Here’s a step-by-step guide to roll up the financial account balances for each household. This example considers all the accounts that are part of the household and all the financial accounts that belong to each account in the rollup operation.

          Managed Package Icon This is a Financial Services Cloud managed package feature.

          • The Rollup by Lookup (RBL) framework is available and enabled.

            For more information, see Enable the RBL Using Data Processing Engine Framework.

          • Familiarity with data transformation operations such as joins and appends.
          • Familiarity with adding formulas to RBL rules.

          Let's say that a Bank A has a large set of customers modeled as Person Accounts and that these customers have one or more Financial Accounts. Also, these customers form a part of their households, which are Accounts.

          The requirement is to roll up the financial account balances for each household by including:

          • All the accounts that are part of the household
          • All the financial accounts that belong to each account

          To calculate the total household portfolio value, you can create a DPE definition to aggregate the financial accounts of a household using the household__c field and display the sum on the household record."

          The DPE plan to achieve the requirement:

          Note
          Note The field names that you come across in this example may vary in the org that you are trying to execute the DPE definition. For example they maybe appended with a namespace.
          • Create two data sources with the source objects as Accounts and Financial Accounts.
          • Filter the results of the Accounts data source to consider only the RecordType, IndustriesHousehold.
          • Create an aggregate on Financial Accounts.
            • Groupby the household id field.
            • Sum the balance field.
          • Create a left outer join to join the results of steps 2 and 3.
          • Writeback with the results of step 4 to the Accounts data source.
          1. Create a data processing engine definition.
            1. From Setup, in the Quick Find box, enter Data Processing Engine, and then select Data Processing Engine.
            2. Click New.
            3. Enter the name of the definition as Total Household Portfolio Value.
            4. Click Create.
          2. Create a data source (Accounts) and select its objects and fields.
            1. On the Data Processing Engine definition page, click New Data Source.
            2. Enter the name as Account and Recordtype.
            3. Save your changes.
            4. From the Source Object dropdown list, search for and select Account.
            5. Click Select Fields.
            6. Select the fields Id and Balance__c.
              Note
              Note Balance__c is a custom field in the Accounts object to which we will roll up the financial account balance value of each household.
            7. Enter the alias name for Id as AccountId and for Balance__c as AccountBalance.
            8. Click Done.
          3. Select the related objects and fields for the Account and Recordtype data source.
            1. Click Add Related Object.
            2. Select the RecordType object.
            3. Click Select Fields.
            4. Select the DeveloperName and Id fields.
            5. Enter the alias name for Id as RecordTypeId and for DeveloperName as DeveloperName.
            6. Click Done.
            7. Save your changes.
          4. Create a data source (Financial Account) and select its objects and fields.
            1. On the Data Processing Engine definition page, click New Data Source.
            2. Enter the name as Financial Accounts.
            3. Save your work.
            4. From the Source Object list, search for and select Financial Account.
            5. Click Select Fields.
            6. Select the Household__c and Balance__c fields.
            7. Enter the alias name for Household__c as FAHouseholdId and for Balance__c as FABalance.
            8. Click Done.
            9. Save your changes.
          5. Create a new node to filter the Account and Recordtype data source.
            1. On the Data Processing Engine definition page, click New Node.
            2. In the Select Node Type dropdown list, select Filter.
            3. Enter the name as Filter Household Recordtypes.
            4. Click Create.
            5. Configure the filter.
              Configure the filter so that the result of the Filter Household Recordtypes data source is a filtered set of records with RecordType as IndustriesHousehold. Define these filter conditions.
              • Source Node: Account and Recordtype.
              • Select Records When: All Conditions are met (AND).
              • Field: DeveloperName
              • Operator: Equals
              • Type: Field
              • Value: IndustriesHousehold
            6. Click Done.
            7. Save your changes.

            Here’s what the filter conditions look like in the Filter Household Recordtypes data source page.

            Image showing the filter conditions in the data source

          6. Create a node to aggregate the values of the FAbalance fields in the Financial Accounts data source.
            1. On the Data Processing Engine definition page, click New Node.
            2. In the Select Node Type dropdown list, select Group and Aggregate.
            3. Enter the name as Aggregate FA Balances.
            4. Click Create.
            5. From the Source Node list, search for and select Financial Accounts.
            6. Click Select Group Fields.
            7. Select the Household__c field.
            8. Click Add Aggregate and define a new aggregate.
              Under the Aggregate section, configure the aggregate as follows:
              • Alias: Aggregation
              • Function: Sum
              • Aggregate Field: FABalance
            9. Click Done.
            10. Save your changes.

            Here’s what the aggregation definitions look like in the Aggregate FA Balances data source page.

            Image showing the aggregates in the data source

          7. Create a node to join the results of the Filter Household Recordypes node and the Aggregate FA Balances node.
            1. On the Data Processing Engine definition page, click New Node.
            2. In the Select Node Type dropdown list, select Join.
            3. Enter the name as Join FA Aggregates and Household.
            4. Click Create.
            5. Configure the join.
              Define the following as join conditions.
              • Join Type: Left Outer
              • First Node: Filter Household Recordypes
              • Fields (first node): AccountId
              • Second Node: Aggregate FA Balances
              • Fields (second node): Aggregation
            6. Map the join fields.
              Under the Map Fields section, map fields from the first node to fields from the second node.
              • Map the Id field from the filter to the Household__C field from the Financial Accounts data source.

            Here’s what the join conditions look like in the Join FA Aggregates and Household data source page.

            Image showing the join conditions in the data source

          8. Create a node to write back the results to the Accounts data source.
            1. On the Data Processing Engine definition page, click New Node.
            2. In the Select Node Type dropdown list, select Writeback.
            3. Enter the name as Account Writeback.
            4. From the Source Node list, search for and select Join FA Aggregates and Household.
            5. In the Action Type dropdown list, select Upsert.
            6. In the Target Object dropdown list, select Account.
            7. Define the field mappings.
              Under the Field Mapping section, map the Source Node fields to Target fields.
              • Map the AccountId field from the join to the Account ID field in the Accounts data source.
              • Map the AggregateBalance field from the join to the Balance field in the Accounts data source.

            Here’s what the writeback configurations look like in the Account Writeback data source page.

            Image showing the writeback rules in the data source

          9. Save your changes.

          You can now activate and execute the RBL rule to calculate the total household portfolio value. After you activate the rule, you can also invoke them as actions in flows to orchestrate processes.

           
          Loading
          Salesforce Help | Article