How To: Setup an Email for Out of Stock Items on a Sales Order

You can automatically send out emails to let customers know that some of the items on their sales order are not in stock. This is triggered when the sales order is moved by the system into Awaiting Stock in the Sales Invoice Manager.

There are two steps to creating this email:

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

Notes:

  1. The Document Rules generate an email when a customer has the following setup against them:
    1. When the customer's invoice contact has an e-mail address.
    2. If there is no email address for the invoice contact the invoice address' email address will be used.
  2. For an example of the finished screens see Resulting Email at the bottom of this page.

Setup the Message Template

  1. Open an Email Manager screen (show me how).
  2. Click in the Message Templates radio button.
  3. Press Ctrl+N or click the New item icon is the button bar's NEW button .
  4. In the Setup area:
    1. Add a template code in the 'Template Code'.
    2. Add a template description in the 'Template Desc' field.
    3. Select the 'INVOICE' from the Trigger Type drop-down.
    4. Add email addresses in the 'CC List' and/or 'BCC List' fields (Optional).
  5. Press Ctrl+S or click the disk icon is the button bar's SAVE button to save.
    Note: you need to save once you have selected the Trigger Type INVOICE so that some of the options are available once you go back into edit mode.
  6. Press Alt+E or click the green triangle icon is the buttonbar's EDIT button to enter edit mode.
  7. In the Options area:
    1. Tick the 'Use Brand Email Address' checkbox if associating the brand with the sales order (Optional).
      Note: the brand email address is setup against the brand in [ System Data | Sales Order Processing | Branding ].
    2. Tick the 'Show Pack Children' checkbox if pack children should be displayed in the email body if you are including the stock items on the quote in the body of the email.
    3. If you want to add an entry into the contact's Comm Log when the email has been sent, then tick the 'Add to Comm Log when sent' checkbox.
    4. Tick the HTML Format checkbox if the email is to be formatted using HTML.
      Note: for formatting the email body including adding images, for example the brand logo, see How To: Insert an Image into an Email.
  8. In the Template area:
    1. If not using the brand email address or wishing to override the default email address enter the email address in the 'From' field (Optional).
    2. Add a 'Subject' for the email, for example Some of the items on your sales order $SORDER_CODE are currently out of stock.
      Note: you can add tags, for example $SORDER_CODE, into the Subject area by:
    3. Placing the insertion point where you wish the tag to appear in the subject line, for example adding the sales order code.
    4. Focus on the tag in the Available Tags area.
    5. Press the upper BtnEmailArrow.jpg button next to the Subject field. This will add the tag into the place where your cursor was.
  9. We are now going to build up the information that will appear in the email about the out of stock items. To do this:
    1. Focus in the To Follow Item Template area on the right.
    2. Add the tags for example $QTY_TOFOLLOW of $STOCK_CODE - $ITEM_NAME.
      Note: only the tags with a blue background can be added.
  10. Add the body of the email in the Message Template area, see the example below and include the yellow tag $TO_FOLLOW_ITEM_TEXT in the appropriate place.
  11. Press Ctrl+S or click the disk icon is the button bar's SAVE button to save.

Email Message Template for out of stock items example

Setup the Trigger Rule

Email Trigger Rules prompt the system into creating and in some instances automatically sending emails from Khaos Control.
Note: each condition MUST be true at the same time in order for the rule to work.

  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. In the Setup area:
    1. Add the trigger rule code in the Rule Code field.
    2. Add a trigger rule description in the Rule Description field.
    3. Select INVOICE from the Trigger Type drop down.
    4. Select the message template that was created above from the Message Template drop-down.
    5. Tick the Send Email Immediately checkbox if the email is to be automatically sent and not held in the Pending emails section.
    6. Tick the Active checkbox when you wish the Trigger Rule to be enabled.
    7. Focus on NEW INVOICE STATUS in the Available Conditions area on the left, and click on the Email Add button button to add it to the Active Conditions grid.
    8. Focus in the Comparison column press F4.
    9. Select = from the options.
    10. Focus in the lookup Value column then press Ctrl+F8 and select ORDERS - AWAITING STOCK stage (you will need to scroll down).
  5. Press Ctrl+S or click the disk icon is the button bar's SAVE button to save the Trigger Rule.

Email Trigger Rule for out of stock example

Resulting Email

Resulting email for out of stock items example


Did you find this article helpful?