Go to Bottom

Email Template Editor

In this Topic: Show

Overview

The Email Template Editor is a tool that allows the user to modify the standard Order Manager email templates that are supplied with the program or create completely new email templates to suit their business needs. Text and tags are entered into the new template and the user is able to preview the result using actual data from their store.

Using Email Templates in the Order Manager is similar to using the "mail merge" function of Microsoft Word for letters and envelopes, except it is used to create the body of an email instead. Different email templates can be designed for different purposes and the program can be instructed when to use each one via the Store Setup Wizard. For example, when the program generates a confirmation email for an order or group of orders, it will pull pertinent information from each order, and based on the designated email template, insert customer-specific information into the "finished" email that is sent to the customer.

The Order Manager assumes that the production Email Templates folder is found in the same location as the store data file. If new templates are created or changes are made to templates in an Email Templates folder that is not in the same location as the data file, those templates will not be displayed in the list of templates anywhere in the program where email can be sent. For example, if in a networked configuration of the Order Manager, the data file and production email templates folder reside in the c:\StoneEdgeData directory, but the user makes changes to a template in the c:\StoneEdge\Email Templates directory instead, the program will not display those changes or templates because it only uses the Email Template folder that is in the same location as the data file, or c:\StoneEdgeData\Email Templates.  

The production Email Templates folder should be backed up regularly, along with the store data file, for disaster recovery purposes. It is recommended that the user keep on-site and off-site copies of critical Order Manager files, which are identified by the CTRL+Shift+C key combination at the Main Menu.

The Edit Email Templates is opened when the Email Template Editor is selected from the list of activities found by going to the Main Menu > Maintenance Menu icon > Maintenance tab.  

Click the Show link next to "In This Topic" at the top of this page to see a series of links in outline form, which can be used to quickly jump to that section of the topic.

In addition, major topics may provide a brief synopsis of a field's purpose or direct the reader to the appropriate section of the topic by scrolling over the image. To return to the previous location within the same page, right-click the mouse and select [Back].

If clicking a field directs the reader to a different Knowledge Base topic, it will open in a new tab or window, leaving the currently viewed topic open. The browser's settings determine whether a new tab or window is opened.

Description of the Edit Email Templates Screen

Figure 1: Edit Email Templates screen

Template Drop-down List

Delete Button

New Button

Save Button

Reload Button

Close Button

Tags Section

This section of the screen displays the various email tags that can be inserted into an Email Template. Select a radio button to see the tags associated with a particular category or use the [All] button to view every possible tag in the list at the bottom of this section of the screen.

All Radio Button

Insert into Template Button

Orders Radio Button

Inventory Radio Button

Drop-shipping Radio Button

Purch. Orders Radio Button

Customers Radio Button

Order Details Radio Button

Suppliers Radio Button

Quotes Radio Button

Misc. Radio Button

Test With: Section

This row of buttons are used to test the changes that have been made to a template, prior to the changes being saved. Depending on the purpose of the email template, select the appropriate button to test with the correct type of information.

Orders Button

Customers Button

PO's Button

Drop-Ships Button

Suppliers Button

Quotes Button

Body of the Email Template

Using the Email Template Editor

Tags that can be used in an Email Template are surrounded by  <<  >> markers, that represent placeholders in the body of the email, for which actual data will be substituted when the email is generated and sent.

Some email tags merely pull in a single field value from one of the Order Manager's tables, while others allow the user to enter a string of text between a starting and ending tag or loop through a range of values.

Certain tags will only be available for insertion into the body of an email when it will be sent from a related location in the program. For example, an email tag for a Purchase Order field will not be available to an email that is being sent from the View Customers screen.

In addition, the data contained in similarly named tag fields may be different, depending on the category to which it belongs. For instance, the Purchase Order "Comments" tag will contain different information than the Orders "Comments" tag.

Rather than changing the standard email templates that are provided with the program, it is recommended that the user create a new template based on an existing standard template. Otherwise, be sure to make a backup copy of a standard template before changing it. That way there will always be a properly functioning copy of each template to fall back on if necessary.

Creating a New Email Template

  1. To build the template from scratch:

    1. Click the [New] button.

    2. Enter a name for the new template when prompted, and click [OK].

    3. Select one of the Tag radio buttons. In Figure 2, the [Misc.] button has been selected.

    4. Click on the [Subject Start] tag in the list at the bottom left-hand side of the screen.

    5. Click the [Insert into Template] button to have this tag entered into the right-hand pane where the body of the email template will be displayed. Double-clicking the tag will also result in it being placed in the body of the email template.

Figure 2: Edit Email Templates screen - Creating a Template from scratch

    1. Type in the text of subject line as it should appear in the email and then select and insert the [Subject End] tag to mark the end of the subject line.

Figure 3: Edit Email Templates screen - showing an example of a completed email Subject: line

For example, if the company name is My Web Orders and first line of the email template looks like this:

<<Subject Start>>Order Confirmation from <<CompanyName>><<Subject End>>

the resulting subject line of the email sent to the customer will be:

Order Confirmation from My Web Orders

    1. Continue to add tags and/or text to the template body until the all of the information to be included in the email has been added to the template.

    2. Click the [Save] button to create the template, which will now appear in the Template drop-down list at the top of the screen. A new or changed template cannot be tested until it has been saved.

    3. To test the currently viewed template, click one of the Test With: data type buttons that are located above the right-hand pane where the email template body is displayed. The button or buttons that should be used depends on the tags that are included in the email template, therefore it may be necessary to test the template with more than one data type button.

  1. To create a template based on a standard email template:

    1. Select the base template from the Template drop-down list. The AllFields.txt template contains all of the possible email tags, making it a good candidate to copy, in order to save the amount of time required to select and insert each email tag individually.

    2. Click in the email template pane, select all or a portion of the template and copy it to the clipboard.

    3. Click the [New] button and enter a name for the new template. Click [OK].

    4. Click in the email template body pane and paste the data from the base template into the new template. Click [Save].

    5. Continue editing or making changes to the template text and/or tags as necessary. Click [Save] to retain the new changes.    

    6. To test the currently viewed template, click one of the Test With: data type buttons that are located above the right-hand pane where the email template body is displayed. The button or buttons with which the template should be tested depends on the tags that are included in the email template; therefore it may be necessary to test the template with more than one data type button.

Modifying an Existing Template

  1. Select the template you wish to modify from the Template drop down list at the top of the form. The template opens in the editor window below.
  2. The list of available tags, which represent data fields in your store's data file, appear on the left of your screen. To view a specific category of tags, click the radio buttons at the top of the Tags section.

Note: Any text between the tag markers <<  >> in the editor window is a tag that is replaced with actual data when the email is sent.

The data contained in some tags is only available to be inserted into the body of an email that is sent from a related location in the program. For example, a Purchase Order field tag will not be available in an email sent from the View Customers screen.

Also, data in a similarly named tag field may be different depending on the category to which it belongs. For instance, the Purchase Order "Comments" tag would contain different information than the Orders "Comments" tag.  

  1. Type anywhere in the editor window to add or edit text. To insert a tag, click where you want the tag to appear, then either double-click the name of the tag in the list on the left, or select the tag and click the Insert into Template button.

Note: The EmailFromName and EmailFromAddress tags allow you define what name and address appear in the From: field in email using that template. To use them, insert the tag (or tags) at the top of template, then add a comma and the name or email address. For example:

 

<<EmailFromName,George Smith>> <<EmailFromAddress,george@smithco.com>>.

 

The SubjectStart and SubjectEnd tags allow you to define what appears in the Subject: field in email using that template. To use them, insert the opening tag next to the text you want to appear in the Subject line, then insert the closing tag. For example:

 

<<Subject Start>>Order Confirmation from <<CompanyName>><<Subject End>>.

 

  1. To preview your template, click one of the Test With buttons at the top of the editor window. Note: It is important to test a template with the proper type of data. For example, tags related to orders or suppliers will not work if you test the template with customers.

 

  1. When you are finished editing the template, click Save. Or, to cancel your changes, click the Reload button to reload a copy of the current template in its previous form.
  2. Click Close to exit the Edit Email Templates screen.

Testing or Previewing an Email Template

  1. To preview the template, click one of the Test With: buttons directly above the right-hand pane. It is important to test a template with the proper type of data. For example, tags related to orders or suppliers will not work if you test the template with customer records.

Figure 4: Edit Email Templates screen - example of a standard email template, Your order will ship today.txt

  1. The Edit Email Templates screen will change slightly, once a Test With: button is clicked. The majority of buttons that were previously active will be grayed out and the Test With: buttons will disappear. A new group of active buttons will be visible, and the tags will be replaced with valid data in the body of the email template, as seen in the figure below.

Figure 5: Edit Email Templates screen - example of previewing the results of the standard email template, Your order will ship today.txt

  1. Use the navigation buttons to scroll through the collection of records and view the output of the template.

  2. Click the [Return to Edit Mode] button to continue tweaking the changes made to the template.

  3. When satisfied with the test results, click [Save]. Or, to cancel the changes and start over with a fresh copy of the current template, click the [Reload] button.

  4. Click [Close] to exit the Edit Email Templates screen.

Including HTML Content in an Email Template

  1. To add HTML to a plain text email template it is necessary to use the Email Template Editor feature, which can be accessed via the Maintenance Tab of the Maintenance Menu, or from the Edit Message tab of the Send Email screen.  

For example, select the standard email template, HTML Confirmation with Invoice.txt from the Select Template tab of the Send Email screen.

Figure 1: Send Email screen

  1. Click on the Edit Message tab and click the [Edit Template] button.

Figure 2: Edit Email Templates screen (Email Template Editor)  

  1. Scrolling down, we see the beginning of the HTML portion of the template.

Figure 3: Example of HTML code in an Email Template

  1. To add HTML to a template that does not already contain HTML content, add the <<HTML Start>> and <<HTML End>> tags in the body of the template.

  2. Type the full HTML source code in between those tags, including any Order Manager field tags that the program should replace with data from your store data file.

  3. Any text that is not within the <<HTML Start>> and <<HTML End>> tags is processed as plain text and sent as the text-only version of the email.

  4. In most cases, you will want to repeat the entire plain text message of the template within the <<HTML Start>> and <<HTML End>> tags.

Example of an HTML and Plain Text Email Template

The fields in blue text are fields that exist in the Order Manager store file. When the program generates the email, those fields will be populated with actual data from customer, inventory, order or supplier records, depending on the tags that are used in the email template.

The line in green at the bottom of this example shows how to insert a company logo into the HTML section of the email template, using the <<img src>> tag. The image file should reside on a web server.  

<<OrderDate>>

Dear <<OrderName>>,

Thanks for ordering from <<CompanyName>>.

We appreciate your business!

- The Staff at <<CompanyName>>

<<HTML Start>>
<p><<OrderDate>></p>

<p>Dear <<OrderName>>,</p>

<p>Thanks for ordering from <b><<CompanyName>></b>.</p>

<p><i>We appreciate your business!</i></p>

<p>- The Staff at <img src="http://www.stoneedge.com/images/stomediumsm.gif'">
<<HTML End>>

Figure 6: Example of an email template containing both plain text and HTML

 

An additional resource for coding HTML can be found at WebMonkey

Adding a Tracking Link to an Email Template

 

Related Topics

 

Created: 3/7/11

Modified: 12/12/13

Go to Top