Build a Data Processing Engine Definition
Create a Data Processing Engine Definition
You set up the Donor Gift Summary template definition, scheduled it to run, and created a custom field on the object to store the count of gifts of $1,000 or more.
It’s time to get started on your new Data Processing Engine definition.
- From Setup, in the Quick Find box, enter
data processing
, and then select Data Processing Engine.
- Click New.
- Specify these details:
- Name:
Donor Gift Summary Custom Rollups
- API Name: This field auto-populates with
Donor_Gift_Summary_Custom_Rollups
- Process Type: Standard
- Description:
Generates values for custom Donor Gift Summary fields not included in the DonorGiftSummary template definition
- Name:
- Click Next.
- Select CRM Analytics.
- Click Done.
Take a moment and marvel at the possibilities of an empty canvas—but also think ahead about how you can use it.
Your blank definition has to start with a Data Source node.
While you only create one new rollup calculation in this project, a Data Processing Engine definition can have calculations for many different rollups. You can have a maximum of 50 active Data Processing Engine definitions, so combine similar rollups into as few definitions as possible to help keep below the limit.
Add the Gift Transaction Data Source
As with the template definition you activated earlier, your new definition first gets data from a Salesforce object. To calculate the count of paid donations, set up a Data Source node that retrieves data from the Gift Transaction object.
- In the Data Processing Engine builder, click New Data Source Node.
- Specify these details:
- Node Type: Data Source (the default)
- Name:
Get Gift Transactions
- API Name: This field auto-populates with
Get_Gift_Transactions
- Node Type: Data Source (the default)
- Save the new node.
- In the configuration pane for the new node, specify these details:
- Select Source and Fields: Object
- Source Object: Gift Transaction
- Select Source and Fields: Object
- Click Select Fields.
- Find and select these fields and use the default aliases.
- Current Amount (CurrentAmount)
- Donor (DonorId)
- Paid (IsPaid)
- Current Amount (CurrentAmount)
- Save your work in the Select Fields pane.
- Save your work in the configuration pane.
- Save your work on the definition.
This new node gets the three fields you need from gift transaction records and stores them for use in the rest of the definition.
Filter Your Records
HNMI’s fundraisers only want to count completed gifts of $1,000 or more, so you don’t need data from all the gift transaction records. Instead, filter the data to gifts marked as paid and equal to or greater than $1,000.
To do this, add a Filter node after the Data Source node.
- In the Data Processing Engine builder, click New Node.
- Specify these details:
- Node Type: Filter
- Name:
Filter Big Gifts
- API Name: This field auto-populates with
Filter_Big_Gifts
- Node Type: Filter
- Save your work.
- In the configuration pane for the new node, specify these details:
- Source Node: Get Gift Transactions
- Select Records When: All Conditions Are Met (AND)
- Source Node: Get Gift Transactions
- In the first filter row, specify these details:
- Resource: IsPaid
- Operator: Equals
- Type: Field
- Value:
true
- Resource: IsPaid
- Click + Add Condition.
- In the second filter row, specify these details:
- Resource: CurrentAmount
- Operator: Greater Than or Equal
- Type: Field
- Value:
1000
- Resource: CurrentAmount
- Save your work in the configuration pane.
- Save your work on the definition.
Your dataset is now limited to only the relevant records.
Aggregate Your Records
With this filtered dataset, it’s time to perform the calculation.
You may be inclined to reach for a Formula node, but there’s a better choice for this scenario. The team at HNMI is looking for a count of large gifts by donor, which is best handled by a Group and Aggregate node.
Group and Aggregate nodes have several built-in functions that work across groups of records. Those functions include producing a count of records, minimum and maximum field values, and average field values. Read Groups and Aggregates in Salesforce Help for a full list.
To count the number of paid gift transaction records with a value of $1,000 or more, add a Group and Aggregate node after the filter.
- In the Data Processing Engine builder, click New Node.
- Specify these details
- Node Type: Group and Aggregate
- Name:
Aggregate Transactions
- API Name: This field auto-populates with
Aggregate_Transactions
- Node Type: Group and Aggregate
- Save your work.
- In the configuration pane for the new node, specify these details:
- Source Node: Filter Big Gifts
- Aggregate Function: Count
- Field: DonorId
- Alias:
BigGiftCount
- Source Node: Filter Big Gifts
- Click Group By Fields.
- Find and select DonorId.
- Save your work in the Select Fields pane.
- Save your work in the configuration pane.
- Save your work on the definition.
You now have everything in place to count the $1,000 or more gifts. The three nodes get data, filter that data to relevant records, and then use this filtered data to make a calculation.
In this step, you set up nodes to get, filter, and count the data, which gives you the information you need. Now it’s time to use the information to update donor gift summary records. In the next step, you create the Data Processing Engine nodes to do just that.