Duplicate Rules must be in sequential order

Make sure you don't skip duplicate rules

Support avatar
Written by Support
Updated over a week ago

Name of the deployment preview error

Duplicate rules must be in sequential order

Sample error message

Duplicate rule instances for Contact/Lead must be in sequential order.

Please set or update the order of the instances while making sure it starts from 1 and always increases by 1 (gaps are not allowed).

When will I see this deployment preview error?

This error occurs when you have multiple duplicate rules, and you select only one of them for deployment, causing the sort order to be invalid.

For example, consider the following rules

If you select to deploy rules 2 and 3, you will get this error because Salesforce requires the sort order to start from 1.

The same would occur if you selected rules 1 and 3.

How does this affect my deployment?

The selected duplicate rule will be skipped and will not be deployed.

How can I fix this error?

You have 2 options:

1) Include all duplicate rules so that the sort order is maintained

2) You can edit the sort order of the selected rules to make sure it starts from 1 and that there are no gaps.

You can do this by clicking the Edit icon on the element.

And then edit the sortOrder property

Click "Update Plan" when done.

The rule will be deployed with the new order.

You can learn more about deployment preview errors here.

Did this answer your question?