Send an email not linked to a survey with conditions | XM Community
Skip to main content

Hi!

 

I need to send an email that is not linked to a survey but an embedded data (it is a date field) of the participant. Is there any workaround i can do for this?

 

Thank you in advance!

You can perhaps schedule it as a Thank You email if it’s part of a distribution you can easily select in a survey.


@InessaG sadly it is not linked to a survey, it is an email that stands alone.


@Erikahuer Could you please elaborate more on your query? 


Hi @Naman_Savla , sure!


So for example I am bringing contacts by an integration and there is a field there of last date that is configured as MM/DD/YYYY, we need to send to the people that last date was 4 days before an email, but this email would not be linked to any survey. It is just a we miss you type of email.

 


@Erikahuer 

You can use this event in workflow (Experience ID Change Event (qualtrics.com)). Based on contacts added.

Once you have the date field you need to compare it with current date you can use code task post which you can use email task conditional basis.


Hi @Deepak 
This is a great approach!

Would you help me to understand a little bit more the code task as a conditional for the email. I got a little bit lost there.


@Erikahuer Sure, you need the code task to compare the "last date" occurred four days or more before the current date if I understand your use case correctly.

Something like this 

function codeTask() {
var lastDate = "~{qde://supplemental.embeddedData.LastDate}";
var currentDate = new Date();
currentDate.setDate(currentDate.getDate() - 4);
var lastDateParts = lastDate.split("/");
var lastDateObj = new Date(lastDatePartst2], lastDatePartst0] - 1, lastDatePartst1]);
if (lastDateObj <= currentDate){
return {
result: "true"
}
}else return {
result: "false"
}
}

You can then use the result value of true as condition before email task, also update last date embedded data from piped text as required. It would look like below:

Hope it helps!


Thank you so much @Deepak!

I will try this way.


Hi @Deepak  i tried but for some reason i get this result when it runs.

 


@Erikahuer 

The trigger should be experience ID change and not at a specific time, I am guessing that’s the error.

 


Hi @Erikahuer ,

 

In case you have the option of running Contact import automation via SFTP, I can suggest a simple option here.

  1. Create a file and drop it on an SFTP. (this would be a contact list file that gets imported into a mailing list)
  2. Setup Contact Import Automation which imports these files daily at a set frequency
  3. Link this import automation to 2 distribution automations
  4. 1st Distribution automation should run immediately and should be connected to a dummy survey and the message that you create should not have the survey link. You can hide the link using this code: <div style=“display:none;”>${surveyLink}<div> This will ensure that the message goes out without the link of the survey.
  5. 2nd automation can be run after 4 days(see below setting) with the actual survey connected to it.

Not sure if this would completely solve the requirement, but could be a workaround.

 


@Deepak Hi, yeah i changes a little the flow and now it is working.

This is how it ended up looking.

 

@Sowrabh1993  sadly i do not have the SFTP automatization, but it is a clever option.

Thank you for the help guys!


Leave a Reply