Skip to content

Hooks ​

Hooks are a moment in the lifetime of the application where you can extend or change the default behavior of the application.

🧩 PreItemSyncFinalizeHookContext

Hook is invoked before the finalization of a single item synchronization, allowing for last-minute adjustments or validations.

Property nameTypeDescription
eventPreItemSyncFinalizeHookContextEvent-
MethodDescription
setUnitOfMeasure (uomCode: string): voidUpdate the unit of measure code
setVatTariffType (vatTariffType: 'Normal' | 'Low1' | 'Low2' | 'SuperLow' | 'ParkingTariff' | 'NoVat'): voidSet vat tariff type
setFamilyCode (familyCode: string): voidSet family code
createOrUpdateAttribute (attributeKey: string, attributeValue: object): voidCreate or update an item attribute

HookAttribute

Property nameTypeDescription
attributeKeystringAttribute key
ordernumberAttribute order
boolValueboolean | nullBoolean value
textValuestringText value
decimalValuenumber | nullDecimal value

HookItem

Property nameTypeDescription
itemCodestringItem code.
uomCodestringUnit of measure code.
familyCodestringFamily code
vatTariff'Normal' | 'Low1' | 'Low2' | 'SuperLow' | 'ParkingTariff' | 'NoVat'VAT tariff
attributesHookAttribute[]Attributes

PreItemSyncFinalizeHookContextEvent

Property nameTypeDescription
itemHookItem-

🧩 PostPricingCalculationHookContext

Hook is invoked after the pricing calculation for an item, allowing for adjustments or additional processing based on the calculated price.

Property nameTypeDescription
eventPostPricingCalculationHookContextEventEvent data for the hook.
MethodDescription
setUnitPrice (unitPrice: number, unitPriceFrom: number | null, includesVat: boolean): voidSet the unit price for the item. This will override the existing unit price.

HookAttribute

Property nameTypeDescription
attributeKeystringAttribute key
ordernumberAttribute order
boolValueboolean | nullBoolean value
textValuestringText value
decimalValuenumber | nullDecimal value

HookItem

Property nameTypeDescription
itemCodestringItem code.
uomCodestringUnit of measure code.
familyCodestringFamily code
vatTariff'Normal' | 'Low1' | 'Low2' | 'SuperLow' | 'ParkingTariff' | 'NoVat'VAT tariff
attributesHookAttribute[]Attributes

PostPricingCalculationHookContextEvent

Property nameTypeDescription
itemHookItemItem being processed in the hook.
customerCodestringCustomer code for which the pricing is calculated.
unitPricenumberCalculated unit price.
unitPriceFromnumber | nullCalculated unit price from.
quantitynumberQuantity of the item.
vatRatenumberVAT rate applied to the item.