Has anyone build a survey as a Schedule template to schedule appointments or import data from a scheduling source? If so, please share information. | XM Community
Skip to main content

Client is using Qualtrics.  However, they use other source to schedule diabetic classes.  Client would like to import scheduling data into Qualtrics.

There are some instructions here on how to schedule appointments within a Qualtrics survey and have appointment times dissappear, once they’re selected already: https://www.qualtrics.com/support/survey-platform/common-use-cases-rc/appointment-event-registration-surveys/


Hi Ash123,

 

Thank you for your response.  I apologize I did not see this response earlier.

 

We are re-visiting this subject again.  I will try the option of the information provided.

 

How has this survey build work for you so far?  I would like to learn of the advantages and disadvantages.

 

Your response is appreciated.


Hi ​@agrm ,

 

Using choice display logic with quota allows the slots to change according to availability.

However,

1) The quota may not 100% accurate.

For example, two survey takers being able to see the same set of available time slots, then choose the same time slot and completing the survey at the same time despite having only 1 availability for that time slot.

 

2) You might need to use embedded data in the survey flow and piped text as the choice instead of typing fixed date text as choices if there are any plans to use this survey for multiple terms.

Because changing the text in choices will affect past responses.

For example, sending survey in first quarter and sending the same survey in the second quarter.


Hi Chee Heng_SZ,

 

Thank you for your response.  I set the Quota in survey, however it did not work as expected.

 

Yes, templates will change constantly.  I do not quite understand how to to build the dates as embedded data.  Will it be Months, Day of week, Dates and Time?  Would you have a sample you may share?   

 

Thank you

Agrm


Hi ​@agrm,

 

Not sure how you plan to import the dates.

 

If building the dates from scratch and ignoring weekends/Public holiday considerations, with ChatGPT’s help and some trial and errors:

 

Change the year, month, day, hour, minute values for next distribution. Date1 to Date4 as example
You will need a question to construct the dates before the date selection question.
Qualtrics.SurveyEngine.addOnload(function() {
var yyyyStr = "${e://Field/year}";
var MMStr = "${e://Field/month}";
var ddStr = "${e://Field/day}";
var hhStr = "${e://Field/hour}";
var mmStr = "${e://Field/minute}";


// adjust the dates accordingly.
// the current difference between the dates are 3 hours difference.
var date1 = new Date(yyyyStr,MMStr-1,ddStr,hhStr,mmStr);
var date2 = new Date(date1.getFullYear(),date1.getMonth(),date1.getDate(),date1.getHours()+3,date1.getMinutes());
var date3 = new Date(date1.getFullYear(),date1.getMonth(),date1.getDate(),date1.getHours()+6,date1.getMinutes());
var date4 = new Date(date1.getFullYear(),date1.getMonth(),date1.getDate(),date1.getHours()+9,date1.getMinutes());

// To convert the format to suit individual needs, for example Singapore Date/Time.
const isoDates = a
date1,
date2,
date3,
date4
];

isoDates.forEach((isoDateStr, index) => {
// Parse the ISO date
const dateObj = new Date(isoDateStr);

// Convert to Singapore time
const sgtDateStr = dateObj.toLocaleString("en-SG", {
timeZone: "Asia/Singapore",
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
hour12: false
});

// Set embedded data fields
// if you want to see it in console, console.log("Date " + (index + 1) + " in SGT: " + sgtDateStr);
Qualtrics.SurveyEngine.setEmbeddedData("Date" + (index + 1), sgtDateStr);
});
});
end results

 


Leave a Reply