How To: Setup Branded 'Thank you for your order' Emails
Table Of Contents
Khaos Control can automatically create and send emails when a sales order is saved with a specific brand selected on the [ Sales Orders | Additional ] tab.
This functionality is configured in two stages:
- Create an Email Message Template.
- Create an Email Trigger Rule.
The example in this article sends an email when a new sales order is saved and moves directly into the Staging stage of the Sales Invoice Manager.
Before You Start
The automatic email process uses the customer's invoice contact details:
- If the invoice contact has an email address, the email will be sent to that address.
- If no invoice contact email address exists, the email address from the invoice address will be used instead.
For a completed example, see Email Brand Example.
Step 1: Create the Email Message Template
- Open an Email Manager screen using (show me how).
- Select the Message Templates option.
- Press Ctrl + N or click New.
- Enter a unique value in the Template Code field.
- Enter a description in the Template Description field.
- Set the Trigger Type to INVOICE.
- In the Options section, tick Use Brand Email Address.Note: The brand email address is configured in [ System Data | Sales Order Processing | Branding ].
- Tick Show Pack Children if you want products contained within packs to appear in the email.
- Tick Add to Comm Log when sent if you want an entry automatically added to the contact's communication log when the email is sent.
- Tick HTML Format if you want to use HTML formatting.Note: For guidance on formatting emails and inserting brand logos or other images, see How To: Insert an Image into an Email.
- Enter the email subject.Example:
Thank you for your order
- You can insert tags into the subject line, such as the sales order number, using the available tag list.
- Build the Item Template using the available blue item tags. These tags define how products will be displayed within the email.
- Create the main email body.Available tags can be inserted by double-clicking them. For example:
$COMPANY_NAME
- will display the customer's company name when the email is generated.
- Insert the yellow $ITEM_TEXT tag at the point where the list of products should appear within the email.
- Press Ctrl + S or click Save.
For a complete example, see the Brand Message Template Example.
Step 2: Create the Email Trigger Rule
Email Trigger Rules determine when Khaos Control should create or send emails automatically.
- Open an Email Manager screen using (show me how).
- Select Trigger Rules.
- Press Ctrl + N or click New.
- Enter a value in the Rule Code field.
- Enter a description in the Rule Description field.
- Set the Trigger Type to INVOICE.
- Select the Brand Email Template created earlier from the Message Template list.
- Tick Send Email Immediately if emails should be sent automatically rather than being held in Pending Emails.
- Tick Active when you are ready for the trigger rule to become operational.
Example Trigger Conditions
The following example sends an email when:
- A new sales order is saved.
- The order has not previously been in the Released stage.
- The order moves into the Staging stage.
- The order contains a specific brand.
Condition 1: Old Invoice Status
- Select Old Invoice Status.
- Add it to the Active Conditions grid.
- Enter:
<> in the Comparison column.
- In the Lookup Value column, press Ctrl + F8 and select:
ORDERS - RELEASED
Condition 2: New Invoice Status
- Select New Invoice Status.
- Add it to the Active Conditions grid.
- Enter:
= in the Comparison column.
- In the Lookup Value column, press Ctrl + F8 and select:
ORDERS - STAGING
Condition 3: Sales Order Brand
- Select SORDER BRAND.
- Add it to the Active Conditions grid.
- Enter:
= in the Comparison column.
- In the Lookup Value column, press Ctrl + F8 and select the required brand.
Important: The order in which conditions are added to the Active Conditions grid is important and should match the sequence shown above.
- Press Ctrl + S or click Save.
For a completed example, see Brand Trigger Rule Example.
How It Works
Once configured:
- A sales order is saved.
- The selected brand is present on the order.
- The trigger conditions are evaluated.
- The order moves into the specified Sales Invoice Manager stage.
- Khaos Control creates the email using the Brand Message Template.
- The email is either:
- Sent immediately, or
- Added to Pending Emails, depending on the trigger rule settings.
Additional Information
- Different templates and trigger rules can be created for different brands.
- Brand-specific logos, colours and email addresses can be incorporated into the message template.
- Communication Log entries can be created automatically when emails are sent.
- HTML templates allow fully branded customer communications.