Automation of emails based on third party API requests | XM Community
Skip to main content

I want to create a workflow where an external server sends a request to change a property of a survey participant response. Based on this we want to trigger the sending of an email with a personalized gift code.

 

If I understand correctly I could use the API key to send a POST request to update a field. The payload would look something like: {‘responseId’ : ‘xxxxxxxxxxx’, ‘activated’: True} 
I have two questions:
1. How to make this request from a party that is not trusted with sensitive user data. One way would be for the third party server to have write only access, but I have not figured out how to do that.
2. (Even more basically) How to correctly update a record with incoming information and trigger the sending of a personalized email based on an external POST request.

 

Thank you so much

Assuming the response id of the respondents are already shared with third party. We can use JSON Event to capture the third party data and then email task to send the emails.


Hi @mcurmei To updating participant responses and triggering personalized email based on an external POST request, please try with below steps:

Updating a Record and Sending Personalized Email:

  • To update a participant response, you can use the Qualtrics API, specifically the UpdateResponse endpoint. This endpoint allows you to update a specific response's properties, including custom fields.
  • The payload you mentioned, { 'responseId': 'xxxxxxxxxxx', 'activated': True }, can be used as the request body for the UpdateResponse API call. Ensure you replace 'xxxxxxxxxxx' with the actual response ID.
  • Once you've updated the necessary response properties, you can trigger the sending of a personalized email using Qualtrics' built-in email trigger functionality.
  • In your Qualtrics survey, set up an email trigger that is configured to send an email when a specific condition is met. The condition could be a specific value or state of a response property (e.g., the 'activated' field you mentioned in the payload).
  • Customize the email content, including the personalized gift code, using Qualtrics' email editor and merge fields to dynamically insert participant-specific information into the email.

Thank you! I have a couple of follow up questions.
1. Does UpdateResponse call happen within a workflow - for instance a code block. I was trying to use  JSON event to trigger the workflow but that had a different API end-point
2. Otherwise if the sending of the POST request happens outside of the workflow then what exactly can be used to trigger the email? Is it just a workflow that runs at some time intervals. Also finally how to ensure that each participant receives a gift code only once?


Leave a Reply