SMS Distribution via API | XM Community
Skip to main content

Deepak or anyone else who can help:
I'm working on a longitudinal study where we want to send daily qualtrics surveys via SMS to participants for a 10 week period. We would like to automate the sending of this survey for the entire 10 weeks. Ideally, we would like to randomize at what time the surveys are send daily. I looked at the sample request below and am wondering if there is custom code we can write for sendDate so as to automate survey invites being sent via SMS for a 10 week period.
Greatly appreciate any input!
Thanks!

curl --request POST \\
--url https://yul1.qualtrics.com/API/v3/distributions/sms \\
--header 'Content-Type: application/json' \\
--header 'X-API-TOKEN: ' \\
--data '{
"surveyId": "SV_080LO2R7csetMK9",
"method": "Invite",
"sendDate": "2020-06-17T00:36:42Z",
"recipients": {
"mailingListId": "CG_bwM2NGGLJ6oftCR"
},
"name": "Example Survey",
"message": {
"libraryId": "UR_eDPqMQLv8yQZnIF",
"messageId": "MS_8vlfvwn12wdf6D3"
}
}'

Mercurial
You can use something like this to generate a random time daily. But you will have to include a code task before firing the API and based on the random time which is generated you can send on that date.
Hope it helps!


Deepak Thanks for the helpful links! Just wanted to clarify, how far in advance can you schedule the survey invites, for example, are we able to write a code that sends out invites for the entire 10 week period of the study instead of scheduling invites on a daily/weekly basis?


Mercurial
Yes you can schedule for 10 weeks at once I had a requirement to schedule for post 6 months and it got done easily.
Hope it helps!


Leave a Reply