Templating:Webhooks

Från Vendre Help
Hoppa till: navigering, sök

This page documents the Twig template variables available when formatting webhook payloads and URLs.

Twig variables

Context variables

These variables are passed globally into the Twig context when a webhook event is triggered.

variable description
payload The primary data payload object containing the event-specific details.
data An alias for payload.
order An alias for payload (provided for convenience when dealing with order-specific events).
trigger The decoded configuration or structural data that initiated the webhook trigger.
webhook_event The exact name of the event that fired the webhook (e.g., order.created).
webhook An array containing metadata about the configured webhook itself. See the table below for sub-properties.
now The current system timestamp at execution time, formatted as an ISO 8601 string.

Webhook metadata properties

These properties are accessible nested inside the webhook array variable.

variable description
webhook.id The database ID of the specific webhook URL configuration.
webhook.url The target destination URL where the payload is dispatched.
webhook.type The integration type classification assigned to this webhook.
webhook.method The HTTP request method used for the payload delivery (e.g., POST, GET, PUT).
webhook.data_format The format structure expected by the payload (e.g., json, xml).
webhook.data_filter The filter rule configuration string or logic applied to this webhook.