Check and Approve CO Line Disc % - Workflow Event Handler

Use this event handler to automatically notify certain people when the Discount Percentage on a Customer Order Line was set to a percentage that is greater than the percentage you specify in this event handler. The message also prompts for a Yes/No response to approve the change. Based on the response, the event handler sends an approval or rejection notification to the originator. Both notifications are messages sent to the SyteLine Inbox form.

This is the text of the notification that is sent:


To: receipient
From: originator
Subject: Sales Order Discount exceeds company policy
Body: Customer Order ordernum Line line Item item Discount disc
has been updated and exceeds the discount policy of setdiscount
or greater. Please review the order and indicate your approval on
the Response tab. 
Question: Do you approve this discount? 
Choices: Yes and No.
	

If the response is Yes, this message is sent to the originator's SyteLine Inbox:


To: originator
From: receipient
Subject: Sales Order Discount accepted
Body: Customer Order ordernum Line line Item item Discount disc
has been accepted as an exception to the discount policy of 
setdiscount or greater. 

If the response is No, this message is sent to the originator's SyteLine Inbox:


To: originator
From: receipient
Subject: Sales Order Discount rejected
Body: Customer Order ordernum Line line Item item Discount disc
has been rejected. 

Variable Information

Variable Description
recipient For an Inbox message, this is the user name you specify in the Notify Users field on the Workflow Event Handler Activation form. You can specify multiple names separated by semicolons.
originator For an Inbox message, this is usually the name of the user who performed the action that generated the message.
setdiscount This is the discount percentage you specify in the Disc % field on the Workflow Event Handler Activation form. It is a corporate standard discount.
ordernum This is the customer order number where the discount percentage was changed.
line This is the line on the customer order where the discount percentage was changed.
item This is the item on the customer order line where the discount percentage was changed.
disc This is the discount percentage that was changed on the Customer Order Lines form.

Global Constants

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
CheckOrderLineDiscountPercentageApproverID Contents of the Notify Users field
CheckOrderLineDiscountPercentageLimit Contents of the Disc % field

Associated Event and IDO

The events IdoOnItemInsert and IdoOnItemUpdate for the SLCoitems IDO trigger this notification.