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.

Top-level fields

FieldTypeDescription
companyIdIntCompany ID
nameStringCompany name
debtorIdString?External billing ID
cocNumberString?Chamber of Commerce number
taxNumberString?VAT/tax number
emailString?Company email
phoneString?Phone number
notesString?Internal notes
contactsObjectPaginated list of contacts linked to this company
addressesArrayCompany addresses (delivery and invoice)

Contacts

The contacts object contains a paginated list of contacts linked to the company.

FieldTypeDescription
itemsFoundIntTotal number of contacts linked to this company
offsetIntCurrent page size
pageIntCurrent page number
itemsArrayContact objects for the current page

Each contact in items contains:

FieldTypeDescription
contactIdIntContact ID
firstNameStringFirst name
lastNameStringLast name
middleNameString?Middle name
emailString?Email address
phoneString?Phone number
mobileString?Mobile phone number
primaryLanguageString?Language code (for example NL, EN)
mailingListStringSubscribed to mailing list (Y or N)
loginString?Login identifier

Addresses

Each address in the addresses array contains:

FieldTypeDescription
idIntAddress ID
firstNameStringFirst name
middleNameString?Middle name
lastNameStringLast name
companyString?Company name on the address
emailString?Email
streetStringStreet name
numberStringHouse number
numberExtensionString?House number extension
postalCodeStringPostal code
cityStringCity
regionString?Region or province
countryStringCountry code (for example NL, DE)
phoneString?Phone number
mobileString?Mobile phone number
genderStringGender code (M, F or U)
icpStringIntra-community delivery flag (Y or N)
isDefaultStringDefault address (Y or N)
typeStringAddress type (delivery or invoice)

Example company payload

{
"type": "SALES_HUB_COMPANY",
"adminUserId": 205,
"requestMessage": "summarize this company",
"requestMetadata": {
"payload": {
"companyId": 9876,
"name": "Acme Corp B.V.",
"email": "info@acme.nl",
"taxNumber": "NL123456789B01",
"cocNumber": "12345678",
"debtorId": "COMP-9876",
"notes": "",
"phone": "+31 20 123 4567",
"contacts": {
"itemsFound": 5,
"offset": 12,
"page": 1,
"items": [
{
"contactId": 54321,
"firstName": "Sophie",
"lastName": "Bakker",
"middleName": "",
"email": "sophie@acme.nl",
"phone": "+31 20 234 5678",
"mobile": "+31 6 8765 4321",
"primaryLanguage": "NL",
"mailingList": "N",
"login": "sophie@acme.nl"
},
{
"contactId": 12345,
"firstName": "Jan",
"lastName": "Vries",
"middleName": "de",
"email": "jan@acme.nl",
"phone": "",
"mobile": "+31 6 9876 5432",
"primaryLanguage": "NL",
"mailingList": "Y",
"login": "jan@acme.nl"
}
]
},
"addresses": [
{
"id": 34766,
"firstName": "Jan",
"middleName": "de",
"lastName": "Vries",
"company": "Acme Corp B.V.",
"email": "jan@acme.nl",
"city": "Giessen",
"country": "NL",
"gender": "M",
"icp": "N",
"isDefault": "Y",
"number": "12",
"numberExtension": "A",
"mobile": "+31 6 9876 5432",
"phone": "+31 20 123 4567",
"postalCode": "4283 GZ",
"region": "Zuid-Holland",
"street": "Industrieweg",
"type": "delivery"
},
{
"id": 34772,
"firstName": "Sophie",
"middleName": "",
"lastName": "Bakker",
"company": "Acme Corp B.V.",
"email": "sophie@acme.nl",
"city": "Utrecht",
"country": "NL",
"gender": "F",
"icp": "N",
"isDefault": "Y",
"number": "34",
"numberExtension": "",
"mobile": "+31 6 8765 4321",
"phone": "+31 20 234 5678",
"postalCode": "3511 AB",
"region": "Utrecht",
"street": "Kerkstraat",
"type": "invoice"
}
]
}
}
}

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. Only responseMessage is required. The structure of responseMetadata is entirely up to you and depends on what your workflow does.

FieldRequiredDescription
conversationIdNoEchoed back to link the response to the conversation
responseMessageYesText displayed to the user in the UI. Supports newlines for formatting
responseMetadataNoFreeform object. Use it to pass structured data back to the UI or downstream systems. The contents are entirely defined by your workflow

Example response

{
"conversationId": "4308",
"responseMessage": "The result of your workflow, displayed to the user.",
"responseMetadata": {
"anyKey": "anyValue"
}
}

See also