Set Customer Event
This event is fired when a customer has already been set to a sale. It is numbered as event #5000
Parameters
Symbol | Value |
%ctx.number.1% | The customer id being set. This will be a non zero value, but can
be a positive or negative number |
%data.workingsale.???% |
(P1856) Allows direct access to all symbols on the current sale that fired this event |
%data.workingcustomer.???% |
(P1856) Allows access to all symbols about the customer record involved in this event |
Internal Operation
Setting a customer on a sale broadly has the following sequence of events
- Checks to ensure customer can be changed are performed. Block action if not permitted. If
the request fails at this step the "Set Customer Failure" event is fired for logging purposes.
- Checks to see if same customer is being set again, exit if so
- Set Customer Request event fired. This event can either block or allow the customer to
be set to this sale
- The sale record is updated with the new customer reference details
- POS reward programs loaded
- Set Customer event fired. This is advising the customer has been changed.
- Customer priceband is selected
- Customer specific receipt format loaded
- External loyalty scheme (eg Flybuy membership) information loaded
- The "birthday check" is processed and alerted to teller, if enabled
- UI is advised of changes
- Customer specific scripts executed. These are scripts that are defined per customer to be executed
when they are set to a sale
- Preferred purchase items are checked and loaded if approved. This is a speed saving technique to preload
sales where the customer typically purchases the same items.
- The sale is scanned to see if any rewards can be applied now. Only undertaken if customer
is being set for a sale with items, skipped if sale is currently blank
Return Values
This event is unable to influence the outcome of operation. It is called for advisory purposes only.
Examples
:event(5000)
var custname = data(workingcustomer.name)
message(99,1,"Say hello to "+custname)