Version 5.9
In this Topic: Show
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.
Figure 1: Edit Email Templates screen
all email templates that are found within the production Email Templates folder will be listed here
choose the existing template that is to be changed and its attributes will be populated in the right-hand pane, where they can be altered
make a selection from the Template drop-down list and click this button to remove the selected template from the program
this button is not visible unless system parameter AllowDeleteEmailTemplate is set to TRUE.
clicking this button will cause the program to prompt the user for a name for the new template that will be created
exiting the Edit Email Templates screen prior to saving the template will result in the loss of the changes that were made in the current editing session
clicking this button will cause the program to exit the Edit Email Templates screen
any unsaved changes will be lost
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.
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.
the right-hand pane of the screen is where the body of the email template will be displayed
over-type or copy and paste text into the template or use the [Insert into Template] button to add the selected email tag to the currently viewed template
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.
To build the template from scratch:
Click the [New] button.
Enter a name for the new template when prompted, and click [OK].
Select one of the Tag radio buttons. In Figure 2, the [Misc.] button has been selected.
Click on the [Subject Start] tag in the list at the bottom left-hand side of the screen.
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
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
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.
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.
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.
To create a template based on a standard email template:
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.
Click in the email template pane, select all or a portion of the template and copy it to the clipboard.
Click the [New] button and enter a name for the new template. Click [OK].
Click in the email template body pane and paste the data from the base template into the new template. Click [Save].
Continue editing or making changes to the template text and/or tags as necessary. Click [Save] to retain the new changes.
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.
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.
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>>.
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
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
Use the navigation buttons to scroll through the collection of records and view the output of the template.
Click the [Return to Edit Mode] button to continue tweaking the changes made to the template.
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.
Click [Close] to exit the Edit Email Templates screen.
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
Click on the Edit Message tab and click the [Edit Template] button.
Figure 2: Edit Email Templates screen (Email Template Editor)
Figure 3: Example of HTML code in an Email Template
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.
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.
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.
In most cases, you will want to repeat the entire plain text message of the template within the <<HTML Start>> and <<HTML End>> tags.
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
To insert live tracking links to your shipping company's website into email messages to your customers, use the tag called AllTrackingLinks to insert a list of all tracking links associated with the current order.
Use the tag LatestTrackingLink to insert the most recently added tracking number for the current order.
Created: 3/7/11
Modified: 12/12/13
Go to Top