Brainstorm: Generate Personal Links via API with Transaction Data | XM Community
Skip to main content
Question

Brainstorm: Generate Personal Links via API with Transaction Data


Forum|alt.badge.img+5

We are looking to distribute Qualtrics surveys using our customer facing mobile app’s in-app notification system. The app is expected to push a survey invite link to customers when they reach certain points of the customer journey, in real-time (think for example when a customer scans their ticket into an event venue). The survey invite needs to be tied to the customer and the specific transaction that triggered the invite, which is all stored within the notification system.

At a high-level, we see two general ways of doing this:

  1. Anonymous link with URL parameters

We can store the base anonymous URL in the push notification template, and then dynamically append the customer’s information + transaction data to the end of the URL so that it gets passed through to the survey response. (ie [AnonymousURL]?[TransactionField1]=[Value]&[TransactionField2]=[Value]...)

While this path gets the base job done and is the simplest to implement, it has some cons:

  • The customer could manually manipulate the URL text in their browser to change the data that gets stored with the response.
    • Ideally there would be a way to at least hide the URL parameters from the browser URL once the page loads.
  • Survey invite counts/reporting would not be available in Qualtrics, as it would not be aware of when the anonymous link was sent out by the in-app notification system.
  • Customer may be able to complete the survey multiple times (although there could be workaround to try and prevent this)
  1. Use Qualtrics APIs to create transaction and generate personal link

We are looking at how we can leverage the Qualtrics Create Distribution API (api.qualtrics.com/573e3f0a94888-create-distribution) to create personal survey links. The documentation seems to show that you can either 1) generate links for a mailing list or contact with no transaction data or 2) generate links to a transaction batch. Ideally, we could use option 1 to generate links for a contact and include the transaction data in the same API call, but that doesn’t look like an option. Instead, we think this may be the only path:

  1. Create Directory contact
    1. Use the Create Directory Contact API (api.qualtrics.com/3f3d5290d19c2-create-directory-contact) to create a contact with the customer’s name/email.
    2. Capture the contact’s Contact ID from the API call response.
  2. Create transaction
    1. Use the Create Contact Transaction API (api.qualtrics.com/08e5f0bb11170-create-contact-transaction) to create a transaction associate with the contact created in the prior API call, passing in all of the transactional data associated with the customer’s event that triggered this process.
    2. Capture the Transaction ID from the API call response.
  3. Create transaction batch
    1. Use the Create Transaction Batch API (api.qualtrics.com/ca5ad8bbec6fb-create-transaction-batch) to create a transaction batch using the Transaction ID from the previous API call, which would only include the single transaction that was generated.
    2. Capture the Transaction Batch ID from the API call response.
  4. Generate links for transaction batch
    1. Use the Create Distributions API (api.qualtrics.com/573e3f0a94888-create-distribution#generate-links-for-transaction-batch) to generate personal links associated with the Transaction Batch ID from the previous API call.
    2. Capture the Distribution ID from the API call response.
  5. Retrieve generated links from transaction batch
    1. Use the Create Distributions API (api.qualtrics.com/573e3f0a94888-create-distribution#retrieve-generated-links) to retrieve the generated links associated with the Distribution ID from the previous API call.
  6. Push notification to customer
    1. Send out message template with the personal link generated from the previous API dynamically piped into the message.

This path is somewhat complex with a minimum of 5 API calls, which could be an issue at large volume due to Qualtrics’ API rate limiting. All of these API calls could be setup in the in-app notification platform, or we could create a workflow in Qualtrics to do these steps. The notification platform would then need to call the Qualtrics workflow endpoint, with Qualtrics sending a call back to the notification platform with the generated personal link.

If anyone from the XM Community has any experience with this scenario, additional ideas, or feedback on what I’ve outlined above, I would be happy to hear it!

2 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2028 replies
  • January 13, 2025

I was on a project that required something similar, with a few more complications. Basically, they were running some employee training courses and wanted feedback at the end of each module. The employees were free to complete the modules at their own pace, however, since it was being sent out to ~100K people, we expected a worst case scenario of ~ 2-3K responses/minute at peak, eliminating the possibility of using multiple API calls.

 

 

This is the solution that worked for us:

  1. Add all the expected users to the directory. We did this beforehand, but you could do this at registration.
  2. Create a survey for each milestone.
  3. Create a distribution for each milestone, let it be empty.
  4. When the user reaches a certain milestone, add them to the distribution (we had to rate limit it, may not be required in your case).
  5. Create the personalized URL on your server and send it to them.

We’ve been running this for close to 15 months without any hiccups. 

 


Forum|alt.badge.img+1

Thank you for sharing ​@ahmedA! How did you create an empty distribution and later add users to this existing distribution? When you said “5. Create the personalized URL on your server and send it to them,” were you using the [List Distribution Links] API to get the URL and send it outside of Qualtrics?


Leave a Reply