I need an advice on a small problem. My database contains many duplicate Contact records, of which I have determined the contact id. I have a log list with pairs of contact id.s

What I would like is merge the records using those contact id pairs. It is not easy to find the pair using the contact ids. I have not found a way yet to use the advance search so that I have a result screen containing the two records base on the ID.

Is it possible to create a URL for each pair that directly leads me to either a search result screen in which I can select and merge them, OR go directly to the merge screen for the two records?

If not, is there a way in which I can provide the people who do the merging with an easy method to process the list with id pairs?

thanks in advance, Ruud

  • do you really mean contact_id ? That means you have 2 contacts with single id (say id=1) ? Mar 24, 2017 at 10:13
  • Yes, I have two contact records (with different contact_id), but describing the same person. I want to merge the two records, so that each person has only one contact record. I have a list of pairs of contact_ids of records that need to be merged. But it is not easy to do a search on contact_id = 1 OR contact_id = 88.
    – ruud
    Mar 24, 2017 at 11:28

2 Answers 2


Another way of accessing Merge is from any Search function (based on Contacts eg Find, Adv Search, Quick Search). Eg click in QuickSearch, hit Enter (gives you all Contacts), select any 2 Individuals, in Actions chose Merge, this gives you a url like this (but without the cool arrows Chris had)


As a further answer, if you have the paired IDs in an external spreadsheet, then use the CONCATENATE function to join together all the bits as a hyperlink, then you should be able to just click through to the merge url for each pair.

  • thank you both for your help. In the first place I tried to compose a link to the search result screen. And I tried to make a search based on the two ID's. That focus made me overlook the URL of the mergescreen. This is an even better solution and matches exactly my needs. Thank you for helping me further!! Awesome.
    – ruud
    Mar 25, 2017 at 13:29

By testing Find & Merge contacts at the https://civicrm.org/demo site, I was able to see that the URL will look like


Where cid is the retained contact ID, and oid is the old (merged and removed) contact ID. You should probably test this on your own site, since I suspect rgid may also be significant (probably a group id).

If you ever want a sandbox to test things out harmlessly, head over to https://civicrm.org/demo - note there are two sections on that page, first some partner-provided, customised CiviCRM installs and below that (blue section) is a set of more stock demo sites you can use as well.

  • chris, is the rgid because you limited your original 'find dupes' to a specific 'group'?
    – petednz - fuzion
    Mar 24, 2017 at 20:17
  • I just clicked whatever on the demo site got me to a merge-contact screen fastest :) That's possible. Mar 25, 2017 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.