Send an email not linked to a survey with conditions | XM Community
Solved

Send an email not linked to a survey with conditions


Userlevel 5
Badge +7

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!

icon

Best answer by Deepak 7 July 2023, 00:27

View original

12 replies

Userlevel 7
Badge +18

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

Userlevel 5
Badge +7

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

Userlevel 3
Badge +9

@Erikahuer Could you please elaborate more on your query? 

Userlevel 5
Badge +7

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.

 

Userlevel 7
Badge +36

@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.

Userlevel 5
Badge +7

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.

Userlevel 7
Badge +36

@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(lastDateParts[2], lastDateParts[0] - 1, lastDateParts[1]);
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!

Userlevel 5
Badge +7

Thank you so much @Deepak!

I will try this way.

Userlevel 5
Badge +7

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

 

Userlevel 7
Badge +36

@Erikahuer 

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

 

Userlevel 5
Badge +15

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.

 

Userlevel 5
Badge +7

@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