Update Survey Response via Action | XM Community
Question

Update Survey Response via Action

  • 16 April 2021
  • 1 reply
  • 35 views

Userlevel 2
Badge +6

I am trying to update survey responses which meet some specific condition. Therefore, I created a new action which is triggered when a new response was made. For this action I then defined the condition. In the next step, I would like to call the response API in order to update the response. The documentation describes that the response ID as well as the survey ID is required for the update call. The response ID can be received from piped text:
image.pngHowever, the survey ID does not seem to be available. Does anyone know how I could fetch that one?
Furthermore, I wondered if I can update all fields I want to or if there are any restrictions. I saw that some metadata stuff can not be updated. What I want to update are several embedded data fields as well as contact fields (external data reference, first name, last name) from the XM directory. Embedded data can be updated for sure. But does someone know if I can also update the contact fields like the external data reference?
I cleared (" ") the external data reference (our XM directory key) in the Data & Analysis UI. However, when checking the contacts transaction, I have still insight on the response. Is it possible to hide the response from the contact's transactional data (no reference between contact and survey response)?
Thanks for the expertise.


1 reply

Userlevel 3
Badge +8

The action is tied to the survey, so just fix input the survey ID.
You should be able to update the embedded data. I don't have XM directory, but in my use case, I have updated embedded data fields. I did have a difficult time figuring what data format is required doing this. I'm not a coder so I had to play around until it worked. Numbers for example do not go in quotes apparently.

Leave a Reply