Populating Salesforce Lookup Field from Response Mapping | XM Community

Populating Salesforce Lookup Field from Response Mapping

  • 20 January 2022
  • 2 replies
  • 73 views

Greetings,
I have two workflows set up in a survey: one to upsert Contacts and one to insert a related object record. While I can get the related object created in Salesforce, I cannot link it to the corresponding Contact as I don't have the Contact ID available.
Is there any way to have the Contact ID returned after the upsert workflow is fired? I must have these objects linked correctly but am not sure how to do so.
I tried using the external ID that we use for other integrations in the response mapping and with the Process Builder in Salesforce to update the Contact lookup field on the related object but neither options work.
Any suggestions are welcome. Thank you!


2 replies

Userlevel 1
Badge +4

Edit to add : Are you able to use the Contact External ID in an upsert (vs insert) of the related object record?

Disclaimer : I have not tested this end to end with a Qualtrics survey and workflow. But I did put together a Record Triggered Flow that may address this scenario and very limited testing was successful.
This flow utilizes an External ID (unique) field on the Contact and a matching External ID (unique) field on the related object to link the two objects. The flow is fired when a new related object is created and
1 - Contact ID (that is the lookup field) is null
2 - External ID field on related object is also null
The flow has two steps:
1 - Get the Contact record with matching External ID
2 - Update the related object with the ID of the Contact retrieved in the first step

Userlevel 5
Badge +20

Hi megan_bouret, not sure whether you got a solution for this in the end, but I agree with Chet's approach. I have used Salesforce Flows to facilitate a very similar use case and it works quite well.

Leave a Reply