Appearance
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 name | Type | Description |
|---|---|---|
event | PreItemSyncFinalizeHookContextEvent | - |
| Method | Description |
|---|---|
setUnitOfMeasure (uomCode: string): void | Update the unit of measure code |
setVatTariffType (vatTariffType: 'Normal' | 'Low1' | 'Low2' | 'SuperLow' | 'ParkingTariff' | 'NoVat'): void | Set vat tariff type |
setFamilyCode (familyCode: string): void | Set family code |
createOrUpdateAttribute (attributeKey: string, attributeValue: object): void | Create or update an item attribute |
HookAttribute
| Property name | Type | Description |
|---|---|---|
attributeKey | string | Attribute key |
order | number | Attribute order |
boolValue | boolean | null | Boolean value |
textValue | string | Text value |
decimalValue | number | null | Decimal value |
HookItem
| Property name | Type | Description |
|---|---|---|
itemCode | string | Item code. |
uomCode | string | Unit of measure code. |
familyCode | string | Family code |
vatTariff | 'Normal' | 'Low1' | 'Low2' | 'SuperLow' | 'ParkingTariff' | 'NoVat' | VAT tariff |
attributes | HookAttribute[] | Attributes |
PreItemSyncFinalizeHookContextEvent
| Property name | Type | Description |
|---|---|---|
item | HookItem | - |
🧩 PostPricingCalculationHookContext
Hook is invoked after the pricing calculation for an item, allowing for adjustments or additional processing based on the calculated price.
| Property name | Type | Description |
|---|---|---|
event | PostPricingCalculationHookContextEvent | Event data for the hook. |
| Method | Description |
|---|---|
setUnitPrice (unitPrice: number, unitPriceFrom: number | null, includesVat: boolean): void | Set the unit price for the item. This will override the existing unit price. |
HookAttribute
| Property name | Type | Description |
|---|---|---|
attributeKey | string | Attribute key |
order | number | Attribute order |
boolValue | boolean | null | Boolean value |
textValue | string | Text value |
decimalValue | number | null | Decimal value |
HookItem
| Property name | Type | Description |
|---|---|---|
itemCode | string | Item code. |
uomCode | string | Unit of measure code. |
familyCode | string | Family code |
vatTariff | 'Normal' | 'Low1' | 'Low2' | 'SuperLow' | 'ParkingTariff' | 'NoVat' | VAT tariff |
attributes | HookAttribute[] | Attributes |
PostPricingCalculationHookContextEvent
| Property name | Type | Description |
|---|---|---|
item | HookItem | Item being processed in the hook. |
customerCode | string | Customer code for which the pricing is calculated. |
unitPrice | number | Calculated unit price. |
unitPriceFrom | number | null | Calculated unit price from. |
quantity | number | Quantity of the item. |
vatRate | number | VAT rate applied to the item. |
🧩 PreCustomerSyncFinalizeHookContext
Hook is invoked before the finalization of a single customer synchronization, allowing for last-minute adjustments or validations.
| Property name | Type | Description |
|---|---|---|
event | PreCustomerSyncFinalizeHookContextEvent | - |
| Method | Description |
|---|---|
setName (name: string): void | Update the customer name |
setCurrency (currency: string): void | Update the customer currency |
setCocNumber (cocNumber: string): void | Update the chamber of commerce number |
setVatNumber (vatNumber: string): void | Update the VAT number |
setPriceListCode (priceListCode: string): void | Update the price list code |
createOrUpdateAttribute (attributeKey: string, attributeValue: object): void | Create or update a customer attribute |
HookAttribute
| Property name | Type | Description |
|---|---|---|
attributeKey | string | Attribute key |
order | number | Attribute order |
boolValue | boolean | null | Boolean value |
textValue | string | Text value |
decimalValue | number | null | Decimal value |
HookCustomer
| Property name | Type | Description |
|---|---|---|
customerCode | string | Customer code. |
externalCustomerCode | string | External customer code. |
name | string | Customer name. |
currency | string | Customer currency. |
cocNumber | string | Chamber of Commerce number. |
vatNumber | string | VAT number. |
priceListCode | string | Price list code. |
attributes | HookAttribute[] | Customer attributes. |
PreCustomerSyncFinalizeHookContextEvent
| Property name | Type | Description |
|---|---|---|
customer | HookCustomer | - |