Send an email notification 7 days before a ticket is due | XM Community
Skip to main content
Question

Send an email notification 7 days before a ticket is due

  • April 2, 2025
  • 1 reply
  • 21 views

courtrc
Level 3 ●●●
Forum|alt.badge.img+9

My goal is to attempt to send notification emails 7 days before a date entered into a Flatpickr question (Response due) is due.

I can’t use dates stored as embedded data like I can use Created date or Updated date within Ticket Workflows as they don’t have the same logic options. My related post about that, so maybe this ends up being a redundant post. But I’m hoping I can figure some workable hack since I haven’t figured out a way to just use a workflow to schedule an email with the ability to have logic without a triggering event. I had originally hoped to be able to use a Scheduled workflow and logic to see if Response due was within 7 days from today or not, but Scheduled workflows only support tasks and not logic.

I am still trying to solve this but I’m trying to think outside of just Ticket Workflows as a way to be able to trigger this, I’m not sure if it’s even possible. I thought about trying to use a Scheduled workflow to calculate the days between today and the response due with the Data formula task, but then I’d need to perform a Ticket Update task so it’s updating the ticket data and then I could attempt to use what logic options I do have for Ticket Workflows to check for if “Days until response is due” equals “7” send the reminder email. If any of that is even possible, I’d need to be able to store the Flatpickr date as both ISO and m/d/Y formats from one field which I don’t know if that’s possible either.

I changed my Flatpickr date format to the ISO format cause that seemed easier than trying to change the format to ISO from m/d/Y. But I’m hoping I can also store the date selected as m/d/Y in a separate embedded data to display in a more friendly manner in piped text, ticket data and dashboard data. I wasn’t sure if there was a way to somehow store the date as two different formats to two different embedded data from a single calendar picker question.

Qualtrics.SurveyEngine.addOnReady(function()

{

        jQuery("#question-"+this.questionId+" .text-input").flatpickr({

    dateFormat: "Z",

        altInput: true,

        defaultDate:"today",

        minDate:"today",

        onChange: function(selectedDates, dateStr, instance) {

               Qualtrics.SurveyEngine.setJSEmbeddedData("date4",dateStr);

        }      

        });

});

Maybe I’ve hit a dead end but figured I’d ask again to see if anyone has any ideas.

1 reply

vgayraud
QPN Level 6 ●●●●●●
Forum|alt.badge.img+49
  • QPN Level 6 ●●●●●●
  • 395 replies
  • April 2, 2025
Qualtrics.SurveyEngine.addOnReady(function () {
    jQuery("#question-" + this.questionId + " .text-input").flatpickr({
        dateFormat: "Z",
        altInput: true,
        altFormat: "m/d/Y",
        defaultDate: "today",
        minDate: "today",
        onChange: function (selectedDates, dateStr, instance) {
            if (selectedDates.length > 0) {
                var formattedDate = instance.formatDate(selectedDates[0], "m/d/Y");
                Qualtrics.SurveyEngine.setJSEmbeddedData("date4", dateStr);
                Qualtrics.SurveyEngine.setJSEmbeddedData("date5", formattedDate);
            }
        }
    });
});

 


Leave a Reply