How To: Setup Branded 'Thank you for your order' Emails
There are two steps to creating emails that are automatically created and sent for sales orders that have a specific brand in their [ Sales Orders | Additional ]
tab:
- Setup the Message Template
- Setup the Trigger Rule
Notes:
- The Document Rules generate an email when a customer has the following set-up against them:
- When the customer's invoice contact has an e-mail address.
- If there is no email address for the invoice contact the invoice address' email address will be used.
- For an example of the finished screens see Email Brand Example.
The example below is for a new sales order with a brand that on save goes into Staging in the Sales Invoice Manager.
Setup the Message Template
- Open an Email Manager screen .
- Click in the Message Templates radio button.
- Press Ctrl+N or click .
- Add a template code in the Template Code.
- Add a template description in the Template Desc field.
- Select the 'INVOICE' from the Trigger Type drop-down.
- In the Options section tick the 'Use Brand Email Address' checkbox.
Note: the brand email address is setup against the brand in[ System Data | Sales Order Processing | Branding ]
. - Tick the 'Show Pack Children' checkbox if pack children should be displayed in the body of the email.
- If you want to add an entry into the contact's Comm Log when the email has been sent then tick the 'Add to Comm Log when sent' checkbox.
- Tick the 'HTML Format' checkbox if the email is to be formatted using HTML.
Note: for formatting the email body including adding images, for example the brand logo, see How To: Insert an Image into an Email. - Add a Subject for the email, for example Thank you for your order.
Note: you can add tags into the Subject area by selecting them and using the upper button, for example adding the sales order code. - Build the Item Template to show stock items being shipped by adding the relevant tags with the blue background to the Item Template field using the button adjacent to the Item Template field.
- Add the body of the email into the Message Template. The available tags to the right can be added into the body of the message are details that can be taken from the invoice, for example, tag $COMPANY_NAME will print out the name of the company that the invoice is for when the email is generated. They are added by double clicking the tag which is introduced into the message text at the cursor position, for an example see the example of a message template for a new sales order with a brand
- Add the yellow $ITEM_TEXT tag where you wish the list of items being shipped to be placed in the body of the message template.
- Press Ctrl+S or click to save the Message Template, for an example of the resulting template see brand message template example.
Setup the Trigger Rule
Email Trigger Rules prompt the system into creating and in some instances automatically sending emails from Khaos Control.
- Open an Email Manager screen .
- Click in the Trigger Rules radio button to display existing trigger rules.
- Press Ctrl+N or click .
- Add the trigger rule code in the Rule Code field.
- Add a trigger rule description in the Rule Description field.
- Select INVOICE from the Trigger Type drop down.
- Select the brand message template that was created above from the Message Template drop-down.
- Tick the Send Email Immediately checkbox if the email is to be automatically sent and not held in the Pending emails section.
- Tick the Active checkbox when you wish the Trigger Rule to be enabled.
- There are many different ways to setup triggers, below is an example of setting up a trigger so that when a new sales order is saved, has a brand, has not been in the Released stage but goes straight into Staging, then the system will be triggered to create and send an email:
- Focus on Old Invoice Status and click on the button to add it to the Active Conditions grid.
- Focus in the Comparison column and enter <>.
- Focus in the lookup Value column then press Ctrl+F8 and select ORDERS - RELEASED stage.
- Focus on New Invoice Status and click on the button to add it to the Active Conditions grid.
- Focus in the Comparison column and enter =.
- Focus in the lookup Value column then press Ctrl+F8 and select ORDERS - STAGING stage.
- Focus on SORDER BRAND and click on the button to add it to the Active Conditions grid.
- Focus in the Comparison column and enter =.
- Focus in the lookup Value column then press Ctrl+F8 and select your brand.
Note: it is important to get the order the triggers are added to the Active Conditions grid correct.
- Press Ctrl+S or click to save the Trigger Rule, for an example of a trigger rule see brand trigger rule example.