"hooks": "./hooks.json"
The hooks entry links to a json file, relative to the 'package.json' file. This file lists all registered hooks inside the hooks property:
"hooks": [ {"name": "dw.order.shippingorder.updateShippingOrderItem", "script": "./shippingOrderUpdate.ds"}, ]A hook entry has a 'name' and a 'script' property.
- The 'name' contains the extension point, the hook name.
- The 'script' contains the script relative to the hooks file, with the exported hook function.
Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.
The function is called by extension point extensionPointAfterStatusChange. The implementation of this hook is optional. If defined the hook is called after extensionPointChangeStatus or respectively after extensionPointShippingOrderShipped, extensionPointShippingOrderCancelled or extensionPointShippingOrderWarehouse Runs inside of a transaction.
The function is called by extension point extensionPointChangeStatus. Runs inside a transaction together with the hooks extensionPointResolveShippingOrder extensionPointUpdateShippingOrderItem.
Runs after the iteration over the input's items collection as the last step in this transaction. The implementation of this hook is mandatory.
The function is called by extension point extensionPointCreateShippingOrders. It is responsible for creating shipping orders and its items for the order. Preparations for shipping order creation can be done before in hook extensionPointPrepareCreateShippingOrders. Runs inside of a transaction. The implementation of this hook is mandatory.
The function is called by extension point extensionPointNotifyStatusChange. The implementation of this hook is optional. If defined the hook is called after extensionPointAfterStatusChange as the last step in the shipping order update process. Runs outside of a transaction.
The function is called by extension point extensionPointPrepareCreateShippingOrders. Runs inside its own transaction. The value of the return status is used to control whether hook createShippingOrders(Order) is called for the order or not. The implementation of this hook is mandatory.
- Status.OK successful preparation - continue with shipping order creation for this order.
- Status.ERROR failed preparation - skip shipping order creation for this order.
The function is called by extension point extensionPointResolveShippingOrder. Runs inside a transaction together with the hooks extensionPointUpdateShippingOrderItem extensionPointChangeStatus. The implementation of this hook is mandatory.
The function is called by extension point extensionPointShippingOrderCancelled. This is an optional hook that can be implemented to have full control over status change to destination status Cancelled. The following hooks will be skipped if an implementation for this hook is registered: extensionPointResolveShippingOrder, extensionPointUpdateShippingOrderItem, extensionPointChangeStatus. Runs inside of a transaction.
The function is called by extension point extensionPointShippingOrderShipped. This is an optional hook that can be implemented to have full control over status change to destination status Shipped. The following hooks will be skipped if an implementation for this hook is registered: extensionPointResolveShippingOrder extensionPointUpdateShippingOrderItem, extensionPointChangeStatus. Runs inside of a transaction.
The function is called by extension point extensionPointShippingOrderWarehouse. This is an optional hook that can be implemented to have full control over status change to destination status Warehouse. The following hooks will be skipped if an implementation for this hook is registered: extensionPointResolveShippingOrder, extensionPointUpdateShippingOrderItem, extensionPointChangeStatus. Runs inside of a transaction.
The function is called by extension point extensionPointUpdateShippingOrderItem. Runs inside a transaction together with the hooks extensionPointResolveShippingOrder extensionPointChangeStatus. The implementation of this hook is mandatory.