Template editor

The Template editor is the building area where you define the structure and content for templates. Depending on the content type chosen when creating an email, build a template using:

  • HTML and Plain text — Only for Email template type. Creates HTML content via a visual editor to manage all the different sections of the email, such as its header, body, footer, etc., as well as a Plain text option where you manage the content of the email. HTML allows for greater control over the style of the email. Most modern email applications should be able to interpret HTML emails; however, if the email client has trouble reading it, it falls back to plain text.

  • HTML — Only for Email template type. Creates HTML content via a visual editor to manage all different the sections of the email, such as its header, body, footer, etc. and have greater control over the style of the template; most modern email clients should be able to interpret HTML emails.

  • Plain text — No styling or formatting, only text. Plain text is the most portable format and should be viewable by any email application. Social review and Messaging templates only support this content type.

Common properties

These properties are common to any template type:

Subject

This is required to fill the template subject field except for Social Review templates. You can use variables as part of the subject, which is replaced by values from the record when creating a template.

Variables

Variables are placeholders for information store in fields of Experience Cloud or from the invitation file records. When the message is rendered, variables are replaced by an a specific value relevant to that email. Variables can be used anywhere in an email, including in the email subject or in the sender's name in the From field. They can also be added through any of the views of the editor, even in plain text. For example, the recipient's name or the location where a transaction took place can be included in an email through a variable. When the Distribution setting combines an email with record data, the variable is replaced by an a specific value that's relevant to that email.

To use a variable, click Code icon variable and select the field the variable belongs to. These are some of the most commonly used variables:

$FIRSTNAME$
The recipient's first name.
$COMPANY_NAME$
The company's name.
$EXPIRATIONDATE_PRETTY$
The expiration date for the template, presented in a readable format, for example April 23, 2018 at 10:32 AM.

In addition to those common variables, you can also add several others, filtering by these categories:

Event field variables

Data retrieved from Event fields. For example, survey takers' loyalty status, or the location customers visited.

Unit data type field variables
Data about units. For example, the the store address or the sub-brand name.
Email utility variables
General helpful variables to use in emails. This includes links to the survey, links to opt-out, and email trackers to know when the email has been opened.
Calculated field variables
Calculations based on data fields. For example, the total money spent by a customer including all extra services.
Social Media field variables

Information connected to Medallia Social Feedback.

Conversations field variables
Information connected to Medallia Conversations.
Formula field variables
Data stored in K-fields.

To use variables that are not available in those categories, create a new field via Program fields.

Tip: To avoid the $ sign be treated as a variable, escape it using \$. Even if the preview canvas renders it as \$, the actual email displays it as $.

Suggested field variables.

Preview canvas

While editing the content of an email, the Preview canvas displays an approximate version of the email when sent. It is updated in real time as you make changes, and shows variable names as placeholders for their values. The Preview canvas has two modes, desktop and mobile to simulate the different sized screens. Click Desktop and Mobile icons to switch between these views and verify that the design remains responsive.

Desktop and mobile icons to display the Preview canvas in different sized screens.

Important: For security reasons, the Preview canvas blocks any script execution. To check how survey takers see the email, send a preview email. If the email includes a link to a website that contains scripts, the preview may not be rendered correctly in IE11, Edge, and Safari browsers as they block scripts automatically.

HTML editor

The HTML template editor is a available when choosing email's content type HTML only or HTML and Plain text. Use the HTML Template tab to format the structure of the response, such as adding an image as a logo header and some footer content.

The HTML template must contain the variable $MARKUP_BODY$ which pipes the content of the response contained in the Plain text tab. This is the content displayed when clicking Respond in the Responses Form report or Responses Feed module, which can be edited by the user composing the response in reports. Without this variable, Experience Cloud defaults to send the text present in the HTML Template tab instead of the content updated when composing the response. Respondents receive an email with the HTML formatting as well as the Plain text content embedded.

This is an example of an HTML template:

An example of an HTML template.

And this is an example of a Plain text template:

An example of a Plain text template.

Format templates

To allow respondent's to format a Feedback response template, include the $MARKUP_BODY$ variable as part of the template body. This tag displays an editor for the respondent answering to feedback when the template is opened, as shown in the following image:

Editor options for respondent's.

With the editor, users can format these aspects of the email body:

  • Bold, italic, underlined, and strikethrough text.
  • Paragraph formats.
  • Unordered and ordered lists.
  • Text as hyperlinks.
  • Add images.

Plain text editor

The Plain text editor is available when choosing template's content type Plain text or HTML and Plain text. Click Code icon. variable to include variables that insert values when the message is rendered, and Placeholder icon. placeholder to insert some placeholder text for the respondent to know which specific information needs to complete to personalize the content of the response. For example, the following Social template responds to promoters that left comments on Instagram, and contains variables such as $USER_FULLNAME$, $USER_TITLE$, and $USER_AFFILIATION$ that are replaced with the information of the person who left the Instagram feedback, as well as the placeholder text [___INSERT SPECIFIC EXPERIENCE___] for the respondent to customize the answer.

Layer 112

  1. Variable — to include variables that insert values when the message is rendered.

  2. Placeholder — to insert some placeholder text for the respondent to know which specific information needs to complete to personalize the content of the response.

Source HTML editor

While the HTML editor allows for changing the content in a template, but only superficial aspects of the format, Source HTML is where you have full control over the format and arrangement of the template in addition to the content. Source HTML is the only option Medallia Admin Suite to edit templates built in previous versions of Experience Cloud.

Warning: After switching the editor to Source HTML you cannot revert it to use the HTML editor.

To use the Source HTML, follow these steps:

  1. On the HTML Template and/or Plain text tabs menu, toggle on the HTML mode to activate the Source HTML editor.

    The editor then shows the entire email as HTML, including all of the inline CSS that the base template sets by default. This HTML code includes any changes you have already done through the HTML editor.

    Toggle on HTML mode to activate the Source HTML editor.

  2. Create or remove sections, modify the inline CSS to change the style, etc.

  3. Optionally, insert an image:

    1. Click Image icon. image on the tab's menu.

      Upload a new or existing images icon on the Source HTMl option.

    2. Select Upload a new image or one of the images that have already been uploaded.

    3. Select an image file from your local device. The image must already be adjusted to the desired size, as email can only use it in its original size.

    4. The image is uploaded and a variable is created for it. For example, if the image name is my_image.jpg, its reference becomes $my_image$.

    5. Add an img HTML element and set its src to the image reference such as <td><img border="0" alt="Acme Co" src="$my_image$"/></td>.

    6. To check that your HTML code renders as expected, select Send Preview.

Restriction: Do not include JavaScript code. For security reasons, script execution is blocked.

HTML best practices on templates

To ensure that the HTML content is compatible with most email clients, be sure to follow these best practices:

  • Avoid the use of <div> entirely. Use <table> for layout, nesting tables as needed.

  • Use HTML tags and attributes for setting things like font, color, etc. over CSS.

  • When using CSS, set it through the “style” attribute rather than defining CSS classes.

  • Prefer explicit CSS declarations rather than shorthand notations.

  • Target a max width of 600 pixels.

  • Assume images are blocked by the email client. The design should be engaging even when that happens.

  • Use web-safe fonts to make sure the email is readable. Web-safe fonts re guaranteed to be available natively and supported by most email clients. To use a font that might not be natively available in the survey taker's device, see Fonts.

  • The link to the survey should stand out in some way, as many users won't take the time to read through the text of the email.

  • Mobile "hit" areas should target being no smaller than 48x48 pixels in size (an average thumb size).

  • Use @media queries to increase the size of the text on small screens (target 14-16 pixel font size) and manage responsive layouts (if used).

  • Verify you can CAN-SPAM and other legal requirements.

  • Escape all special characters (non-English-related) as HTML entities –– for example, © should be &copy;; $ should be \$.

  • Consider using a “pretext header” summary for email clients.

  • Choose your spacing techniques based on the design need and avoid reliance on CSS as much as possible.

  • Add comments explaining your thought process. Email HTML is difficult to maintain, and it is probably off when you have to change the email in the future.

  • Validate that the HTML is compliant with accessibility standards (ADA and WCAG 2.0) by using achecker.ca/checker.

Preview

Preview runs a quick test on the templates before sending them to actual recipients. To test a response:

  1. From the Template editor, click Send Preview.

  2. Enter an email address to send an email.

  3. Select a specific Record ID (Survey ID) to pull data from. This data is shown on the variables of the template. If no ID is provided, the variable names are left in the preview email without being replaced.

  4. Click Send.

  5. Open the email and verify that the content client displays it correctly.

Fields that contain sensitive data (such as first name, last name) are masked with asterisks (not junked) if the record is from an actual person. While you see asterisks in the template, the email itself shows the information. For more information, see Sensitive data.

Restriction: Only 100 Preview templates can be sent per day. When using Sandboxes, only use email addresses listed on the Allowed emails screen.

Activate and deactivate

After all the template configuration is valid and completed, click Activate allow users to use the structure and content for responding to feedback. Note that the status changes to Active and the template becomes available to use in reports when Responding to feedback.

Click 'Activate' to start using this template

Click Deactivate to stop using this template. As a result, the template status changes to Inactive and it does not appear when clicking Respond from the Responses Form report or the Responses Feed module.

You may also activate and deactivate a Smart response from the More vertical icon Details pane menu on the Feedback response screen.