Salesforce Merge Accounts URL Hacking

The Merge Accounts page is OK to use, however to start the process you have to search for the Accounts you want to merge, and to do that they have to have the same name. This is not always the case, and it can be annoying to have to rename an account, just so you can find it to merge it.

The official SFDC selection screen also limits you to a max of 3 accounts. This isn't actually a hard limit... More of a guide, as you'll see below.
Instead of this, you can actually hack the URL to include the IDs of any accounts, regardless of Account Name similarity. This is especially useful if you are using your own code to manage merges and would like to "deep link" into the SFDC platform.

Here's an example URL:
https://emea.salesforce.com/merge/accmergewizard.jsp?goNext=+Next+&cid=001200000012345&cid=001200000012346&cid=001200000012347&cid=001200000012348
It can be broken down into 3 main segments:

The Merge Accounts page URL:
https://emea.salesforce.com/merge/accmergewizard.jsp


A Parameter to indicate that SFDC should start merging, and it will expect account IDs to be on the URL:
goNext=+Next+

The last segment is a collection of SFDC Account IDs. All use the parameter name of "cid". In the above example there are 4, however you may include as many as you like (I've successfully merged 75 accounts at once), including more than the default 3 allowed by the web form:

cid=001200000012345
cid=001200000012346
cid=001200000012347
cid=001200000012348


Replace these IDs with the Accounts you would like to merge, and you should be presented with the familiar Merge Account page.

To select what account should be the "Master Record" put add this to the url:

p2=ACCOUNTID


Comments

  1. Is this still valid? or Salesforce shuts it down?

    ReplyDelete
  2. I got a "insufficient privilege" error, what am I doing wrong?

    ReplyDelete
  3. Can you normally merge accounts Marie-Eve? what happens when you try to goto just /merge/accmergewizard.jsp ?

    ReplyDelete
  4. Yes, I can merge account with the SF regular tool (3 at the time) at this url: https://na9.salesforce.com/merge/accmergewizard.jsp?retURL=%2F001%2Fo

    What I have to do to merge more than 3 at the time, when I'm on the search page of Merge My Accounts?

    Thanks!

    ReplyDelete
  5. I just tested merging 4 accounts and it still works. You have to generate the URL / link yourself - you cannot do it from the merge screen. Read through the instructions above.

    ReplyDelete
  6. Oh ok, I guess I have not the knowledge to do it then... Thanks anyway

    ReplyDelete
  7. How can i check Based on Email

    ReplyDelete
  8. This is great trick.
    but Is there any way to decide one account as Master and rest as accounts to be merged with Master ?

    As the above link not able to decide Master account irrespective of the position of the Id within the URL

    ReplyDelete
  9. I've updated the post, but if you add "&p2=" this will select which one is the master record.

    ReplyDelete
  10. Many thanks Fosnez
    This is a very useful tool but I can't figure out how to make "&p2=" work to select the master record !

    Can you please give us more details...

    Keep on posting nice tricks !

    ReplyDelete
  11. Hai Author, Very Good informative blog post,
    Thanks

    ReplyDelete
  12. That was a really informative post.
    Thanks a lot!

    ReplyDelete
  13. Will you please give me example link that how to I use 'p2=ACCOUNTID'

    ReplyDelete
  14. Thanks for this blog. Could you please let us know if the same works in lightning. I'm facing issue with lightning, works perfect in classic.

    ReplyDelete

Post a Comment

Popular posts from this blog

Australian Postcode Boundaries for Google Earth (KMZ)

Don't look up!