Here's the list of supported variables within the case alert email body:
Variable | Description |
{{questionnaire.customer_id}} |
Customer ID of the customer who answered the survey. |
{{questionnaire.address}} |
Address of the customer: either an email or a phone number. |
{{questionnaire.id}} |
ID of the questionnaire where the case alert condition was met for one of the answers. |
{{questionnaire.state}} |
State of the questionnaire where the case alert condition was met for one of the answers. |
{{survey.id}} |
Channel ID of the survey where the case alert condition was met for one of the answers. |
{{survey.name}} |
Expands to the survey name to which the customer was invited to and whose response triggered the alert. |
{{unit.name}} |
Expands to the unit name of the survey to which the customer was invited to and whose response triggered the alert. |
{{questionnaire.responses_with_questions_title}} |
Expands to list of question titles with answers to the survey. |
{{questionnaire.responses_with_questions_external_id}} |
Expands to list of question External IDs with answers to the survey. |
{{ questionnaire | meta:"IMPORT_COLUMN" }} |
Expands to the contents of the column for the given customer in the original import file Please see this part of "Email template setup" article for more information. |
{question_answer_via_q_ext_id_{External_ID}} |
Expands to the answer to the question that has External ID specified in curly braces. Note: for WEB channel. |
{question_answer_via_q_title_{Question_Title}} |
Expands to the answer to the question with the Title specified in curly braces. Note: for WEB channel. |
{{ questionnaire | answer_with_external_id:"External_ID"}} |
Expands to the answer to the question that has External ID specified in quotation marks. Note: for DIGI and SMS. |
{{ questionnaire | answer_with_title:"Question_Title" }} |
Expands to the answer to the question with the Title specified in quotation marks. Note: for DIGI and SMS. |
{{case_alert.name}} |
Expands to the name of the triggered Case Alert. |
{{survey.channel}} |
Expands to the channel name (WEB, SMS, IVR, DIGI). |
{{survey.state}} |
Expands to the survey state (i.e. "Active"). |
{{questionnaire.invite_time}} |
Expands to invitation time in a format YYYY-MM-DD hh:mm:ss. |
{{questionnaire.creation_time}} |
Expands to creation time in a format YYYY-MM-DD hh:mm:ss. |
{{questionnaire.start_time}} |
Expands to start time in a format YYYY-MM-DD hh:mm:ss. |
{{questionnaire.end_time}} |
Expands to end time in a format YYYY-MM-DD hh:mm:ss. |
{{questionnaire.import_id}} |
Expands to import ID, i.e. "2310" |
{{questionnaire.language_code}} |
Expands to language code, i.e. "EN" for English. |
{{questionnaire.classification_result}} |
Expands to clasification, i.e. "Negative". |
Example
This is the HTML code for the example layout where all of these variables are used:
<!DOCTYPE HTML>
<html>
<head>
<style>
.content {
padding-left: 40px;
}
.header {
color: grey;
font-size: 60px;
padding: 40px;
}
</style>
</head>
<body>
<div class="header">
Case Alert!
</div>
<div class="content">
<p>
<b>Customer ID:</b> {{questionnaire.customer_id}}
</p>
<p>
<b>Address:</b> {{questionnaire.address}}
</p>
<p>
<b>Questionnaire ID:</b> {{questionnaire.id}}
</p>
<p>
<b>Questions (by title):</b> <br> {{questionnaire.responses_with_questions_title}}
</p>
</div>
</body>
</html>
Which results in the case alert which looks similar to this:
Comments
0 comments
Article is closed for comments.