Webhooks

Placeholders

Placeholders allow you to customize webhook URLs and payloads with dynamic values. When a webhook is triggered, placeholders are replaced with actual data from the event.

Placeholder Syntax

Placeholders use double curly braces:

{{placeholderName}}

Example webhook body:

{
  "event": "{{entity}}.{{action}}",
  "id": "{{id}}",
  "environment": "{{environment}}"
}

Becomes (when triggered):

{
  "event": "Product.update",
  "id": "12345",
  "environment": "prod"
}

Always Available Placeholders

These placeholders are available for all webhook entities:

PlaceholderDescriptionExample Value
{{entity}}Entity type that triggered the webhookProduct, Order, Customer
{{action}}Action performedcreate, update, delete
{{account}}Your webshop/account namemystore
{{environment}}Environment where action occurredprod, dev, qa
{{id}}ID(s) of affected entity12345 or 12345,12346,12347

ID Placeholder Details

The {{id}} placeholder can contain:

  • Single ID - When one entity is affected: 12345
  • Comma-separated IDs - When multiple entities are affected: 12345,12346,12347
When bulk operations affect multiple entities, all IDs are included in the placeholder. Parse comma-separated values in your webhook handler.

Partially Available Placeholders

These placeholders are available only for specific entities or actions:

PlaceholderAvailable ForDescriptionExample Value
{{paymentName}}Capture, RefundPayment method nameCredit Card, PayPal
{{channelName}}Capture, Refund, ProductMonitor, Customer (password reset)Channel/website nameMain Store
{{channelUrl}}Customer (password reset)Channel/website URLhttps://mystore.com
{{resetKey}}Customer (password reset)Password reset keyabc123xyz789
{{orderRowId}}Order (cancelrow action)Specific order row ID67890
{{returnId}}Order (return action)Return ID54321
{{subEntity}}Product, OrderWhat specifically changed (see below)price, stockBalance

SubEntity Placeholder

The {{subEntity}} placeholder provides granular change tracking for Product and Order entities. It tells you exactly what changed without needing to fetch the full entity.

When SubEntity is Empty

If the entire entity was updated (e.g., full product import), {{subEntity}} will be empty. This indicates a comprehensive change rather than a specific field update.

Product SubEntity Values

ValueDescriptionExample Use Case
stockBalanceStock quantity changedTrigger restock notification, update inventory dashboard
priceProduct price updatedUpdate price comparison feeds, notify customers on watchlist
imageProduct image added/modified/deletedRefresh product image cache, update CDN
sortOrderSort order changedReindex product listings
purchasePricePurchase price updatedUpdate margin calculations
variantVariant information changedSync variant options to marketplace
parameterProduct parameter added/modified/deletedUpdate product specifications on external sites
categoryCategory assignment changedUpdate category navigation, refresh sitemaps
relationRelated products changedUpdate "frequently bought together" widgets
itemProduct item (SKU) changedSync SKU data to ERP system

Example: Track only price changes

// Webhook body
{
  "event": "{{entity}}.{{action}}",
  "productId": "{{id}}",
  "changeType": "{{subEntity}}",
  "environment": "{{environment}}"
}

// When price changes
{
  "event": "Product.update",
  "productId": "12345",
  "changeType": "price",
  "environment": "prod"
}

Order SubEntity Values

ValueDescriptionExample Use Case
rowOrder row (line item) changedUpdate fulfillment system when items added/removed
statusOrder status changedSend customer notification for status updates

ProductMonitor Placeholders

When entity is ProductMonitor, these additional placeholders are available:

PlaceholderDescriptionExample Value
{{email}}Customer email addresscustomer@example.com
{{language}}Language codeen-US, sv-SE
{{productId}}Monitored product ID12345
{{productName}}Product nameBlue Widget
{{productUrl}}Product page URLhttps://mystore.com/products/blue-widget
{{productPrice}}Current product price299.00
{{productImage}}Product image URLhttps://cdn.mystore.com/images/blue-widget.jpg
{{itemId}}Specific item/SKU ID12345-M-BLUE
{{itemName}}Item/SKU nameBlue Widget - Medium
If a placeholder is not available for the current entity/action combination, it will be left unchanged in the output (e.g., {{unavailablePlaceholder}}). Handle unreplaced placeholders in your webhook handler.