Difference between revisions of "Email Templates"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 32: Line 32:
:''For a list of Template Variables, see:'' [[Template Variables in Email Templates]]
:''For a list of Template Variables, see:'' [[Template Variables in Email Templates]]


===Add Personalized Merge Fields===
===Adding Images===
Create Personalized Merge Fields in custom email templates.
:{{:Personalized Merge Fields}}
Β 
===Add Images===
In HTML, an image is referenced using a tag that has the form: <tt><nowiki><image src"..."></nowiki></tt>, where the <tt>src</tt> attribute contains an absolute or relative path to the image. That path can be a file path like <tt>../images/local_image_file.jpg</tt> or it can be a URL of the form <tt><nowiki>http://...</nowiki></tt>.
In HTML, an image is referenced using a tag that has the form: <tt><nowiki><image src"..."></nowiki></tt>, where the <tt>src</tt> attribute contains an absolute or relative path to the image. That path can be a file path like <tt>../images/local_image_file.jpg</tt> or it can be a URL of the form <tt><nowiki>http://...</nowiki></tt>.


Line 44: Line 40:


The resulting tag as the form <tt><image src="{{platformURL}}/..."></tt>. The link then works in the recipient's email, because the image is publicly available.
The resulting tag as the form <tt><image src="{{platformURL}}/..."></tt>. The link then works in the recipient's email, because the image is publicly available.
==Sample Templates==
These samples are simplified versions of the default templates created by the platform. Use one of them as a starter for the <tt>body</tt> of a new email template you create (or copy the source from one of the default templates).
===Sample Template for use with Email-to-Case===
When an email is sent using this template, the recipient is prompted to reply in a way that allows their comments to be recorded as part of the case.
:<syntaxhighlight lang="html4strict" enclose="div">
<blockquote>
<p align="center">Please type your response ABOVE THIS LINE when replying. </p>
<hr />
$__current_note__.message
</p>
<p>For the fastest follow-up, reply to this email, which references Case #$Case.case_number.</p>
<hr />
<b>Previous Messages</b>
<hr />
<table>
#foreach($Previous_Notes_Item in $__previous_notes__)
<tr>
<td colspan="2"><p>$Previous_Notes_Item.date_modified<br />
$Previous_Notes_Item.created_by_name <b>replied</b><br />
</p> </td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="739">$Previous_Notes_Item.message</td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
#end
</table>
<p align="center"><font size="-1">This message was sent to $Case.from_address in reference to Case #$Case.case_number</font></p>
</blockquote>
</syntaxhighlight>
===Sample Template for use with Service Portal===
When an email is sent using this template, the user is informed that they can use the Service Portal to follow up on their case.
:<syntaxhighlight lang="html4strict" enclose="div">
<blockquote>
$__current_note__.message
<p>For the fastest follow-up, use the <a href="__URL HERE__">Service Portal</a> and reference Case #$Case.case_number.</p>
<hr />
<b>Previous Messages</b>
<hr />
<table>
#foreach($Previous_Notes_Item in $__previous_notes__)
<tr>
<td colspan="2"><p>$Previous_Notes_Item.date_modified<br />
$Previous_Notes_Item.created_by_name <b>replied</b><br />
</p> </td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="739">$Previous_Notes_Item.message</td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
#end
</table>
<p align="center"><font size="-1">This message was sent to $Case.from_address in reference to Case #$Case.case_number</font></p>
</blockquote>
</syntaxhighlight>
===Combined Sample Template===
This template assumes that both [[Email to Case]] and a [[Service Portal]] have been configured.
:<syntaxhighlight lang="html4strict" enclose="div">
<blockquote>
<p align="center">Please type your response ABOVE THIS LINE when replying. </p>
<hr />
$__current_note__.message
<p>For the fastest follow-up, reply to this email, or use the <a href="__URL HERE__">Service Portal</a> and reference Case #$Case.case_number.</p>
<hr />
<b>Previous Messages</b>
<hr />
<table>
#foreach($Previous_Notes_Item in $__previous_notes__)
<tr>
<td colspan="2"><p>$Previous_Notes_Item.date_modified<br />
$Previous_Notes_Item.created_by_name <b>replied</b><br />
</p></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="739">$Previous_Notes_Item.message</td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
#end
</table>
<p align="center"><font size="-1">This message was sent to $Case.from_address in reference to Case #$Case.case_number</font></p>
</blockquote>
</syntaxhighlight>
<noinclude>
<noinclude>


[[Category:Tutorials]]
[[Category:Tutorials]]
</noinclude>
</noinclude>

Revision as of 22:58, 22 August 2012

Workspace > All Items > Templates

Email templates define a standard look for Email correspondence that can be customized for individual messages.

About Email Templates

Email Templates are used in Campaigns and in general correspondence.

Templates are created using an online editor, or by pasting in HTML created in an external editor.

Templates can also include variables to information so you can personalize each email that goes out.

Working with Email Templates

Create an Email Template

  1. Click Workspace > All Items > Templates.
    The Templates object opens.
  2. Click the [New Template] button.
  3. Select your template design method:

Editors

Use the HTML Editor Toolbar

The toolbar appears when using the free-form HTML editor.

Editing Toolbar

Add Template Variables

Use Template Variables to personalize email templates:

  • From any template editor, Click the Show Template Fields link.
    The Template Variable Tool pops up.
  • Select a category and a field.
    The name for the field appears in the Variable column. (For example:$Customer.discount.)
  • Copy the variable name, close the popup, and insert the variable into your template.
For a list of Template Variables, see: Template Variables in Email Templates

Adding Images

In HTML, an image is referenced using a tag that has the form: <image src"...">, where the src attribute contains an absolute or relative path to the image. That path can be a file path like ../images/local_image_file.jpg or it can be a URL of the form http://....

When the email arrives in a recipient's inbox, file paths are obviously of little value. (They would only work if recipient happened to have all of the right images at the right locations on their local system. Small chance!) So Http URLs are used to access the images.

To generate those URLs, the images to be included in the URLs need to be uploaded to the platform as Public Documents. URLs for those images become available when they are made public. You then insert those URLs into the <image src"..."> tags.

The resulting tag as the form <image src="https://{yourDomain}/networking/...">. The link then works in the recipient's email, because the image is publicly available.