Developer docs

IotaBot Commerce

Attribute paid orders from your own storefront back to the chat that sold them.

Get an API key

Custom store order attribution webhook

Call this once when an order is paid. IotaBot records funnel paid, clears the bot cart pointer, stamps the conversation as a win, and stops abandoned-cart reminders.

Endpoint: POST https://api.iotabot.com/api/v1/webhooks/store/order

Header: x-iotabot-secret: <store secret> — the password from Website → Store → Custom HTTP (also accepted during the one-day rotation grace window).

Body (JSON). Strings or numbers are fine for ids and totals:

request.json
{
  "conversation_id": "6a4b9e21c3f1a2b3c4d5e6f7",
  "order_id": "ord_1042",
  "order_number": "1042",
  "total": "1299.00",
  "currency": "INR",
  "status": "paid",
  "platform": "custom"
}
  • conversation_id (required for attribution) — the chat id your checkout tool stored on the order
  • order_id / order_number — shown on the funnel and conversation win stamp
  • total + currency — feed bot revenue on the Store funnel dashboard
  • platform — optional; defaults to custom when the website store platform is Custom HTTP
If the secret is wrong you get 401. If conversation_id is missing or not on that website, the call still returns { "ok": true } and does nothing — so retries are safe, but check your logs if revenue never appears.

What IotaBot does on a matching conversation:

  • Writes a sales-funnel paid event (counts + revenue)
  • Sets botOrderPaidAt on the conversation and order attrs on the visitor
  • Clears the bot cart pointer for that shopper / conversation
  • Clears abandoned-cart recovery timers for that chat
  1. Keep conversation_id on the order at checkout (Tools can send it as from_context → conversationId).
  2. On your payment success / order-paid hook, POST the payload above.
  3. Confirm under Website → Store → bot commerce funnel that paid and revenue moved.