How To: Email a Customer with their Unique Alias Offer Code

Once you have created your Alias Keycodes and configured Khaos Control to automatically generate unique Alias Codes, you can email each customer their individual offer code. 

This requires:
  1. A Message Template containing the customer's unique Alias Offer Code.
  2. A Trigger Rule that generates the email when the Sales Order is issued.
Important: The Alias Offer Code is generated when the Sales Order is issued. The email Trigger Rule must therefore run after the order has been issued.

Prerequisites

Before creating the Trigger Rule:

Create the Trigger Rule

  1. Open the Email Manager screen. If you need help, see How To: Open the Email Manager.
  2. Select Trigger Rules, then click GO to display your existing rules.
    Note: To open an existing Trigger Rule, double-click it in the list.
  3. Press Ctrl+N or click New to create a Trigger Rule.
  4. Enter a unique code in Rule Code.
  5. Enter a suitable description in Rule Description.
  6. Set Trigger Type to INVOICE.
  7. Select the Message Template you created for the customer's Alias Offer Code.
  8. If you want the email to be sent automatically rather than held in Pending Emails, tick Send Email Immediately.
  9. Tick Active when you are ready for the Trigger Rule to run.
    Tip: You can leave Active unticked while you finish configuring and testing the rule, then activate it when you are ready to use it.
  10. If you only want to email customers who have opted into your mailing list, tick Subscribers Only.
    This limits the email to customers who have E-Mailing List Subscriber ticked under Customer | Detail | Address.

Configure the Trigger Conditions

The Trigger Rule needs to detect the Sales Order moving from the Issue stage into its issued state.
  1. Move these conditions from Available Conditions to Active Conditions:
    • OLD INVOICE STATUS
    • NEW INVOICE STATUS
  2. For OLD INVOICE STATUS, click in Comparison, press F4 and select =.
  3. Click in its Lookup Value field and press Ctrl+F8 to open Make a Selection.
  4. Select ORDERS - ISSUE.
  5. Click OK.
  6. For NEW INVOICE STATUS, click in Comparison, press F4 and select =.
  7. Click in its Lookup Value field and press Ctrl+F8.
  8. Select ISSUED - CURRENT.
  9. Click OK.
The Active Conditions should therefore require:
  • OLD INVOICE STATUS = ORDERS - ISSUE
  • NEW INVOICE STATUS = ISSUED - CURRENT

Add additional conditions

Add further conditions if you need to restrict who receives the email.
For example, you could limit the Trigger Rule to a specific Company Class.
Important: All Active Conditions must be true at the same time for the Trigger Rule to run.

Save the Trigger Rule

Press Ctrl+S or click Save.

The Trigger Rule is now configured. Once it is active, qualifying Sales Orders moving from ORDERS - ISSUE to ISSUED - CURRENT can generate the email containing the customer's Unique Alias Offer Code.
Important: The Trigger cannot run before the Sales Order is issued because this is when Khaos Control generates the customer's unique Alias Offer Code.

Did you find this article helpful?