How to retrieve contact ID in SFDC after object upsert | XM Community
Skip to main content

Hi all,
I running a survey with an anonymous link that is implemented on a website.
Respondents need to fill in their ID, phone number, email etc.
I've created the following response mapping workflow:

  • newly created response trigger upsert object

  • I'm searching if this contact exists in SFDC by phone number. If he exists I update some fields. If he does not exist I'm creating new contact and update fields.

  • Then I want to retrieve the contact ID from the previous step. I know it is possible to use the WebService task to retrieve information from SFDC.

Basically, I want to retrieve the contact ID that was found/created in the previous step.
Does anyone familiar with the specific API request I need to call to get this info?
Should I make a request from the SFDC server or I can get this information from the response mapping output?
Thanks!
Hadar

Hi hadard,
Unfortunately, the Salesforce Response Mapping Task won't provide you with the newly created Contact Id as it's a one-way interaction with SFDC. Depending on what you're actually seeking to do with the resulting SFDC Contact ID, you could consider leveraging a Salesforce Workflow Rule within Qualtrics. In this way, you could have Salesforce actually trigger an outbound message to Qualtrics with the details of the newly created SFDC Contact ID.
Cheers,
Cameron


Hi CamM,
Thanks for your reply! Eventually, I need to retrieve the Contact ID so I could map the survey response on another object. So the flow goes as follows:
1) Newly created response
2) Search if the contact exists in SFDC (Upsert on Contact object) based on his phone number.
3) Map his response in SFDC (Insert on the Custom object) based on the Contact ID that was found/created in step 2.
I'm not sure I'll be able to link the respondent's Contact ID value with his response using the Salesforce workflow rule because as far as I know, there is no automatic way to update collected responses with embedded data values retrospectively.
Looking forward to hearing your thoughts.
Thanks,
Hadar


Hi hadard,
Thanks for the extra info. Sounds like you don’t need the ContactId in Qualtrics so much as you simply need a way to link the response (custom object record) to the Contact. Rather than trying to make that connection from the Qualtrics end, have you considered pushing the phone number (i.e. your unique identifier) into a hidden field in the custom object record? You could then leverage a Salesforce Flow to link the records directly in Salesforce.
Cheers,
Cameron


Hi CamM,
Sounds good. I will definitely try it!
Thanks,
Hadar


Leave a Reply