Account Rules Engine
Align's Account Rules Engine creates and updates an Account Territory assignment record based on a Territory's assigned rules and rules inherited from its Field Force. The query required to facilitate this is generated dynamically based on Account Rules and Account Rule Criteria.
To limit the number of updates during the execution, the Account Territory assignment record is not updated if a subsequent execution of a Rule produces the same result as the Rule's initial execution.
An assignment record is only created once during a Rule's execution, even though the Account may satisfy the Rule's Criteria multiple times. For instance, the Rule may include the specialties Oncologist and Pediatric Oncologist. An HCP who has both specialties on the Account record results in only one assignment record.
The assignment of an Account to a Territory can exist on multiple Account Territory records. The assignments are distinct by date range or source. As an example, an Account may move in and out of a Territory over the years. This can cause multiple rule-based record with different date ranges. A second example is the existence of a Rule based record and a non-Rule based record sourced from CRM.
Assignments have a Start Date indicating the first day of the assignment's life. The calculated Start Date is always the current date. The engine reviews the intersection of all Start Dates involved in the rule and the rule's execution date to retain the latest date. The Start Dates which may be reviewed are: rule, Territory, Field Force, and Geography Territory.
When a rule is evaluated the Start Date/Time of the involved entities, Rule, and Geography Territory assignments, all begin on or before July 1. The Rule was executed on July 26, 2015, at 9:33 AM. The earliest possible Start Date/Time for the resulting Account Territory assignments will be July 26, 2015, 9:33 AM.
Considering the dates from Example 1, had the Rule been executed on 6/23/2015, the assignment's Start Date would have been 7/1/2015 due to the Rule's future dated Start Date.
Assignments have an End Date indicating the last day of the life of the assignment. The end date is either the minimum end date of the assignment's rule or geography or, if the assignment has become invalid since the last time rules were run, the current date. The engine reviews the intersection of all End Dates involved in the Rule and the Rule's execution date to retain the latest date. The End Dates which may be reviewed are: Rule, Territory, Field Force and Geography Territory.
The assignment's Start Date and End Date is never created or updated to a value earlier than the date the Rule executes. The user is permitted to create a Territory and Rule with a Start Date in the past. However, Account attributes are not date driven. They represent current state of the Account. The execution date is the first time Align is aware of the change. Align knows what the Account looks like when the Rule executes, not in the past.
By default, rules directly linked to a territory can only use Accounts imported from the Veeva CRM org the territory belongs to. Users can extend the account source on a Territory rule to include Accounts that were manually data loaded.
For example, Territory 101 is tied to US Commercial Sales, so the respective territory rule only considers Accounts from that CRM org. The customer is considering adding Account Specialties to the rule to see how many additional HCPs exist. The customer previously data-loaded their customer universe, but not all Accounts in the customer master are in the respective US Commercial Sales CRM org. The customer can consider opening up the rule to have both the US Commercial Sales CRM org and the Data Loader checked for new Accounts to align to the territory. Those accounts will subsequently be loaded Accounts into CRM.
If a Territory's Veeva CRM org value changes, the value is updated automatically in all rules directly linked to the territory.
Align supports multiple simultaneous previews as long as a preview does not overlap with any other preview's territory or with an in-process commit. If a preview contains an overlapping territory, the user is prompted to either cancel the current preview and keep the conflicting preview or keep the current preview and discard the conflicting preview.
When a preview is discarded, the owner receives a System Tray message indicating when and by whom it was discarded.
To create a preview:
- Select Territories from the Entities list.
- Select Preview Account Assignments from the Settings list.
- Select Territory + Subordinates or Territory Only to indicate which preview you want.
- Select Continue. A Status of Completed displays in the My Tasks section when the preview is ready.
Align administrators can now download the results of an Assignment Preview to see exactly which actions are being taken against which accounts.
This feature is enabled by default.
To download the results of an Assignment Preview, select Export Results from the Assignment Preview page. This downloads a .zip file containing all CSV files generated by the preview.
The following files are generated by this process:
Unique Assignment Previews – A list of account territory assignments for each territory and account
If an account is assigned to a territory for multiple reasons, for example, self-assignment and rules-based assignment, the Sources column lists all unique values of the source__aln field on the account_territory__aln object. If the source is account_rule__aln or hierarchy_rule__aln, the Align Rule ID displays instead.
- Exclusions – A list of all of the accounts excluded from the territories in the preview
- Targets – A list of all of the territories, cycle plan interaction goals, and targets included in the preview
Exclusive Assignments – A list of all accounts with conflicting Exclusive Assignments
This file only generates if Exclusive Assignments is configured.
If a relevant assignment change does not exist, the corresponding file does not generate. The Unique Assignment Previews file always generates.
Align now has the ability to separate Account Assignment Rule processing when a Field Force or Territory has a combination of rules with Send To CRM = True and other rules with Send to CRM = False.
An Align setting, Rule_Selection_Criteria__aln, enables this functionality. Two options display in the Rule_Selection_Criteria__aln field on the Align Settings page: No Criteria and By Send to CRM value.
A blank value or “No Criteria” continues to process both types of rules. Selecting the By Send to CRM value enables a new section in the Preview Account Assignment pop-up, giving Align users the choice to process all rules or one type of rule.
For example, a Field Force has the following four Account Assignment rules:
- Assign all HCOs for certain Account Types (Send to CRM = True)
- Assign all affiliated HCPs for certain Specialties (Send to CRM = True)
- Assign all HCOs (incentive comp rule with Send to CRM = False)
- Assign all affiliated HCPs all Specialties (incentive comp rule with Send to CRM = False)
If the Align Setting = blank or No Criteria, all four rules process when the Align user executes the Account assignment rules on the Field Force. If the Align Setting = By Send to CRM, the Align user is given the choice to execute all rules together or execute only a subset of the rules (CRM=True or CRM=False, but not both).
The IN criteria operator enables adding more than one criterion value to a single criteria row. This allows for simpler rule clauses on the Rules Engine. The IN operator is supported on the following field types:
- Pick list
- Related record
The IN operator is case sensitive.
Text field values must be manually typed out with each value delimited by a comma.
For example, when selecting records in the specialty__aln custom field, the value Plastic Surgery, Hand must be entered as Plastic Surgery\, Hand.
Admins can use Date Operators to specify that results must be either more than or less than a certain number of days in order for a result to match the query. This enables more versatile rules that match based on a relative timeframe (for example, matching all accounts visited in the last 90 days) rather than based on an exact date that must be manually updated each time the rule is run.
The following Date Operators are available:
- More than X Days – Records match this operator if the specified action has occurred more than the specified number of days from the current day
- Less than X Days – Records match this operator if the specified action has occurred less than the specified number of days from the current day
For example, the admin updates a rule previously aligning all accounts visited since June 1st, 2019 to now align all accounts visited in the last 90 days.
Adding Date Operators to a Query
To add a Date Operator to a query:
- Navigate to the Rules tab.
- Edit the appropriate rule criterion.
- Select the appropriate field.
- Select either More than X Days or Less than X Days from the operator__aln picklist.
- Enter the desired number of days.
- Select Save.