Using Custom Rollups in Align
Align operational users can create custom rollup metrics for reporting purposes and for display on the Territory Information Panel, enabling displaying any relevant custom rollup metrics.
For example, the Align admin wants to display the total prescription (TRx) sales for Cholecap among Segment A targets. The Align admin creates a Custom Rollup of Cholecap TRx data in the proper territory for Segment A targets and places the field representing the metric on the page layout. Cholecap TRx data now displays in the proper record, so the information is quickly referenced.
Who can use this feature?
- Align Operational Users - Browser
- Creating Custom Rollups
- Calculating Custom Rollups
- Users require an Align License
Configuring Custom Rollups for
To configure this feature, ensure the following features are configured:
Creating Custom Rollups as
To create custom rollups, users must first create an appropriate target field on either the aln_territory__v or aln_geography__v objects:
- Navigate to Admin > Configuration > Objects.
- Select either the aln_territory__v or aln_geography__v objects.
- Navigate to the Fields tab.
- Select Create.
- Select Number as the type.
-
Populate the following fields:
- Field Name
- Field Label
- Minimum Value
- Maximum Value
- Decimal Places
- Select Create.
Once the target field is created, users must next define the custom rollup rule:
- Navigate to Align Admin > Custom Rollup Rules.
- Select Create.
-
Populate the following fields:
- Name – Enter the appropriate name
- Rollup Operator – The following values are available:
- Sum Distinct – Sum of unique values. Values from duplicate records are ignored.
-
Count Distinct – Count of unique records. Duplicate records are ignored.
If Count Distinct is selected as the operator, the source_field__v field automatically defaults to id.
- Mean
- Source Object – The following objects are supported:
- mc_cycle_plan__v
- product_metrics__v
- account__v
- Source Field – Select the appropriate Number-type field on the selected object
- Target Object – Select the object you created the custom field for
- Target Field – Select the created custom field
- Navigate to the Criteria section.
- Add the appropriate criteria for selecting which records are considered when calculating the rollup.
- Select Save.
After the custom rollup rule is defined, users must then add the target field to the appropriate Align Settings records:
- Navigate to Align Admin > Align Settings (Production).
- Edit the appropriate record.
-
Add the newly created field to the Territory Metrics Fields setting. Use the following format:
object_api_name__v.custom_field__c
- Select Save.
Example: Total Sales Potential of a Territory
For example, the Align administrator wants to create a new rollup metric that represents the total sales potential of a territory. To do this:
- Create a new Number type field on the aln_territory__v object named Total Sales Potential.
- Create a new Number type field on the account__v object named Sales Potential.
- Create a new Rollup Rule.
-
Populate the following fields in the Details section:
- Name – Total Sales Potential
- Operator – Sum Distinct
- Source Object – Account
- Source Field – Sales Potential
- Target Object – Territory
- Target Field – Total Sales Potential
-
Populate the following criteria:
- Criterion 1
- Field = Is Person Account
- Operator = equals
- Value = Yes
- Criterion 2
- Field = Specialty
- Operator = in
- Value:
- Cardiology
- Pediatrics
- Neurology
- Oncology
- Populate the Account Logic field with (1 AND 2).
Calculating Custom Rollups as
A Custom Rollup metric can be activated and deactivated by selecting the gear icon on the appropriate Custom Rollup Rules detail page.
Metrics recalculate automatically after the following events:
- Pulling from Vault CRM
- Data Loading
- Assignment Preview
The last_run_datetime__v field automatically stamps when the metric was last recalculated.

