After you analyze/tag and validate your duplicate Leads/Contacts/Accounts in your CRM, you may run into the timeout error.
Microsoft imposes the 2 minute plug-in timeout to make sure ISV code behaves nicely in a CRM deployment that may be shared with 100s of customers.
When you click the “AutoMerge” button, three things happen:
Take a look at your “SDK Message Processing Steps” to see what other plug-ins are configured.
Open your “Default Solution.”
Click on the “SDK Message Processing Steps” on the left navigation pane.
Sort the resulting list by “Parent Object Type Code.”
Scroll down to the entity you are interested in (e.g. Contact.)
Look at all the “SDK Message Processing Steps” for your entity that have the status of “Update” in the “SDK Message” column.
Here, you will see the “GenbilMerger.*” steps that make AutoMerge work. Look for steps from another Event Handler.
At this point, you can disable whichever step you think may be causing the timeout. Select it from the list and click “Deactivate” at the top. Then, attempt the “AutoMerge” on the same set again to see if it processes faster.
During the merge operation, the CRM platform may be cascading a lot of ownership changes down to child records. If there are 100s or 1000s of those child records, it can certainly timeout.
Activity type records such as email-messages or phone-call records are a common cause. They may accumulate into the thousands for a large customer after years of CRM use.
If your cascading rules are still the default ones that come out of the box, it may be time to review them.