Merging directory contacts and their transactions the best way | XM Community
Skip to main content

I have some very specific requirement in regards to contact merge.
First our setup: Our XM directory contains vehicle relations (combination of customer + vehicle). One customer may have multiple vehicles which means he also has multiple entries in the XM directory. We are using an external reference consisting of the customer ID and the vehicle ID as key. The customer ID and the vehicle ID is also stored separately as embedded data for each contact.
Our requirement: We have some duplicate check in our CRM system. When a duplicate customer is identified, we also need to correct this in Qualtrics. In this case we have an old customer ID (to be archived/deleted) and a main customer ID (keep). We would need to identify all vehicle relations with the old customer ID in the Qualtrics directory. Then we would need to merge/copy the transactions of those contacts to the contact in the directory which has the main customer ID but same vehicle ID. It may also be that there is not yet a contact with the main customer ID since we only create contacts in the directory when the first survey is sent to the vehicle relation. In this case I think we could just replace the old customer ID in the external reference and the embedded data with the main one.
So my question would be how we could achieve the merge of two contacts and their transactions the best way. We would either need to do all actions via API from the CRM system or somehow trigger the process from the CRM system (if that is possible). I was thinking about following approaches:

  1. We could try to copy all transactions of the old contact and paste/create them for the main contact. This would need to be done for all vehicle relations of the customer separately. Afterwards, the old contacts could be deleted. This approach will probably require a lot of API calls, especially if a customer has multiple vehicles and a lot of transactions to be copied.

  2. I was also thinking about the "Consolidate Duplicates" feature from Qualtrics. However, only directory fields can be used. I think this will not really help us.

Do you have any idea how to achieve our requirement? Thankful for any hint!

Any luck with this? I am in a similar situation, and it's unclear which approach to take without losing data.


As we are live with some merge process, I wanted to share this approach. For us it was important that the follow-up processes still work as expected (e.g. CRM ticket creation). As they are mainly based on our CRM-specfic contact IDs, we had to make sure to update the slaves IDs to the master IDs so that all integrations work with the master ID. We did not move all the transactions from the slave to the master contacts. 

We custom implemented below steps: 

  1. Search for all affected Qualtrics contacts based on external reference IDs in order to get the Qualtrics internal ContactID: https://api.qualtrics.com/c79e78a949572-search-directory-contacts
  2. Update all Qualtrics contacts which have been found in 1) with the new master ID for our custom embedded data fields (e.g. external reference and partner ID) that is used for several follow-up processes: https://api.qualtrics.com/e7890729357b1-update-directory-contact
  3. Get all responses of the identified slave contacts found in step 2): https://api.qualtrics.com/f30cf65c90b7a-get-directory-contact-history (for each contact)
  4. Update each response and the corresponding embedded data (e.g. external reference and partner ID): https://api.qualtrics.com/daed82306b1ea-update-response

@Michael_Cooksey @AlonsoC I wanted to mark my comment as solution to “clean up” and close this topic, however, the “Accept” option is not available for some reason. Do you know why this is?


@Michael_Cooksey @AlonsoC I wanted to mark my comment as solution to “clean up” and close this topic, however, the “Accept” option is not available for some reason. Do you know why this is?

Hi @chackbusch ! The reason why the ‘Best Answer’ option wasn’t visible was because you published this post as a ‘Conversation’. I converted it into a ‘Question’ and now the ‘Best Answer’ feature is available for you to mark. 


Leave a Reply