Skip to main content

Agent payloads

Each agent type receives a requestMetadata.payload object in the webhook request body containing the full context of the current view. The payload structure depends on the agent type. All payloads reflect the state of the object at the moment the agent dialog is opened.

Webhook body structure

The top-level body sent to the webhook has the following fields:

FieldDescription
typeThe agent type that triggered the request (for example SALES_HUB_ORDER_EDITOR)
adminUserIdThe backoffice user who triggered the agent
requestMessageThe user's message. Present for chat agents, absent for button agents
conversationIdPresent for follow-up messages in multi-turn conversations
requestMetadata.payloadThe full page context. Structure varies by agent type (see below)

Tender payload

Used by SALES_HUB_QUOTE_EDITOR, SALES_HUB_ORDER_EDITOR and SALES_HUB_QUOTE_REQUEST_EDITOR. Contains the full Tender object for the currently open quote, order or request.

Top-level fields

FieldTypeDescription
tenderIdStringPrimary identifier for the tender
orderIdIntOrder ID
statusStringCurrent order status (for example QUOTATION, NEW, VALIDATED)
channelIdIntSales channel ID
sourceStringOrder origin (for example Sales Portal, Webshop)
emailStringContact email
debtorIdStringDebtor identifier
invoiceUserIdIntInvoice user ID
userIdIntUser ID
shopIdIntShop ID
createdAtDateTimeCreation timestamp
referenceString?Customer reference
remarksString?Customer remarks
externalIdString?External system ID
validUntilDateTime?Quote expiry date
actionCodeString?Action code
creditPointsInt?Credit points
valuePointsInt?Value points
incentivesAppliedBoolean?Whether incentives have been applied

Contact

FieldTypeDescription
contactIdIntContact ID
firstNameStringFirst name
middleNameStringMiddle name
lastNameStringLast name
emailStringEmail address
phoneStringPhone number
primaryLanguageStringLanguage code (for example NL)
companyObjectNested company with taxNumber and cocNumber
pricesheetsArrayAssigned pricesheets
purchaseAuthorizationConfigsObjectPurchase authorization configuration

Company

FieldTypeDescription
companyIdIntCompany ID
nameStringCompany name
pricesheetsArrayAssigned pricesheets with localized names
addressesArrayCompany addresses (delivery and invoice)

Addresses

The deliveryAddress and invoiceAddress objects share the same structure:

FieldTypeDescription
firstNameStringFirst name
middleNameStringMiddle name
lastNameStringLast name
companyStringCompany name
streetStringStreet name
numberStringHouse number
numberExtensionStringHouse number extension
postalCodeStringPostal code
cityStringCity
regionString?Region or province
countryStringCountry code (for example NL, CN)
emailStringEmail
phoneStringPhone
mobileString?Mobile phone
genderStringGender code
icpStringIntra-community delivery flag (Y or N)

Items

The items array contains TenderMainItem objects representing order line items. Each main item can have childItems (accessories, options, surcharges) as TenderBaseItem objects.

TenderMainItem fields:

FieldTypeDescription
orderItemIdIntOrder item ID
uuidStringUnique item identifier
productIdIntProduct ID
nameStringProduct name
skuStringSKU
quantityIntQuantity
priceStringUnit price
priceNetNumberUnit price including tax
originalPriceNumberOriginal list price
costPriceNumberCost price
customerPriceNumberCustomer-specific price
customerDiscountPercentageNumberCustomer discount percentage
discountPercentageStringLine item discount percentage
marginAmountNumberMargin amount (price minus cost price)
marginPercentageNumberMargin percentage
saleMarginAmountNumberSale margin amount
saleMarginAmountSumNumberSale margin amount including child items
saleMarginPercentageNumberSale margin percentage
saleMarginPercentageSumNumberSale margin percentage including child items
attributedSaleDiscountNumberAttributed sale discount
attributedSaleDiscountSumNumberAttributed sale discount including child items
attributedSaleMarginStringAttributed sale margin
attributedSaleMarginSumNumberAttributed sale margin including child items
totalPriceNumberTotal price (quantity × price)
totalPriceNetNumberTotal price including tax
sumNumberSum including child items
sumNetNumberSum including child items and tax
totalSumNumberTotal sum
totalSumNetNumberTotal sum including tax
totalDiscountPercentageNumberTotal discount percentage
totalDiscountPercentageSumNumberTotal discount percentage including child items
taxCodeStringTax code (for example H for high, N for none)
taxPercentageNumberTax percentage
supplierStringSupplier name
supplierCodeStringSupplier product code
notesStringItem notes
priorityIntSort priority
expectedDeliveryDateDateTime?Expected delivery date
incentiveObject?Applied incentive
surchargesArraySurcharges on the item
valuePointsInt?Value points
childItemsArrayChild items (accessories, options, surcharges)

Product details (nested under each item):

FieldTypeDescription
product.productIdIntProduct ID
product.unitIntUnit
product.minimumQuantityIntMinimum order quantity
product.inventory.totalQuantityIntTotal available stock
product.hasBundleStringWhether the product has a bundle (Y or N)
product.isBundleLeaderStringWhether the product is a bundle leader (Y or N)
product.bundlesArrayAvailable bundles with items
product.crossupsellsFrom.itemsFoundIntNumber of cross/upsell products
product.clusterObject?Cluster (configurable product) with names, SKU, options
product.media.imagesObjectProduct images with URLs

TenderBaseItem (child items) has the same pricing and margin fields as TenderMainItem but without childItems, priority, product details and surcharges.

Bonus items

The bonusItems array contains bonus products added by incentive rules. Empty when no incentives are applied.

Carriers

FieldTypeDescription
nameStringCarrier name
idIntCarrier ID
amountNumberShipping cost amount
descriptionString?Carrier description
logoString?Carrier logo URL

Payment methods

FieldTypeDescription
codeStringPayment method code (for example IDEAL, INVOICE)
externalCodeStringExternal payment method code
typeStringType (for example payment)
descriptionStringDisplay name
amountNumberTransaction cost
allowedBooleanWhether the method is allowed for this order

Payment data

FieldTypeDescription
methodStringSelected payment method
overruledStringWhether the transaction cost is overruled (Y or N)
priceNumberTransaction cost (gross)
priceNetNumberTransaction cost (net)
taxNumberTax amount
taxPercentageNumberTax percentage
statusStringPayment status (for example UNKNOWN)
statusDateDateTime?Payment status date
accountingIdString?Accounting reference

Postage data

FieldTypeDescription
carrierString?Selected carrier name
methodStringDelivery method
overruledStringWhether shipping cost is overruled (Y or N)
priceNumberShipping cost (gross)
priceNetNumberShipping cost (net)
taxPercentageNumberTax percentage
partialDeliveryAllowedStringWhether partial delivery is allowed (Y or N)
pickUpLocationIdInt?Pick-up location ID
requestDateDateTime?Requested delivery date
warehouseString?Warehouse

Totals

FieldTypeDescription
subTotalGrossNumberSubtotal (gross)
subTotalNetNumberSubtotal (net, including tax)
totalGrossNumberTotal (gross, including shipping and payment)
totalNetNumberTotal (net, including tax, shipping and payment)
totalTaxNumberTotal tax amount
discountGrossNumberTotal discount (gross)
discountNetNumberTotal discount (net)
discountPercentageNumberDiscount percentage
discountOverruledString?Whether discount is overruled

Revisions

FieldTypeDescription
itemsFoundIntTotal number of revisions
items[].revisionNumberIntRevision number
items[].createdAtDateTimeRevision creation timestamp
items[].createdByAdminUserObject?Admin user who created the revision (firstName, middleName, lastName)
items[].createdByContactObject?Contact who created the revision
items[].createdByCustomerObject?Customer who created the revision
items[].snapshot.statusStringOrder status at time of revision
items[].snapshot.typeStringOrder type at time of revision
items[].snapshot.publicBooleanWhether the revision was public

Example tender payload

A trimmed example showing the key structure. Actual payloads contain all fields listed above.

{
"type": "SALES_HUB_ORDER_EDITOR",
"adminUserId": 205,
"requestMessage": "can you give me advice how to increase the order value?",
"requestMetadata": {
"payload": {
"tenderId": "019d026b-99ce-7b94-b5cd-f5d436d23f78",
"orderId": 3043,
"status": "VALIDATED",
"channelId": 1,
"source": "Sales Portal",
"email": "wouter@example.nl",
"contact": {
"contactId": 14780,
"firstName": "Wouter",
"lastName": "Smrkovsky",
"email": "wouter@example.nl",
"phone": "0592343043",
"primaryLanguage": "NL",
"company": {
"taxNumber": "NL001607480B01",
"cocNumber": "02009131"
},
"pricesheets": []
},
"company": {
"companyId": 308,
"name": "M&G Group",
"pricesheets": [
{
"names": [{ "language": "NL", "value": "Contract M&G Group" }]
}
],
"addresses": [
{
"street": "Burgemeester Grollemanweg",
"number": "14",
"postalCode": "9405TN",
"city": "Assen",
"country": "NL",
"type": "delivery"
}
]
},
"deliveryAddress": {
"street": "Burgemeester Grollemanweg",
"number": "14",
"postalCode": "9405TN",
"city": "Assen",
"country": "NL"
},
"items": [
{
"orderItemId": 29054,
"name": "La Marzocco Linea Mini – Yellow",
"sku": "2400015",
"quantity": 1,
"price": "4796.55",
"costPrice": 3650,
"customerPrice": 4796.55,
"marginAmount": 1146.55,
"marginPercentage": 31.41,
"saleMarginPercentage": 23.90,
"saleMarginPercentageSum": 35.36,
"supplier": "Intern",
"taxCode": "H",
"taxPercentage": 21,
"product": {
"productId": 1020,
"inventory": { "totalQuantity": 282 },
"hasBundle": "N",
"crossupsellsFrom": { "itemsFound": 0 },
"cluster": {
"clusterId": 74,
"names": [{ "value": "La Marzocco Linea Mini", "language": "NL" }],
"sku": "LAMALIMI"
}
},
"childItems": [
{
"orderItemId": 29055,
"name": "Walnut set for the Linea Mini",
"sku": "1000121",
"quantity": 1,
"price": 585.37,
"costPrice": 423.56,
"marginAmount": 161.81,
"marginPercentage": 38.20,
"taxCode": "H",
"taxPercentage": 21
}
]
}
],
"bonusItems": [],
"carriers": [
{ "name": "DHL", "id": 8, "amount": 2.36 },
{ "name": "PostNL", "id": 2, "amount": 4.50 }
],
"payMethods": [
{ "code": "IDEAL", "description": "Ideal | Wero", "amount": 0, "allowed": true },
{ "code": "INVOICE", "description": "Betalen via factuur", "amount": 0, "allowed": true }
],
"paymentData": {
"method": "",
"overruled": "N",
"price": 35,
"priceNet": 42.35,
"status": "UNKNOWN",
"taxPercentage": 21
},
"postageData": {
"carrier": null,
"method": "",
"overruled": "N",
"price": 10,
"priceNet": 12.10,
"taxPercentage": 21,
"partialDeliveryAllowed": "Y"
},
"total": {
"subTotalGross": 6246.94,
"subTotalNet": 7558.80,
"totalGross": 6291.94,
"totalNet": 7613.25,
"totalTax": 1321.31,
"discountGross": 0,
"discountNet": 0,
"discountPercentage": 0
},
"revisions": {
"itemsFound": 4,
"items": [
{
"revisionNumber": 4,
"createdAt": "2026-03-18T19:11:03.197Z",
"createdByAdminUser": {
"firstName": "Jasper",
"lastName": "Pardijs"
},
"snapshot": {
"status": "VALIDATED",
"type": "dropshipment",
"public": true
}
}
]
}
}
}
}

Company payload

Used by SALES_HUB_COMPANY. Contains the company object for the currently open company detail page.

FieldTypeDescription
companyIdIntCompany ID
nameStringCompany name
debtorIdString?External billing ID
cocNumberString?Chamber of Commerce number
taxNumberString?VAT/tax number
emailString?Email
phoneString?Phone
tagString?Classification tag
addressesArrayCompany addresses

Example company payload

{
"type": "SALES_HUB_COMPANY",
"adminUserId": 205,
"requestMessage": "summarize this company",
"requestMetadata": {
"payload": {
"companyId": 11888,
"name": "Acme Corp B.V.",
"debtorId": null,
"cocNumber": null,
"taxNumber": null,
"email": null,
"phone": null,
"tag": null,
"addresses": [
{
"street": "Industrieweg",
"number": "42",
"postalCode": "3846 BD",
"city": "Harderwijk",
"country": "NL",
"isDefault": "N"
}
]
}
}
}

Products payload

Used by BACKOFFICE_PRODUCTS. Contains a summary of the current product list view.

FieldTypeDescription
totalItemsIntTotal number of products and clusters matching the current filter

Example products payload

{
"type": "BACKOFFICE_PRODUCTS",
"adminUserId": 205,
"requestMessage": "how many products do we have?",
"requestMetadata": {
"payload": {
"totalItems": 12185
}
}
}

Custom frontend payloads

Custom agent types (for example WEBSHOP_PRODUCT_DETAIL or CUSTOMER_PORTAL_ORDERS) have no fixed payload structure. You build the requestMetadata.payload yourself with whatever data your webhook needs. See Embedding agents in your frontend for details.

Response format

The webhook must return a JSON object with the following fields:

FieldDescription
conversationIdEchoed back to link the response to the conversation
responseMessageText displayed to the user in the UI. Supports newlines for formatting
responseMetadataOptional structured data for the UI or downstream systems

Example response

{
"conversationId": "4308",
"responseMessage": "Quote #3043 is approved.\n\nMargin: 28.34% (€1770.13)",
"responseMetadata": {
"processed": true,
"marginPercentage": "28.34",
"marginAmount": "1770.13",
"totalRevenue": "6246.94",
"totalCost": "4476.81",
"threshold": 20,
"timestamp": "2026-03-18T19:29:15.105Z"
}
}

See also