How to send email distribution status information to Salesforce? | XM Community
Skip to main content
Solved

How to send email distribution status information to Salesforce?

  • November 6, 2025
  • 4 replies
  • 26 views

LukasK
Level 1 ●
Forum|alt.badge.img+2

Hi ​all

I am trying to find a way to update case information in Salesforce based on the email distribution status in Qualtrics. E.g. survey sent, survey bounced, survey skipped (due to contact frequency rule), etc.

Currently our process triggers a survey invite from Qualtrics if a complaint case is resolved in Salesforce and in a second step we update a survey response object on Salesforce as soon as a survey response is received within Qualtrics.

The only missing part is to make it transparent on Salesforce if the survey distribution for a resolved case was successfull, bounced, was skipped, etc.

It seems to be possible to parcially update Salesforce based on the “Experience iD change” task in a stand alone workflow. Covering parts of the distribution information, specifically “bounced” and “unsubscribed”.

BUT the mainly needed information like survey sent, survey skipped, etc. seems not to be covered.

Any ideas on how to solve this?

Thanks!

(Similar use case without solution was covered here: Info about "sent surveys" to update contacts in Salesforce | XM Community)

Best answer by jake_dufinetz

 

Hi ​@jake_dufinetz

thanks for your reply. Just had a look at the mentioned thread. I will probably need to review this with a colleague from IT to tell if we can make this approach work for our use case as this is too technical for me ;) 

As far as I can tell this mainly exports overall statistics of a distribution and sends it per email, right? 

In our case we need to retreive the distribution information of a singl transactions in the XM Directory when updated and then update the related case on Salesforce accordingly.

While a task to update Salesforce is available there is no task besides the above mentioned Experience iD change available to capture all relevant information.

In your example would the api call help us to replace the experience iD change task and then still use the separate Salesforce task to send the information to Salesforce?

 

 

Thanks for your support!

 

Hi Lukas,

 

That is correct that the process I outlined in the other thread pulls the distribution information for an entire distribution batch. Because you are sending your distributions to individual contacts, the batch would return the results of just that single contact. So there would be fields returned for Sent, Failed, Started, etc but there would only be results for the single email that was triggered. See an example response from the API endoint below.

 

{"sent":1,"failed":0,"started":0,"bounced":0,"opened":0,"skipped":0,"finished":0,"complaints":0,"blocked":0}

 

Once you receive this response from the API call, you would then need to transform this using a Code Task and have logic to set a variable to match the format of what you are trying to send to Salesforce. For example for the API response above, you would then a code task that reads the response and outputs a variable such as “Distribution Result” = “Sent”. Then you would have your Salesforce response mapping task send that distribution result to Salesforce.

 

Solution to test would look something like this:

 

Workflow Tigger: Salesforce outbound message

Task 1: Update contact in XM Directory

Task 2: Send a survey via email

Task 3: WebService (Get Distribution ID)

Task 4: WebService (Get Distribution Stats)

Task 5: Code Task (Transform distribution stats and output distribution result)

Task 6: Salesforce response mapping (Update record in Salesforce with distribution result)

 

You would not need the XiD Change trigger workflow if you followed this solution.

4 replies

Forum|alt.badge.img+7
  • QPN Level 3 ●●●
  • 77 replies
  • November 6, 2025

Hi Lukas. You could consider using the web-service based solution I designed on a separate thread shown below. This requires using Qualtrics API endpoints to pull the distribution report for a given distribution. This gives a count of emails sent, bounced, etc.

 

report the number contacts uploaded and number of emails sent in a (standalone workflow) | XM Community


LukasK
Level 1 ●
Forum|alt.badge.img+2
  • Author
  • Level 1 ●
  • 5 replies
  • November 7, 2025

Hi Lukas. You could consider using the web-service based solution I designed on a separate thread shown below. This requires using Qualtrics API endpoints to pull the distribution report for a given distribution. This gives a count of emails sent, bounced, etc.

 

report the number contacts uploaded and number of emails sent in a (standalone workflow) | XM Community

 

Hi ​@jake_dufinetz

thanks for your reply. Just had a look at the mentioned thread. I will probably need to review this with a colleague from IT to tell if we can make this approach work for our use case as this is too technical for me ;) 

As far as I can tell this mainly exports overall statistics of a distribution and sends it per email, right? 

In our case we need to retreive the distribution information of a singl transactions in the XM Directory when updated and then update the related case on Salesforce accordingly.

While a task to update Salesforce is available there is no task besides the above mentioned Experience iD change available to capture all relevant information.

In your example would the api call help us to replace the experience iD change task and then still use the separate Salesforce task to send the information to Salesforce?

 

 

Thanks for your support!


Forum|alt.badge.img+7
  • QPN Level 3 ●●●
  • 77 replies
  • Answer
  • November 7, 2025

 

Hi ​@jake_dufinetz

thanks for your reply. Just had a look at the mentioned thread. I will probably need to review this with a colleague from IT to tell if we can make this approach work for our use case as this is too technical for me ;) 

As far as I can tell this mainly exports overall statistics of a distribution and sends it per email, right? 

In our case we need to retreive the distribution information of a singl transactions in the XM Directory when updated and then update the related case on Salesforce accordingly.

While a task to update Salesforce is available there is no task besides the above mentioned Experience iD change available to capture all relevant information.

In your example would the api call help us to replace the experience iD change task and then still use the separate Salesforce task to send the information to Salesforce?

 

 

Thanks for your support!

 

Hi Lukas,

 

That is correct that the process I outlined in the other thread pulls the distribution information for an entire distribution batch. Because you are sending your distributions to individual contacts, the batch would return the results of just that single contact. So there would be fields returned for Sent, Failed, Started, etc but there would only be results for the single email that was triggered. See an example response from the API endoint below.

 

{"sent":1,"failed":0,"started":0,"bounced":0,"opened":0,"skipped":0,"finished":0,"complaints":0,"blocked":0}

 

Once you receive this response from the API call, you would then need to transform this using a Code Task and have logic to set a variable to match the format of what you are trying to send to Salesforce. For example for the API response above, you would then a code task that reads the response and outputs a variable such as “Distribution Result” = “Sent”. Then you would have your Salesforce response mapping task send that distribution result to Salesforce.

 

Solution to test would look something like this:

 

Workflow Tigger: Salesforce outbound message

Task 1: Update contact in XM Directory

Task 2: Send a survey via email

Task 3: WebService (Get Distribution ID)

Task 4: WebService (Get Distribution Stats)

Task 5: Code Task (Transform distribution stats and output distribution result)

Task 6: Salesforce response mapping (Update record in Salesforce with distribution result)

 

You would not need the XiD Change trigger workflow if you followed this solution.


LukasK
Level 1 ●
Forum|alt.badge.img+2
  • Author
  • Level 1 ●
  • 5 replies
  • November 7, 2025

Hi ​@jake_dufinetz , thanks for the clarification, super clear now and a good solution for us I guess :)