How To: Email a Customer with their Unique Alias Offer Code
Table Of Contents
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:
- A Message Template containing the customer's unique Alias Offer Code.
- 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:
- Set up the Unique Alias Offer Codes using Keycodes.
- Configure Khaos Control to Automatically Generate Unique Alias Codes for Customers.
- Create the Email Template used to send customers their Unique Alias Offer Code.
- Make sure customers who should receive the email have a valid email address.
Create the Trigger Rule
- Open the Email Manager screen. If you need help, see How To: Open the Email Manager.
- Select Trigger Rules, then click GO to display your existing rules.Note: To open an existing Trigger Rule, double-click it in the list.
- Press Ctrl+N or click New to create a Trigger Rule.
- Enter a unique code in Rule Code.
- Enter a suitable description in Rule Description.
- Set Trigger Type to INVOICE.
- Select the Message Template you created for the customer's Alias Offer Code.
- If you want the email to be sent automatically rather than held in Pending Emails, tick Send Email Immediately.
- 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.
- 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.
- Move these conditions from Available Conditions to Active Conditions:
- OLD INVOICE STATUS
- NEW INVOICE STATUS
- For OLD INVOICE STATUS, click in Comparison, press F4 and select =.
- Click in its Lookup Value field and press Ctrl+F8 to open Make a Selection.
- Select ORDERS - ISSUE.
- Click OK.
- For NEW INVOICE STATUS, click in Comparison, press F4 and select =.
- Click in its Lookup Value field and press Ctrl+F8.
- Select ISSUED - CURRENT.
- 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.