You can customize the content of the various e-mail messages that are automatically sent to your customers when they place orders on your WebStore. In addition, you can customize administrative e-mails, such as "Customer Registration" and "Forgot Password" messages.
The "Customer Registration", "Forgot Password", and "Order Confirmation" e-mails can be customized using NitroScript. If you have NitroScript access, in WebStore Manager, select Edit WebStore Layout, then under E-mails, select the appropriate template.Â
All other e-mail messages generated by NSc Sync are customizable through the modification of XML template files.
Two templates, thankyou.xml
and processed.xml,
are defined by default in the NSc Sync...\MailTemplates installation directory:Â
In newer versions of NSc Sync the templates will be found in C:\Users\Your_Username\AppData\Roaming\NitroSell\NSc Sync\MailTemplates
"Thank You" Template
When a Web Order is received during the synchronization process (using NSc Sync), the thankyou.xml template is used to generate an e-mail. This template generates an e-mail in the following format:
"Processed" Template
When a Web Order has been processed successfully from within
RMS Store Operations POS (using NitroSell's Get Web Orders (GWO) add-on):Â
and then tendered successfully from within RMS Store Operations POS, NSc Sync uses the processed.xml template to generate an email in the
following format:
Simply selecting "Set as Processed" for an order using GWO does not cause the processed.xml e-mail to be sent. In order for this e-mail to be generated and sent, the order must also be tendered successfully in your POS.
Custom Templates
The RMS GWO add-on enables the cashier to manually send an e-mail to the customer by selecting a custom template, for example, if an ordered item is placed on back order:
This will result in the generation and submission of an e-mail by NSc Sync, using the "Items on back order" template. Any number of custom e-mail templates can be created that enable manual e-mail submission to the customer through the GWO component. To do so, perform these steps:
Create a new template XML file in the C:\Program Files\NitroSell\NSc Sync - RMSSO\Data\MailTemplates directory, note that this is the default directory if you have installed NSc Sync to a different directory you will need to adjust the path accordingly, (or copy an existing XML file and rename it), for example, itemsbackordered.xml:
Modify the template file by giving it a description, and by setting ALLOWMANUAL to 1 .
Modify the body of the message as appropriate.
To ensure that NSc Sync uses your new template, after modifying the XML file, from the NSc Sync dialog menu, select File, then select Rescan Mail Templates...
-
Open the Get Web Orders (GWO) component in RMS, click the drop-down beside Options, then select Send Feedback. Your new template "Items on back order" is displayed, ready for selection.
Modifying Templates
The e-mail templates are defined in XML and can be edited in any text editor. Each template consists of a combination of the e-mail content text and XML tags representing customer and order data that will be inserted into the content text on message generation.
For the majority of users, modification of the content text is sufficient. For example, modifying the thankyou.xml template involves the following:
Open thankyou.xml in any text editor.
The text within the XML BODY tag contains the content of the message:
Two tags are used in this example: to output the userâs first name at the start of the message, and to output the store name at the end of the message.
The content can contain HTML, allowing more sophisticated message layout. The content <BR> in the above example represents the HTML tag <BR>. The < and > tags represent alterative means of entering the less-than and greater-than angle brackets. This is necessary to distinguish HTML tags from XML tags, so as not to confuse the message generator.
Modify the content, for example:
To ensure that NSc Sync is always using the most up-to-date e-mail template files, after modifying an XML file, go to the File menu and click Rescan Mail Templates...
-
Any generated âthank youâ message will be formatted in the following manner:
Modifying Templates (for Advanced Users Only)
Templates typically contain the text of the message, along with specialized XML tags to output order-related information, and to set generated e-mail properties.
Note: If you insert the appropriate code into the nitroasl_mailer table, you can instruct NSc Mail to send mails for Web Orders based on any template you define using these tags.
Mail Property Tags
Name |
Children |
Parent |
Attributes |
Description |
DESCRIPTION, ALLOWMANUAL, HEADERS, FIELD, DBFIELD, VARIABLE, SQL | None |
None |
Root XML template element. |
|
DESCRIPTION | None |
None |
Name of template. |
|
ALLOWMANUAL | None |
None |
If value is set to 1, template can be used by cashier to send manual e-mail. |
|
HEADERS | HEADER | None |
Root tag for mail header settings. |
|
HEADER | FIELD, DBFIELD, VARIABLE, SQL | HEADERS | TYPE |
E-mail header settings, where TYPEsubject, fromname, fromaddress, toname, toaddress. can be one of: |
BODY | FIELD, DBFIELD, VARIABLE, SQL | None |
Represents body of message. |
Order Information Tags
Name |
Children |
Parent |
Attributes |
Description |
FIELD | None |
All |
NAME, BASETAGIDENTIFIER, BASETAGVALUE | Extracts order information from the WebStore order, which is stored in a standard XML format recognized by RMS. |
DBFIELD | None |
All |
TABLE, NAME |
Outputs data from the RMS database, specifically, store and ordersummarystore table refers to the RMS configuration table. The ordersummary table refers to the RMS exchange table. |
VARIABLE | None |
All |
NAME |
Outputs data at the "processed" stage of an order only. NAME can have one of the following values:
|
SQL |
QUERY, ROW |
All |
None |
Root tag for general SQL query. |
QUERY |
None |
SQL |
None |
SQL query to be executed on RMS database, that is, any information can be retrieved from RMS and placed in your mail message. |
ROW |
COL |
SQL | None |
Text contents executed for each row returned by the query. |
COL |
None |
ROW |
NAME |
NAME value refers to the table column. |
Simple Example
The following example is a simple modification to the processed.xml template file, which is sent when a Web Order has been processed successfully:
Note: Any HTML specified in your template should be encoded so as not to confuse the XML parser.
To ensure NSc Sync is always using the most up-to-date e-mail template files, after modifying an XML file, from the NSc Sync File menu, select Rescan Mail Templates...
Â
When a Web Order has been processed successfully, this will result in a mail in the following format being sent to the customer:
Hello John Smith, Your order is being processed! Regards, Jane Jones, Acme Stores Ltd. |
Notes on Modifying E-mail Templates
A <QUERY> tag is processed in a <SQL> block like any regular query, however, it must be a SELECT query.
You can use any valid tags as parameters in SQL statements.
All tags are substituted as text in the SQL.
Only SQL SELECT statements (either one or multiple) are allowed.
A <QUERY> tag must return a result set, otherwise, the <SQL> is evaluated as empty. If the result set is empty, the entire <SQL> block is skipped.
A <SQL> tag creates an implicit loop in processing.
To code conditional processing with field values to output content only if a particular field value is seen, this logic can be inserted in your SQL statement using a CASE statement.
The e-mail that is generated is standard HTML. You should imbed as much as possible (that is, embed CSS styles instead of linking to a remotely hosted stylesheet). It is recommended that you keep the coding as simple as possible, that is, use only standard tags that are styled using CSS. Do not attempt to position content absolutely.
NSc  Sync supports rich-text e-mails only.
Â
Send unique Templates for multiple WebStoresÂ
<!-- Only send the mail if the order contains the domainname specified... -->
<ASSERTSQL>
   SELECT domainname from nitrosell_weborderdetail where nitrosell_weborderdetail.weborderid = '<DBFIELD TABLE="ordersummary" NAME="ID"/>' and domainname='briantwo.demostore.nitrosell.com'
</ASSERTSQL>