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 |
valueSequence | number | Order for same attribute keys |
boolValue | boolean | null | Boolean value |
textValue | string | Text value |
decimalValue | number | null | Decimal value |
dateTimeValue | Date | null | DateTime value |
guidValue | string | null | Guid value |
HookItemStock
| Property name | Type | Description |
|---|---|---|
warehouse | string | Stock warehouse. |
quantity | number | Stock quantity. |
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 |
stocks | HookItemStock[] | Stock information |
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 |
valueSequence | number | Order for same attribute keys |
boolValue | boolean | null | Boolean value |
textValue | string | Text value |
decimalValue | number | null | Decimal value |
dateTimeValue | Date | null | DateTime value |
guidValue | string | null | Guid value |
HookItemStock
| Property name | Type | Description |
|---|---|---|
warehouse | string | Stock warehouse. |
quantity | number | Stock quantity. |
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 |
stocks | HookItemStock[] | Stock information |
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 |
valueSequence | number | Order for same attribute keys |
boolValue | boolean | null | Boolean value |
textValue | string | Text value |
decimalValue | number | null | Decimal value |
dateTimeValue | Date | null | DateTime value |
guidValue | string | null | Guid 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 | - |
🧩 App4SalesPlatformPreOrderExportHookContext
Hook is invoked before exporting an order to App4Sales platform, allowing for last-minute adjustments.
| Property name | Type | Description |
|---|---|---|
event | HookEvent | Event data for the hook. |
| Method | Description |
|---|---|
setCustomerCode (customCode: string): void | - |
setReference (reference: string): void | - |
setYourReference (yourReference: string): void | - |
setNotes (notes: string): void | - |
setShippingCosts (shippingCosts: number): void | - |
setExternalId (externalId: string): void | - |
setMetadata (key: string, value: object): void | - |
removeLine (index: number): void | - |
setLineItemCode (index: number, itemCode: string): void | - |
setLineQuantity (index: number, quantity: number): void | - |
setLineDiscount (index: number, discount: number | null): void | - |
setLinePrice (index: number, price: number | null): void | - |
setLineInstruction (index: number, instruction: string): void | - |
HookConnectorOrderLineCreate
| Property name | Type | Description |
|---|---|---|
sequence | number | - |
itemCode | string | - |
quantity | number | - |
unitPrice | number | - |
fromUnitPrice | number | - |
description | string | - |
HookAttribute
| Property name | Type | Description |
|---|---|---|
attributeKey | string | Attribute key |
valueSequence | number | Order for same attribute keys |
boolValue | boolean | null | Boolean value |
textValue | string | Text value |
decimalValue | number | null | Decimal value |
dateTimeValue | Date | null | DateTime value |
guidValue | string | null | Guid value |
HookConnectorOrderCreateSurchargeDto
| Property name | Type | Description |
|---|---|---|
intakeOrderSurchargeId | string | - |
type | 'Shipping' | 'Handling' | 'Payment' | 'Custom' | - |
customType | string | - |
description | string | - |
totalAmount | number | - |
vatRate | number | - |
attributes | HookAttribute[] | - |
HookConnectorOrderCreate
| Property name | Type | Description |
|---|---|---|
intakeOrderId | string | - |
customerCode | string | - |
createdAt | Date | - |
notes | string | - |
yourReference | string | - |
ourReference | string | - |
lines | HookConnectorOrderLineCreate[] | - |
surcharges | HookConnectorOrderCreateSurchargeDto[] | - |
Line
| Property name | Type | Description |
|---|---|---|
itemCode | string | - |
quantity | number | - |
discount | number | null | - |
price | number | null | - |
instruction | string | - |
HookEventApp4SalesOrderInput
| Property name | Type | Description |
|---|---|---|
customerCode | string | - |
reference | string | - |
yourReference | string | - |
notes | string | - |
shippingCosts | number | - |
lines | Line[] | - |
externalId | string | - |
HookEvent
| Property name | Type | Description |
|---|---|---|
inputOrder | HookConnectorOrderCreate | The order data from the intake order that is being exported to App4SalesPlatform. |
exportOrder | HookEventApp4SalesOrderInput | The order data to be exported to App4SalesPlatform. |