QUESTION:
Are the DupeBlocker scenarios run in a particular order?
ANSWER:
No. Scenarios are NOT executed in a particular order.
When a record is inserted/updated ALL scenarios will be triggered that pertain to that object. For example, when a Lead is inserted/updated all Lead, Lead to Contact and Lead to Account scenarios will be triggered to check for duplicates. However, if a record matches on multiple scenarios with different "Match on Insert/Update Actions" the order of operations is as follows:
Auto-Convert (Lead to Contact over Lead to Account)
Auto-Merge
Redirect to Existing / Redirect to VisualForce Page
Do Not Insert / Update
Custom Apex Code / Report Duplicate
MULTIPLE WARNINGS GENERATED:
Since ALL scenarios are triggered, if a record is not auto-merged/converted or blocked, then warnings will be created for each scenario that triggers a potential duplicate (i.e. has a "Match on..." setting of "Report Duplicate") . Therefore, it is possible to have multiple warnings generated after inserting/updating just one record. For example:
- If an Account is inserted and it matches on both a Semi Rigid and Loose scenario, 2 warnings will be generated.
- If a Lead is inserted/updated and matches to an existing Lead, as well as an existing Account and Contact, 3 or more warnings will be generated.
- If a Contact is inserted and it matches to 3 Contact scenarios, 3 warnings will be generated.