Use this event handler to automatically notify certain SyteLine users when an update to a customer order line amount causes the customer to exceed their credit limit. The notification can be a message sent to the SyteLine Inbox form and/or to specified external e-mail addresses.
This is the text of the notification that is sent:
To: receipient From: originator Subject: Credit Limit exceeded Body: Customer Order ordernum of amount amount has caused Customer custnum, custname to exceed their credit limit of creditlimit. Please review the order.
Variable | Description |
---|---|
recipient | For a SyteLine
Inbox message, this is the SyteLine
user name you specify in the Notify Users field on
the Workflow
Event Handler Activation form. You can specify multiple
names separated by semicolons.
For an external e-mail, this is the e-mail address you specify in the E-mail Users field on the Workflow Event Handler Activation form. You can specify multiple names separated by a semicolons. |
originator | For a SyteLine
Inbox message, this is usually the name of the SyteLine user
who performed the action that generated the message.
For an external e-mail, this is usually the e-mail address associated with the SyteLine user who performed the action that generated the message. However, if the user does not have an associated e-mail address in the Users form, or if the system cannot determine a user associated with the action, a default address or name is used. In some cases, this default is the e-mail address for the SMTP User Name associated with the intranet entered on the Site/Entities form for the site. |
ordernum | This is the number of the order on the Customer Orders form that caused the customer to go over the credit limit. |
amount | This is the price of the customer order that caused the customer to go over the credit limit. |
custnum | This is the number of the customer who went over the credit limit. |
custname | This is the name of the customer who went over the credit limit. |
creditlimit | This is the customer's credit limit on the Customers form. |
To change the subject or body of the messages, see Modifying Workflow Event Handlers.
These global constants are created by the event handler, based on the entries you make in the Workflow Event Handler Activation form:
Global Constant | Contains |
---|---|
CheckCustomerOrderAmountAndCreditLimitManagerID | Contents of the Notify Users field |
CheckCustomerOrderAmountAndCreditLimitManagerEmail | Contents of the E-Mail Users field. |
The event CustomerOrderAmountUpdate for the co or coitem table triggers this notification.