How To: Setup Branded 'Thank you for your order' Emails

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:
  1. Create an Email Message Template.
  2. 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

  1. Open an Email Manager screen using (show me how).
  2. Select the Message Templates option.
  3. Press Ctrl + N or click New.
  4. Enter a unique value in the Template Code field.
  5. Enter a description in the Template Description field.
  6. Set the Trigger Type to INVOICE.
  7. In the Options section, tick Use Brand Email Address.
    Note: The brand email address is configured in [ System Data | Sales Order Processing | Branding ].
  8. Tick Show Pack Children if you want products contained within packs to appear in the email.
  9. 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.
  10. 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.
  11. Enter the email subject.
    Example:
Thank you for your order
  1. You can insert tags into the subject line, such as the sales order number, using the available tag list.
  2. Build the Item Template using the available blue item tags. These tags define how products will be displayed within the email.
  3. Create the main email body.
    Available tags can be inserted by double-clicking them. For example:
$COMPANY_NAME
  1. will display the customer's company name when the email is generated.
  2. Insert the yellow $ITEM_TEXT tag at the point where the list of products should appear within the email.
  3. 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.
  1. Open an Email Manager screen using (show me how).
  2. Select Trigger Rules.
  1. Press Ctrl + N or click New.
  2. Enter a value in the Rule Code field.
  3. Enter a description in the Rule Description field.
  4. Set the Trigger Type to INVOICE.
  5. Select the Brand Email Template created earlier from the Message Template list.
  6. Tick Send Email Immediately if emails should be sent automatically rather than being held in Pending Emails.
  7. 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

  1. Select Old Invoice Status.
  2. Add it to the Active Conditions grid.
  3. Enter:
<>  in the Comparison column.
  1. In the Lookup Value column, press Ctrl + F8 and select:
ORDERS - RELEASED

Condition 2: New Invoice Status

  1. Select New Invoice Status.
  2. Add it to the Active Conditions grid.
  3. Enter:
=  in the Comparison column.
  1. In the Lookup Value column, press Ctrl + F8 and select:
ORDERS - STAGING

Condition 3: Sales Order Brand

  1. Select SORDER BRAND.
  2. Add it to the Active Conditions grid.
  3. Enter:
=  in the Comparison column.
  1. 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.
  1. Press Ctrl + S or click Save.
For a completed example, see Brand Trigger Rule Example.

How It Works

Once configured:
  1. A sales order is saved.
  2. The selected brand is present on the order.
  3. The trigger conditions are evaluated.
  4. The order moves into the specified Sales Invoice Manager stage.
  5. Khaos Control creates the email using the Brand Message Template.
  6. 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.

Did you find this article helpful?