How To: Setup a 'Your Order has Shipped' Email with a link to Track Package


There are two steps to creating emails that are automatically created as a result of orders moving from one stage in the Sales Invoice Manager, for example shipping, to another such as invoice and sent with a link to track a package:

  1. Setup the Message Template
  2. Setup the Trigger Rule

Screenshots of the screens can be found on this page How To: Setup a 'Your Order has Shipped' Email with a link to Track Package - Screenshots.

Note: 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.
  • When there is no email address for the invoice contact the invoice address' email address will be used.

Setup the Message Template

Create and setup the message template of Trigger Type INVOICE, see How To: Setup Email Templates.

In the main body of the message where you want the link to appear, add the courier followed by the $CONSIGNMENT_REF tag for example:

  • DHL: http://www.dhl.co.uk/content/gb/en/express/tracking.shtml?position=right&brand=DHL&AWB=$CONSIGNMENT_REF
  • DPD: http://www.dpd.co.uk/tracking/trackingSearch.do?search.searchType=0&search.parcelNumber=$CONSIGNMENT_REF
  • Royal Mail: http://www.royalmail.com/portal/rm/track?trackNumber=$CONSIGNMENT_REF
  • TNT: https://www.tnt.com/express/en_gb/site/shipping-tools/tracking.html?searchType=con&cons=$CONSIGNMENT_REF
  • Parcelforce: http://www.parcelforce.com/track-trace?trackNumber=$CONSIGNMENT_REF

To see what this looks like check out the images on this page, How To: Setup a 'Your Order has Shipped' Email with a link to Track Package - Screenshots.

Setup the Trigger Rule

Email Trigger Rules prompt the system into creating and in some instances automatically sending emails from Khaos Control.

You would need to create a Trigger Rule for each of your couriers.

  1. Open an Email Manager screen (show me how).
  2. Click in the Trigger Rules radio button to display existing trigger rules.
  3. Press Ctrl+N or click the New item icon is the button bar's NEW button .
  4. Add the trigger rule code in the Rule Code field.
  5. Add a trigger rule description in the Rule Description field.
  6. Select INVOICE from the Trigger Type drop down.
  7. Select the shipped message template for the specified courier, that was created above, from the Message Template drop-down.
  8. Tick the 'Send Email Immediately' checkbox if the email is to be automatically sent and not held in the Pending emails section.
  9. Tick the 'Active' checkbox when you wish the Trigger Rule to be enabled.
  10. There are many different ways to setup a shipped rule and they depend on your business processes and the order of stages in the Sales Invoice Manager. In this example when the invoice goes from shipping into Issue and is of the specified courier, the email will be created and sent:
    1. Focus on Old Invoice Status in the Available Conditions.
    2. Click on the BtnEmailArrow.jpg button to add it to the Active Conditions grid.
    3. Focus in the Comparison column and press =.
    4. Focus in the lookup Value column then press Ctrl+F8 and select orders - Shipping stage.
    5. Focus on New Invoice Status in the Available Conditions.
    6. Click on the BtnEmailArrow.jpg button to add it to the Active Conditions grid.
    7. Focus in the Comparison column and press =.
    8. Focus in the lookup Value column then press Ctrl+F8 and select orders - Issue stage.
    9. Focus on Courier in the Available Conditions.
    10. Click on the BtnEmailArrow.jpg button to add it to the Active Conditions grid.
    11. Focus in the Comparison column and press =.
    12. Focus in the lookup Value column then press Ctrl+F8 and select the courier from the drop-down.
  11. Press Ctrl+S or click the disk icon is the button bar's SAVE button to save the Trigger Rule.

To see what this looks like check out the images on this page, How To: Setup a 'Your Order has Shipped' Email with a link to Track Package - Screenshots.

Courier Links

The courier reference entered against a sales order can by "hyperlinked" to a website.

  1. DHL: http://www.dhl.co.uk/content/gb/en/express/tracking.shtml?position=right&brand=DHL&AWB=
    • For testing DHL use for UK deliveries 14 digits e.g. 41505910017952.
  2. DPD: http://www.dpd.co.uk/tracking/trackingSearch.do?search.searchType=0&search.parcelNumber=
    • For testing DPD use a 12 digit number with no gaps.
  3. Royal Mail: http://www.royalmail.com/portal/rm/track?trackNumber=
    • For testing Royal Mail the consignment ref should start with EC followed by 9 digits and end with GB, e.g. EC080250821GB.
  4. TNT: https://www.tnt.com/express/en_gb/site/shipping-tools/tracking.html?searchType=con&cons=
    • For testing TNT use 9 digits or starts with GD, then 6 digits and ends with WW.
  5. Parcelforce: http://www.parcelforce.com/track-trace?trackNumber=
    • For testing Parcelforce use the following:
      • Parcelforce Worldwide tracking numbers are either 9, 13 or 14 characters with no spaces.
      • Royal Mail tracking codes are between 11 and 21 characters.

Note: these links maybe subject to change. Please check with your courier to make sure you are using the correct link.


See Also


Did you find this article helpful?