List of Hooks in Web POS
Contents |
Overview
This document lists the client side hooks hooks available in Web POS.
List of server side hooks is available in this link Server side hooks in Web POS
Hooks in Posterminal and Mobile Core
-
OBPOS_TerminalLoadedFromBackend
- Available from: RMP26
- Executed when: After online login when terminal data has been loaded from backend.
- Arguments:
-
data
: contains the data loaded from backend
-
-
OBPOS_PreOrderSave
- Available from: RMP26
- Executed when: User has confirmed the payment of a ticket, just before it is saved in local DB to be sent to backed. At this point it is still possible to do modifications in the ticket.
- Arguments:
-
receipt
: ticket that will be saved, it can be modified -
context
:OB.DATA.OrderSave
instance
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the order will not be synchronized. In this case, you should ensure that a message is displayed to the user explaining the situation
-
-
OBPOS_CheckPaymentApproval
- Available from: RMP26
- Executed when: User starts the payment process, just before the payment tab is shown. This hook is intended to do any kind of checks to allow or abort going to the payment tab.
- Arguments:
-
context
: model containing the ticket -
approved
: boolean property defaulted to true, in case after hooks execution it is false, payment tab will not be shown. -
caller
: Total Button (From 15Q4)
-
-
OBPOS_PreAddProductToOrder
- Available from: RMP26
- Executed when: User adds a product to the order, just before the product is added to the order. This hook is intended to do any kind of check to allow or abort the addition.
- Arguments:
-
context
: Enyo component which manages the event -
receipt
: The current order -
productToAdd
: The product which will be added to the ticket -
qtyToAdd
: The units of the product which will be added which to the ticket -
options
: Other data related to the event.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not add the product to the ticket.
-
-
OBPOS_AddProductToOrder
- Available from: RMP28
- Executed when: When the add product process starts (addition has been confirmed) this hook is executed. This hook is intended to change some data in the product which is being added.
- Arguments:
-
receipt
: The current order where the product will be added -
productToAdd
: The product which will be added to the ticket -
qtyToAdd
: The units of the product which will be added which to the ticket -
options
: Other data related to the event.
-
- Arguments for callback:
-
useLines
: If this property is added to the arguments and the value of this property is true the following arguments will be used to generate the new distribution of lines. Below arguments will be ignored if this argument is not true -
linesToModify
: This collection is used to modify lines which are already part of the order. Each item of the collection must have this appearance.- lineCid: The cid of the line to modify.
- newQty: The new quantity for this line.
- newPrice: The new price for the line to modify.
- productProperties: Array of property/value to set in the product model of the modified line.
- lineProperties: Array of property/value to set in the modified line.
-
linesToAdd
: This collection is used to create new lines and add them to the order. Each item of the collection must have this appearance.- product: The product of the new line
- qtyToAdd: The quatity of products of the new line.
-
linesToRemove
: This collection is used to remove lines from the order. Each item of the collection must have this appearance.- lineCidToRemove: The cid of the line to remove.
-
-
OBPOS_PostAddProductToOrder
- Available from: 3.0RR14Q4
- Executed when: When the add product process finish this hook is executed. At this point the product is included in the ticket.
- Arguments:
-
receipt
: The current order -
productToAdd
: The product which was added to the ticket -
qtyToAdd
: The units of the product which was added to the ticket -
orderline
: Order Line model. -
options
: Other data related to the event. -
newLine
: Flag to indicate if is a new line (true) or line edit (false).
-
-
OBPOS_PreDeleteCurrentOrder
- Available from: RMP26
- Executed when: User accepts the deletion of a ticket. This hook is intended to do any kind of check just before remove an order.
- Arguments:
-
context
: Enyo component which manages the event -
receipt
: The current order
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not remove the ticket.
-
-
OBPOS_PrePaymentHook
- Available from: RMP30
- Executed when: User starts the payment process, just before
OBPOS_CheckPaymentApproval
is invoked. This hook is intended to do any kind final modifications in the ticket price (such as adding/modifying discounts). Starting from the RR14Q4 release, theOBPOS_PrePaymentApproval
hook will be executed next. In versions before RR14Q4 theOBPOS_CheckPaymentApproval
will be invoked (taking into account these modifications). - Arguments:
-
context
: model containing the ticket -
caller
: Total Button (From 15Q4)
-
-
OBPOS_PrePaymentApproval
- Available from: RR14Q4
- Executed when: User starts the payment process, just after
OBPOS_PrePaymentHook
has finished but beforeOBPOS_CheckPaymentApproval
is invoked. This hook is intended to enable a limited ordering for hooks to do any kind final modifications in the ticket price (such as adding/modifying discounts), but done after the pre payment hooks have all been executed. TheOBPOS_CheckPaymentApproval
will be invoked afterwards taking into account these modifications - Arguments:
-
context
: model containing the ticket -
caller
: Total Button (From 15Q4)
-
- Arguments for callback:
- null
-
OBPOS_PrePrintPaidReceipt
- Available from: RMP31
- Executed when: A closed ticked is printed through the menu option "print". This hook is intended to do any kind of modifications in the ticket in order to print something needed in a customized ticket template.
- Arguments:
-
context
: model containing the ticket
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the ticket will not be printed.
-
-
OBPOS_BeforeCustomerSave
- Available from: RR17Q1
- Executed when: Before the actual saving process occurs.
- Arguments:
-
customer
: The customer to be saved. -
isNew
: This flag indicate if new customer or existing one. -
validations
: Boolean value.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the customer save won't be done.
-
-
OBPOS_BeforeCustomerAddrSave
- Available from: RR17Q1
- Executed when: Before the actual saving process occurs.
- Arguments:
-
customerAddr
: The customer address to be saved. -
isNew
: This flag indicate if new customer address or existing one.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the customer address save won't be done.
-
-
OBMOBC_PreWindowOpen
- Available from: RR14Q2
- Executed when: We try to navigate to another window (cash management, cash up...). Before we navigate we can add an approval or validation.
- Arguments:
-
context
: the button OB.UI.MenuWindowItem -
windows
: registered windows
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the navigation won't be done.
-
-
OBPOS_EditCashupReport
- Available from: RR14Q2
- Executed when: Cash up report is filled. We can add more info about the cash up to the cash up report.
- Arguments:
-
cashUpReport
: Cash up report object
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the navigation won't be done.
-
-
'ModelReady:' + Window name
- Available from: RR14Q2
- Executed when: The model of the window is loaded. Before launching the window:ready trigger.
- Arguments:
- null
- Arguments for callback:
- null
-
OBRETUR_ReturnFromOrig
- Available from: RR14Q2
- Executed when: We are going to load order(Paid orders, Layaways...). Before loading int he screen the order retrieved.
- Arguments:
-
order
: The order to load
-
- Arguments for callback:
-
context
: OB.UI.ListPRs, the list of retrieved orders.
-
-
OBPOS_OrderDetailContentHook
- Available from: RR14Q2
- Executed when: setting the header of the order(where hour and doc number)
- Arguments:
-
content
: The content to show -
docNo
: The document Number of the order -
order
: The current order
-
- Arguments for callback:
-
content
: The content to show
-
-
OBPOS_RenderOrderLine
- Available from: RR14Q2
- Executed when: Each order line is initializated
- Arguments:
-
orderline
: The order line component
-
- Arguments for callback:
- null
-
OBPOS_RenderListReceiptLine
- Available from: RR15Q2
- Executed when: Each open receipt line is initializated
- Arguments:
-
listReceiptLine
: The line component which represent an open receipt
-
- Arguments for callback:
- null
-
OBPOS_RenderPaidReceiptLine
- Available from: RR15Q2
- Executed when: Each paid receipt line is initializated
- Arguments:
-
paidReceiptLine:
: The line component which represent a paid receipt
-
- Arguments for callback:
- null
-
OBPOS_FindTaxRate
- Available from: RR14Q2
- Executed when: finding taxes to the order. We can edit the sql to retrieved the desired taxes.
- Arguments:
-
context
: The current order -
sql
: The sql to executed to find taxes
-
- Arguments for callback:
-
sql
: The sql to executed to find taxes
-
-
OBPOS_PreSynchData
- Available from: RR14Q2
- Executed when: Before synchronizing all the data to the backend.
- Arguments:
- null
- Arguments for callback:
- null
-
OBPOS_GroupedProductPreCreateLine
- Available from: RR14Q2
- Executed when: We add a line and before grouping to a line to creating a new line.
- Arguments:
-
receipt
: The current order -
line
: The line to add -
allLines
: All order lines -
p
: product to add -
qty
: Quantity of product -
options
: Options of the line -
attrs
: Attributes of the line
-
- Arguments for callback:
-
receipt
: The current order -
line
: The line to add -
allLines
: All order lines -
p
: product to add -
qty
: Quantity of product -
options
: Options of the line -
attrs
: Attributes of the line
-
-
OBPRINT_PrePrint
- Available from: RR14Q2
- Executed when: we are going to print something
- Arguments:
-
forcePrint
: Flag to force to print -
offline
: Flag to know if it should be printed when go online again -
order
: The current order -
template
: The template of the ticket -
forcedtemplate
: value to override template of the ticket
-
- Arguments for callback:
-
template
: The template of the ticket -
cancelOperation
: If this property is added to the arguments and the value of this property is true, print action will not be done.
-
-
OBPOS_LoadPOSWindow
- Available from: RR14Q2
- Executed when: navigating to Point of Sale window. Just before navigate.
- Arguments:
- null
- Arguments for callback:
- null
-
OBPOS_PostSyncReceipt
- Available from: RR14Q3
- Executed when: A receipt is completed, and the request to the backend to synchronize it has finished (or, if offline, has failed). Note: from RR15Q3, it can be executed before than the synced document has been processed in backoffice.
- Arguments:
-
receipt
: The completed order -
syncSuccess
: True if the order was correctly synchronized
-
- Arguments for callback:
- null
-
OBPOS_PostSyncMultiReceipt
- Available from: RR18Q4
- Executed when: Pay open tickets are completed, and the request to the backend to synchronize it has finished (or, if offline, has failed).
- Arguments:
-
receipts
: The completed orders -
syncSuccess
: True if the orders was correctly synchronized
-
- Arguments for callback:
- null
-
OBPOS_PreCustomerSave
- Available from: RR14Q3
- Executed when: A new customer is created from the POS, before the actual saving process occurs.
- Arguments:
-
inSender
: Javascript object containing a reference to the header of the edit/new customer window. -
inEvent
: Javascript object containing a reference to the Save button. -
passValidation
: Boolean value (true by default) -
error
: String value (empty by default) -
meObject
: Object which provides access to the UI elements which were filled by the end user. Thanks to this argument the developer can access to the values inserted in fields. (I.E: meObject.$.customerAttributes.$.line_customerTaxId.$.newAttribute.$.customerTaxId.getValue();)
-
- Arguments for callback:
-
inSender
: Javascript object containing a reference to the header of the edit/new customer window. -
inEvent
: Javascript object containing a reference to the Save button. -
passValidation
: If this property is added to the arguments and the value of this property is true, the callback will stop the saving process -
error
: String value to show some error text when the saving process is cancelled.
-
-
OBPOS_PreLoadUnpaidOrdersHook
- Available from: RR14Q4
- Executed when: WebPOS is loaded, before the orders are loaded.
- Arguments:
-
ordersNotPaid
: The orders that are going to be loaded -
model
: The model of the window
-
- Arguments for callback:
- null
-
OBPOS_AfterCashUpSent
- Available from: RR14Q4
- Executed when: After cash up process get answer from Backend.
- Arguments:
- null
- Arguments for callback:
- null
-
OBPOS_preRemovePayment
- Available from: RR15Q3
- Executed when: Before a payment is removed.
- Arguments:
-
paymentToRem
: The payment which is going to be removed -
payments
: The list of payments -
receipt
: The order model
-
- Arguments for callback:
- cancellation: If this property is added to the arguments and the value of this property is true, the callback will not remove the payment method.
-
OBPOS_PostCustomerSave
- Available from: RR15Q4
- Executed when: after the customer is saved locally, but before the customer object is send to the server to be saved there. So you can add/change the customer object to provide extra information to the server side logic, on the server you can also implement customer save hooks.
- Arguments:
-
customer
: The object of the bussiness partner -
bpToSave
: The object of the changed bussiness partner model
-
- Arguments for callback:
- null
-
OBPOS_PreSetPrice
- Available from: RR16Q1
- Executed when: after the cashier modifies the price of a line.
- Arguments:
-
line
: The object of the line to be modified -
price
: The new price -
context
: Order model -
options
: Other data related to the event.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the price will not be modified.
-
-
OBPOS_LineSelected
- Available from: RR16Q3
- Executed when: a receipt line is selected.
- Arguments:
-
line
: Selected receipt line. -
selectedLines
: Multiple Selected receipt lines. -
context
: Point of Sale model.
-
- Arguments for callback:
- null
-
OBPOS_BarcodeScan
- Available from: RR16Q1
- Executed when: after the cashier scans or adds manually a UPC.
- Arguments:
-
code
: The code scanned -
callback
: The callback function of the scan -
context
: The caller
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the scan will not do anything.
-
-
OBPOS_BarcodeSearch
- Available from: RR16Q1
- Executed when: after the query of searching products (while scanning) has been executed.
- Arguments:
-
dataProducts
: The list of products returned -
code
: The code scanned -
callback
: The callback function of the scan
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the scan will not do anything.
-
-
OBPOS_PaymentSelected
- Available from: RR16Q2
- Executed when: After a Payment method has been selected
- Arguments:
-
order
: The model of the current receipt -
paymentSelected
: The model of the payment that has been selected
-
- Arguments for callback:
- null
-
OBPRINT_PostPrint
- Available from: RR16Q2
- Executed when: After a receipt is printed correctly in the POS Hardware Manager. Only works for receipts with template type XML.
- Arguments:
-
receipt
: The model of the receipt -
printedReceipt
: The XML sent to be print the receipt in the POS Hardware Manager
-
- Arguments for callback:
- null
-
OBPOS_PreDeleteLine
- Available from: RR16Q2
- Executed when: Before a line or group of lines is deleted.
- Arguments:
-
order
: The model of the receipt -
selectedLines
: The lines selected to remove
-
- Arguments for callback:
-
cancelOperation
(From 17Q2): If this property is added to the arguments and the value of this property is true, then the action will be cancelled and the line will not be deleted
-
-
OBPOS_PostDeleteLine
- Available from: RR16Q2
- Executed when: After a line or group of lines is deleted.
- Arguments:
-
order
: The model of the receipt -
selectedLines
: The lines selected to remove
-
- Arguments for callback:
- null
-
OBPOS_PreSetUndo_ + action
- Available from: RR16Q2
- Executed when: Before setting an action and its callback to an undo action.
- Arguments:
-
data
: All the needed information to execute the undo action
-
- Arguments for callback:
- null
- Available Actions
- DeleteLine
- EditLine
- CreateLine
- ReturnLine
- SetBPartner
- SaveOrder
- InitializeAttr
- FixOrderLines
-
OBPOS_PreUndo_ + action
- Available from: RR18Q1
- Executed when: When clicking on the UNDO button, before the UNDO action is done.
- Arguments:
-
order
: The model of the receipt -
selectedLines
: The lines selected to remove
-
- Arguments for callback:
- null
- Available Actions
- DeleteLine
- EditLine
- CreateLine
- ReturnLine
- SetBPartner
- SaveOrder
- InitializeAttr
- FixOrderLines
-
OBPOS_PostUndo_ + action
- Available from: RR18Q1
- Executed when: When clicking on the UNDO button, after the UNDO action is done.
- Arguments:
-
order
: The model of the receipt -
selectedLines
: The lines selected to remove
-
- Arguments for callback:
- null
- Available Actions
- DeleteLine
- EditLine
- CreateLine
- ReturnLine
- SetBPartner
- SaveOrder
- InitializeAttr
- FixOrderLines
-
OBPOS_RenderCategory
- Available from: RR16Q2
- Executed when: During the rendering of the categories
- Arguments:
-
context
: context of the component
-
- Arguments for callback:
- null
-
OBMOBC_PreScanningFocus
- Available from: RR16Q3
- Executed when: During scanning focus change
- Arguments:
-
context
: context of the component -
scanMode
: boolean with the status of the scanMode
-
- Arguments for callback:
- null
-
OBPOS_PreCustomerAddrSave
- Available from: RR16Q3
- Executed when: A new customer address is created from the POS, before the actual saving process occurs.
- Arguments:
-
inSender
: Javascript object containing a reference to the header of the edit/new customer address window. -
inEvent
: Javascript object containing a reference to the Save button. -
passValidation
: Boolean value (true by default) -
error
: String value (empty by default) -
meObject
: Object which provides access to the UI elements which were filled by the end user. Thanks to this argument the developer can access to the values inserted in fields. (I.E: meObject.$.customerAddrAttributes.$.line_customerAddrCountry.$.newAttribute.$.customerAddrCountry.getValue();)
-
- Arguments for callback:
-
inSender
: Javascript object containing a reference to the header of the edit/new customer address window. -
inEvent
: Javascript object containing a reference to the Save button. -
passValidation
: If this property is added to the arguments and the value of this property is true, the callback will stop the saving process -
error
: String value to show some error text when the saving process is cancelled.
-
-
OBMOBC_ProfileDialogApply
- Available from: RR16Q4
- Executed when: On Tap Of User Modal Dialog's Apply Button .
- Arguments:
-
profileDialogProp
: The Whole ProfileDialog Component .
-
- Arguments for callback:
- null
-
OBPOS_NewReceipt
- Available from: RR16Q4
- Executed when: On Tap Of * (New Receipt) Button On POS Screen.
- Arguments:
-
newOrder
: The Whole Order Model Object .
-
- Arguments for callback:
- null
-
OBPOS_RenderProduct
- Available from: RR16Q3
- Executed when: Each time a product is rendered in the list of products.
- Arguments:
-
model
: The product component model .
-
- Arguments for callback:
- null
-
OBPOS_PreShowPane
- Available from: RR17Q1
- Executed when: User changes from one pane to another in the Web POS. I.E: From Scan to Payment window. This hook is intended to do validations at that point or add new functionality.
- Arguments:
-
context
: Enyo component which manages the event. It contains i.e. the order model. -
options
: Array with properties coming from the button pressed that executes the action. -
tabName
: The new pane to which the Web POS is navigating.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not complete the movement to the new pane.
-
-
OBPOS_PreSearchProducts
- Available from: RR17Q1
- Executed when: User searches products in search tab in Web POS. This hook is intended to do validations at that point.
- Arguments:
-
context
: Enyo component which manages the event. -
inEvent
: Javascript object containing a reference to the Search button.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not execute the search products query.
-
-
OBPOS_LayawayReceipt
- Available from: RR17Q1
- Executed when: User clicks on "Layaway this Receipt" menu entry. This hook is intended to do validations at that point or add new functionality.
- Arguments:
-
context
: Enyo component which manages the event.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not execute the code that converts the Receipt into a Layaway.
-
-
OBPOS_PrePrintCashupHook
- Available from: RR17Q2
- Executed when: It will be executed before the cashup execution. This hook is intended to add new data to the cashUp. It cannot be canceled.
- Arguments:
-
cashupModel
: Model of the cashUp.
-
-
OBPOS_PreCheckDiscount
- Available from: RR17Q2
- Executed when: It will be executed before the calculation of the discounts. This hook is intended to stop the calculation of the discounts if it does not fulfill some requirement.
- Arguments:
-
context
: Context of the caller. -
receipt
: Receipt model. -
line
: Line model.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the callback will not calculate any automatic discount.
-
-
OBPOS_PreApplyAutomaticDiscount
- Available from: RR17Q2
- Executed when: It will be executed after the proposed promotions are found but before applying them. This hook is intended to modify the list of proposed discounts.
- Arguments:
-
context
: Context of the caller. -
discountList
: As the list of promotions found.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the callback will not apply any automatic discount.
-
-
OBPOS_preApplyDiscountsHook
- Available from: RR17Q2
- Executed when: It will be executed before the discount is applied.
- Arguments:
-
context
: Context of the caller.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not add the discount.
-
-
OBPOS_PreAddPaymentButton
- Available from: RR17Q2
- Executed when: When toolbar payment tab is initialized
- Arguments:
- payment: Payment method information
- sidebuttons: Payment buttons
- Arguments for callback:
- cancelOperation: If this property is added to the arguments and the value of this property is true, the callback will not add the payment method.
-
OBPOS_AddButtonToCashManagement
- Available from: RR17Q2
- Executed when: When Cash Management window is initialized
- Arguments:
- context: Enyo component which manages the event
- buttons: Array of buttons will be added to right panel of Cash Management window. Hook implementations must be pushed a button into this array
-
OBPOS_preReversePayment
- Available from: RR17Q2
- Executed when: Before a reverse payment is created
- Arguments:
- paymentToReverse: Payment to be reversed
- payments: Payments list
- receipt: The current order
- Arguments for callback:
- cancelOperation: If this property is added to the arguments and the value of this property is true, the callback will not reverse the payment.
-
OBPOS_PreSaveCashManagements
- Available from: RR17Q2
- Executed when: Clicking in the 'Done' button of the Cash Management window (before synchronizing data).
- Arguments:
-
dropsdeps
: List of drop and deposit events.
-
-
OBPOS_AddButtonToCashManagement
- Available from: RR17Q2
- Executed when: Before adding buttons to the cash management window
- Arguments:
-
context
: Context of the caller. -
buttons
: List of buttons
-
-
OBPOS_PreAddReversalPayment
- Available from: RR17Q2
- Executed when: Executed in reverse payments process, before adding the reversal payment to the order.
- Arguments:
-
paymentToReverse
: Payment that is being reversed. -
reversalPayment
: Reversal payment that is going to add to the order. -
receipt
: Current receipt.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not add the payment to the order.
-
-
OBPOS_preRemovePaymentMultiOrder
- Available from: RR17Q2
- Executed when: In multi order, just before removing a payment from the order.
- Arguments:
-
paymentToRem
: Payment that is being removed. -
payments
: List of payment in the order.
-
-
OBPOS_MultiOrderAddPaymentLine
- Available from: RR17Q2
- Executed when: When adding a payment to the multi order.
- Arguments:
-
paymentLine
: The line that will be sent as the addPayment parameter. -
origPayment
: The original payment object that has been just generated.
-
-
OBPOS_BeforeWarehouseChange
- Available from: RR17Q3
- Executed when: When changing warehouse for a line.
- Arguments:
-
oldWarehouse
: Warehouse associated with line, object containing warehouse id, name, qty. -
newWarehouse
: User selected warehouse object. -
currentLine
: Selected receipt line.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not update new warehouse to line.
-
-
OBMOBC_PreWindowNavigate
- Available from: RR17Q3
- Executed when: Executed when navigation is done to a specific page.
- Arguments:
-
window
: Target window Object -
route
: Route of the window which is going to be opened -
params
: Selected receipt line.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, then the navigation will not be done. The system will navigate to the application default window.
-
-
OBPOS_PostBarcodeAction
- Available from: RR17Q4
- Executed when: Executed every time the scan functionality is used, just after adding the Products (if not found).
- Arguments:
-
keyboard
: The component. -
code
: The scanned code.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, then the scanning flow will stop after the hook execution.
-
-
OBPOS_preChangeBusinessPartner
- Available from: RR17Q3
- Executed when: Executed every time the business partner or their locations in the receipt have changed.
- Arguments:
-
isInvoicingChange
: Boolean to check if the change applies to the invoicing address. -
isShippingChange
: Boolean to check if the change applies to the shipping address. -
isBPChange
: Boolean to check if the change applies to the business partner. -
bp
: The business Partner associated to the receipt.
-
-
OBPOS_CheckReceiptMandatoryFields
- Available from: RR17Q3
- Executed when: WebPOS is loaded to verify is some mandatory fields are not filled, before the orders are loaded.
- Arguments:
-
ordersNotPaid
: The orders that are going to be loaded.
-
- Arguments for callback:
- null
-
OBPOS_PostPaymentDone
- Available from: RR17Q4
- Executed when: After user has clicked on the "Done" button, but before the payments have been processed to take into account the change
- Arguments:
-
receipt
: The order that is being processed. This order is always just one order, in case of Pay Open Tickets, the hook is called once per order being processed.
-
- Arguments for callback:
- null
-
OBPOS_PostDeleteRelatedServices
- Available from: RR18Q1
- Executed when: When deleting a line, this hook is executed after setting to delete all related services to a deleting product.
- Arguments:
-
receipt
: The order from where lines are being removed. -
removedLine
: The line which is being removed. -
linesToRemove
: The array in which are being stored the lines that by some external module reason will be removed after the current line (ex.: complementary products).
-
- Arguments for callback:
-
cancellation
: Possibility to finish with the execution. -
linesToRemove
: Array in which the related lines to remove are being stored.
-
-
OBPOS_preAddPayment
- Available from: RR18Q2
- Executed when: Before adding a payment to the receipt
- Arguments:
-
paymentToAdd
: Payment to be added -
payments
: Payments already added -
receipt
: The current order
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the callback will not add the payment
-
-
OBPOS_postAddPayment
- Available from: RR18Q2
- Executed when: After adding successfully a payment to the receipt
- Arguments:
-
paymentAdded
: The payment that has just been added -
payments
: Payments already added -
receipt
: The current order
-
- Arguments for callback:
- null
-
OBPOS_PreAddProductToVerifiedReturnsPopup
- Available from: RR18Q2
- Executed when: Before adding the products to the Verified Returns pop up
- Arguments:
-
product
: Product to be added.
-
- Arguments for callback:
- null
-
OBRETUR_ReturnReceiptApply
- Available from: RR19Q3
- Executed when: While clicking on Apply in Verified Returns popup and before adding the lines to the ticket.
- Arguments:
-
selectedLines
: Verified return lines to be added. -
order
: Model of the order.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the callback will not add the verified return lines to the receipt.
-
-
OBRETUR_postAddVerifiedReturnLines
- Available from: RR19Q3
- Executed when: After adding all the Verified Return lines to a ticket but just before executing the process callback.
- Arguments:
-
returnLines
: Verified return lines added. -
receipt
: Model of the order. -
originalReceipt
: JSON of original paid order.
-
- Arguments for callback:
- null
-
OBPOS_RenderSelectorLine
- Available from: RR18Q1.1
- Executed when: When rendering an order selector line
- Arguments:
-
selectorLine
: The line component that is being rendered. New properties can then be added to it.
-
- Arguments for callback:
- null
-
OBPOS_PreTapStockAddReceipt
- Available from: RR18Q3
- Executed when: When clicking to the 'Add to receipt' button in the stock window
- Arguments:
-
context
: The button 'Add to receipt'. -
params
: The attributes set in the stock window. -
line
: The line for which the stock window has been opened (or null for a new line).
-
- Arguments for callback:
-
cancelOperation
: Argument to cancel or not the flow.
-
-
OBPOS_PreDeleteSingleLine
- Available from: RR18Q3
- Executed when: Before a line is deleted
- Arguments:
-
line
: The line that is going to be deleted.
-
- Arguments for callback:
-
cancelOperation
: Cancel or not deleting the line.
-
-
OBPOS_LeftSubWindow_beforeSetShowing
- Available from: RR18Q3
- Executed when: Before the left sub window is shown.
- Arguments:
-
context
: The left sub window component. -
params
: The attributes sent in the event.
-
- Arguments for callback:
-
cancelOperation
: Argument to cancel or not the flow.
-
-
OBMOBC_PrePaymentSelected
- Available from: RR18Q4
- Executed when: Before select a payment method, this hook is executed to avoid the selection.
- Arguments:
-
receipt
: The current order. -
selectedPayment
: The selected payment method. -
btnDefinition
: Payment button definition (optional).
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the callback will not apply the payment selection.
-
-
OBPOS_PreAddProductWithoutStock
- Available from: RR18Q4
- Executed when: Before adding a discontinued (line without stock that cannot be added without stock) line to the ticket.
- Arguments:
-
allowToAdd
: If the line will be possible to be added with a validation, even without stock. -
allowMessage RR19Q3
: Message to show in the popup that tells that is possible to add the product even without stock. -
notAllowMessage RR19Q3
: Message to show in the popup that tells that is not possible to add the product without stock. -
askConfirmation RR19Q3
: Value to show the popup to tell the user that is possible or not to add the product without stock. -
order
: The order to which the product is being added. -
line
: Line, if was previously created. -
product
: Product that is being added to the ticket. -
attrs RR19Q3
: Attributes with parameters set to the process.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not apply the payment selection. -
allowToAdd
: Same definition to the in value, but can be modified in the hook to update it. -
allowMessage RR19Q3
: Same definition to the in value, but can be modified in the hook to update it. -
notAllowMessage RR19Q3
: Same definition to the in value, but can be modified in the hook to update it. -
askConfirmation RR19Q3
: Same definition to the in value, but can be modified in the hook to update it.
-
-
OBPOS_hookPostMultiOrder
- Available from: RR18Q4
- Executed when: After Multi Order view is opened.
- Arguments:
-
context
: Enyo component which manages the event -
multiOrdersList
: The list of selected orders. -
cancellation
: If this property is added to the arguments and the value of this property is true, the callback will return to single receipt WebPOS view.
-
-
OBPOS_PreMultiOrderLayaway
- Available from: RR19Q1
- Executed when: When the 'Apply' button is clicked in the popup to set a total amount to layaway in the 'Pay Open Tickets' flow.
- Arguments:
-
amount
: The amount that is setting to pay. -
order
: The ticket which is setting the quantity to pay. -
context
: The information of the context.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the callback will not apply the payment selection.
-
-
OBPOS_PostDocumentSequenceUpdated
- Available from: RR19Q1
- Executed when: When the terminal sequence have been updated during the login.
- Arguments:
-
tx
: The WebSQL transaction that is being executed.
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not apply the payment selection.
-
-
OBPOS_PostAddPaidReceipt
- Available from: RR19Q2
- Executed when: After the addPaidReceipt function is executed, when an order is loaded in WebPOS.
- Arguments:
-
order
: The model of the order being loaded.
-
- Arguments for callback:
-
order
: The model of the order being loaded.
-
-
OBPOS_ServicePriceRules_PreSetPriceToLine
- Available from: RR19Q3
- Executed when: When the Service Price Rules have finished executing and the new price of the service is going to be set.
- Arguments:
-
newprice
: The new price of the service -
line
: The order line model of the service -
priceChanged
: Boolean indicating if the price change was real or not (the price rules were not executed)
-
- Arguments for callback:
-
newprice
: The new price of the service.
-
-
OBPOS_LoadRelatedServices_ExtendCriteria
- Available from: RR19Q3
- Executed when: When a product is added to a ticket in local mode (non-remote), and related services are being loaded.
- Arguments:
-
criteria
: The initial criteria object (including where clause and parameters) used to search for services.
-
- Arguments for callback:
-
criteria
: The final criteria object used to search for services.
-
-
OBPOS_CheckStockAddProduct
- Available from: RR19Q3
- Executed when: Adding a product to the receipt, or updating a product quantity (except if the quantity deletes the product). It is only executed when the Web POS Check Stock Lines preference is set. This hook is used to update the checkStock value to check the stock when adding/updating the quantity of a line in the receipt.
- Arguments:
-
order
: Order that is being updated. -
product
: Product that is being added. -
line
: Line (if the line is not new) that is being updated. -
qty
: Quantity that is being added. -
checkStock
: Value that tells if the stock must be checked.
-
- Arguments for callback:
-
cancelOperation
: If true, the flow must be stopped. -
checkStock
: The same description to the in value, but can be modified during the hook.
-
-
OBPOS_CheckStockDeleteLine
- Available from: RR19Q3
- Executed when: Deleting a line from the ticket. It is only executed when the Web POS Check Stock Lines preference is set. This hook is used to update the checkStock value to check the stock when deleting a line from the receipt.
- Arguments:
-
order
: Order that is being updated. -
line
: Line that is being deleted. -
checkStock
: Value that tells if the stock must be checked.
-
- Arguments for callback:
-
cancelOperation
: If true, the flow must be stopped. -
checkStock
: The same description to the in value, but can be modified during the hook.
-
-
OBPOS_CheckStockReturnLine
- Available from: RR19Q3
- Executed when: Doing a return line in the ticket. It is only executed when the Web POS Check Stock Lines preference is set. This hook is used to update the checkStock value to check the stock when returning a line in the receipt.
- Arguments:
-
order
: Order that is being updated. -
line
: Line that is being returned. -
checkStock
: Value that tells if the stock must be checked.
-
- Arguments for callback:
-
cancelOperation
: If true, the flow must be stopped. -
checkStock
: The same description to the in value, but can be modified during the hook.
-
-
OBPOS_CheckStockPrePayment
- Available from: RR19Q3
- Executed when: Clicking in the total amount button. This hook is used to update the checkStock value to check the stock of the order lines when clicking on it.
- Arguments:
-
order
: Order that is going to be paid. -
orders
: Orders that are going to be paid. In case the flow is not the Pay Open Tickets flow, the array contains only the active order. -
line
: Line that is being checked. -
checkStock
: Value that tells if the stock must be checked.
-
- Arguments for callback:
-
cancelOperation
: If true, the flow must be stopped. -
checkStock
: The same description to the in value, but can be modified during the hook.
-
-
OBPOS_PreAddProductWithStock
- Available from: RR19Q3
- Executed when: After a stock check has been done with success response.
- Arguments:
-
order
: Order that is being checked. -
line
: Line (if exists) that is being checked. -
product
: Product that is being checked.
-
- Arguments for callback:
-
cancelOperation
: If true, the flow must be stopped.
-
-
OBPOS_PreCreateQuotationFromOrder
- Available from: RR19Q3
- Executed when: Before creating a Quotation from an Order
- Arguments:
-
order
: The Order that is going to be a Quotation
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not create the Quotation.
-
-
OBPOS_PreApplyNewDiscountEngine
- Available from: RR19Q4.1
- Executed when: Before new discounts engine calculation. This hook must be always synchronous.
- Arguments:
-
receipt
: The receipt with the products to apply discounts -
rules
: Array with plain javascript objects. Contains the list of discounts rules that can be applied
-
-
OBPOS_ValidatePaymentAmount
- Available from: RR22Q4
- Executed when: Before a group provider or cash payment is being processed.
- Arguments:
-
receipt
: The receipt with the transaction information -
amount
: The amount of the payment that is going to be processed. -
paymentData
: Will include the list of payments that are going to process the payment. In case of group provider this list can be grater than one. Also it includes an array called validationData where information to be added to the payment can be stored.
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the payment wont be processed. -
validationData
: If properties are added to this argument they will be added to the payment data information values array. The properties added to this array must include the name of the field to populate in payment in table and its value.
-
Hooks in modules
Gift Cards
-
GCNV_PreFindGiftCard
- Available from: RR17Q2
- Executed when: Before search a giftcard in the backend
- Arguments:
- giftcardid: Giftcard identifier to search
- giftcard: Giftcard model
- Arguments for callback:
- cancellation: If this property is added to the arguments and the value of this property is true, the callback will not find gifcard.
-
GCNV_PostFindGiftCard
- Available from: RR17Q2
- Executed when: After search a giftcard in the backend
- Arguments:
- giftcard: Giftcard found
- Arguments for callback:
- cancellation: If this property is added to the arguments and the value of this property is true, the callback will not show gifcard detail dialog.
-
GCNV_PrePrintGiftCard
- Available from: RR19Q3
- Executed when: Before printing a gift card. Allows to extend the available properties to be printed.
- Arguments:
- giftCard: Gift Card to be printed.
- giftCardData: Gift Card information available for printing.
- order: order model.
- originator: The UI component from where the printing process has been triggered.
- Arguments for callback:
- cancellation: null
Combo
-
OBPOS_PreTapComboApplyButton
- Available from: 3.0RR16Q2
- Executed when: When the 'Apply' button is clicked in the combo popup.
- Arguments:
-
context
: The current context -
comboId
: The id of the combo -
order
: The current order
-
- Arguments for callback:
-
cancelOperation
: If this property is added to the arguments and the value of this property is true, the callback will not add the products to the ticket.
-
Digital Coupons
-
obidcoPreAddCouponHook
- Available from: 3.0RR17Q4
- Executed when: When a new coupon is added on the Digital Coupons popup.
- Arguments:
-
digitalCouponWindow
: A reference to the Digital Coupons popup
-
- Arguments for callback:
-
cancellation
: If this property is added to the arguments and the value of this property is true, the callback will not add the coupon to the payment.
-
Sessions
-
POSS_PreInitialCount
- Available from: RR22Q1
- Executed when: Before doing the initial count
- Arguments:
-
initialCountPayments
: Initial Count payment details with amount and respective coins.
-
- Arguments for callback:
-
cancellation
: Argument to cancel the execution or not. If true, application will be logged out.
-
-
POSS_PostInitialCount
- Available from: RR18Q2
- Executed when: After doing the initial count
- Arguments:
-
terminal
: Terminal that is being loaded
-
- Arguments for callback:
-
cancellation
: Argument to cancel the execution or not. If true, application will be logged out.
-
-
OBPOS_ChangeBusinessDateHook
- Available from: RR18Q4
- Executed when: After the business date is changed (and only if it is changed, either because the store was closed and opened in a different business date, or if the terminal has a local business date which doesn't correspond to the device date and we are offline)
- Arguments:
- Arguments for callback:
-
POSS_PreSetBusinessDate
- Available from: RR19Q3
- Executed when: Before setting a new business date to the terminal.
- Arguments:
-
context
: Context. -
businessdate
: New business date to be set.
-
- Arguments for callback:
-
cancellation
: Argument to cancel the execution or not
-
Simplified Invoice Threshold for Retail
-
OBSIT_CheckTaxableCustomer
- Available from: 3.0RR20Q4
- Executed when: When Checkout button is clicked, before paying a ticket.
- Arguments:
-
receipt
: The current receipt.
-
- Arguments for callback:
-
isTaxable
: If this property is set to true for current receipt business partner, the callback will validate simplified invoice using defined threshold for VAT taxable person instead of threshold for non VAT taxable person.
-