Webhooks and events
Go to Observe → Webhooks in the left menu (or open /dxp/observe/webhooks).
You will see three tabs at the top:
- Outbound — “Tell Eonix where to send me updates.”
- Inbound — “Give partners a URL they can POST into Eonix.”
- Agent gates — “Let supply-side replenishment workers POST signed JSON into Eonix (no staff cookie).”
Pick the tab that matches what you want, then follow the walkthrough below.
For agent gates, purchase requests, and stock automation, see Agent replenishment (full walkthrough). The sections below cover Outbound and Inbound only.
Outbound walkthrough (Eonix sends to you)
Goal: Eonix sends one test message to a website you control. We use webhook.site because it is free and needs no install.
Step 1 — Get a catch URL
- Open https://webhook.site in another browser tab.
- Copy the URL it shows you (starts with
https://webhook.site/…). Leave that tab open.
Step 2 — Open the desk
- In Eonix, open Observe → Webhooks.
- Make sure the Outbound tab is selected (first tab).
Step 3 — Fill the form “Add or rotate”
Scroll to the form at the bottom half of the page. Fill only these fields for a first test:
- Target URL — paste your webhook.site URL.
- Owning Space id — paste the long id for the Space you are working in (see box below if the field is empty).
- Event affinity — leave as Space-local.
- Event types — click the small button
webhook.verify(adds one line to the box). That is a harmless test event only. - Enabled — leave ticked.
- Signing secret (one-time) — type any long password-like string (for example
my-test-secret-12345). You do not need to remember it for webhook.site; Eonix uses it internally after save.
Leave External secret ref empty.
Click Save subscription.
Step 4 — Check it worked
You should see:
- A popup saying it saved (you can dismiss it).
- A new row in the Subscriptions table above the form.
- A new request on webhook.site (refresh webhook.site) — that is Eonix’s test ping.
Still on the desk: click Test on that row. Another popup shows a number like HTTP 200. That means delivery succeeded.
Scroll to Recent outbox — you should see a row with type webhook.verify.
You have a working outbound webhook.
Outbound — get real updates later
When you are ready for real traffic (not just the test button):
- Edit Event types — use the small preset buttons for things you care about (for example
content.page_publishedwhen you publish pages), or ask your admin which names your site uses. - Do the action in the desk (publish a page, save a product, etc.).
- Watch Recent outbox and webhook.site for new rows.
If nothing arrives, your event type list may not match what the site actually sends. Try leaving Event types empty to receive everything (can be noisy).
Payload: content tags on publish
For content.page_published, the JSON body may include a content_tags array when the page has content tags assigned in that Space:
"content_tags": [
{ "slug": "spring-fashion", "label": "Spring Fashion", "kind": "content" }
]
Use these dimensions in your warehouse or integration to segment campaigns. Tags come from Library and page tagging in the desk; they are Space-scoped. See also Signals and outcomes.
Inbound walkthrough (someone sends into Eonix)
Goal: You register a URL inside Eonix, then send one test POST into it using the desk’s Test button.
Step 1 — Open the desk
- Observe → Webhooks.
- Click the Inbound tab (second tab). Wait until “Loading…” finishes.
Step 2 — Fill the form “Add or rotate”
- Owning Space id — same Space id as outbound (see below).
- Event affinity — Space-local.
- Event types — click
integration.inbound.verify. - Enabled — ticked.
- Signing secret (one-time) — any long random string (for example
inbound-test-secret-99).
Click Save endpoint.
Step 3 — Run the test
- In the Endpoints table, find your new row.
- Copy the Ingress URL column if you want it for later; you do not need it for this test.
- Click Test on that row.
- A popup shows a block of text including a
curlcommand. Select and copy the wholecurlline (or the whole message). - Open Terminal (Mac/Linux) or Command Prompt (Windows) on the same computer where Eonix engine runs if the URL starts with
http://127.0.0.1. - Paste and press Enter. You should see a short response (no big error).
Step 4 — Check it worked
On the desk, scroll to Recent inbox. You should see a new line (status may say processed or pending then processed).
You have a working inbound endpoint.
Commerce product relay (advanced)
To push a price/catalog snapshot into the streaming hub (same path as when you save a product in the desk), allow commerce.product.updated on the inbound endpoint and POST a body whose payload includes core_db (your workspace Mongo database name, e.g. acme_es_com from the site host — not an eonix_ prefix) and product_json (product id, slug, and price fields — same shape the desk sends to the engine). This updates live edges and may enqueue outbound webhooks; it does not create or edit the product in the desk catalog. Use normal product save for authoritative catalog data.
Commerce events (outbound)
When Web Store, payments, and checkout inventory holds are enabled, useful outbound types include:
| Event type | When it fires |
|---|---|
commerce.product.updated | Product saved through the engine commerce path (catalog + price snapshot). |
commerce.inventory.adjusted | Stock snapshot after a ledger write or a checkout hold change. |
commerce.order.placed | Order created (integrations / inbound relay). |
commerce.order.paid | Order marked paid. |
commerce.order.cancelled | Order cancelled. |
For commerce.inventory.adjusted, the payload includes available and reserved. reserved counts units held during open Stripe checkouts (not ledger rows). Partners that mirror stock should treat available as sellable-style quantity after the event. See Checkout inventory holds for shopper and staff behaviour.
Preset buttons on the Outbound form may not list every commerce type yet — type the name manually or leave Event types empty for a noisy catch-all while testing.
Agent replenishment (outbound)
When Web Store and agent replenish are enabled, subscribe to:
| Event type | When it fires |
|---|---|
agent.replenish.stockout_predicted | SKU inside replenishment lead time (forecast API with emit_alerts=1 or inbound agent.replenish.forecast); deduped once per rule per UTC day |
agent.replenish.purchase_order | Staff Approve on Observe → Purchase requests |
Full payloads, deduplication, and inbound agent types: Agent replenishment.
Where do I get the “Owning Space id”?
The form needs the internal id of the Space (site) this webhook belongs to.
Try this first:
- At the top of the desk, switch to the Space you want (space switcher in the admin chrome).
- Reload Observe → Webhooks.
- The Owning Space id field may already be filled in. If it is, do not change it.
If the field is still empty:
- Open Spaces in the menu, open the Space you care about.
- Your admin may show the id on that page; or copy it from the browser address bar if the link contains a 24-character code made of letters
a–fand digits. - Paste that code into Owning Space id on both Outbound and Inbound forms.
If you manage several Spaces, turn on Only active Space above the tables so lists match the Space you selected.
When something goes wrong
Red error text on the Webhooks page
- The back-end service may be off. If you run Eonix yourself: start everything with
make runand try again. If someone else hosts you, ask them to check the engine is running.
“Owning Space id is required”
- The field is empty. See the section above.
Outbound: saved but webhook.site stays empty
- The URL must start with
https://. - Eonix sends from the server, not your laptop. webhook.site works from anywhere;
http://localhost:…on your PC usually does not.
Outbound: Test says HTTP 4xx or 5xx
- webhook.site is fine for tests. Click Test again; check the outbox Last error column.
Inbound: curl says “connection refused”
- The URL often uses
127.0.0.1:9080in development. Runcurlon the same machine as the engine, or ask your admin for the real public URL.
Inbound: Test popup but empty inbox
- Run the
curlfrom the popup. The inbox only fills after a successful POST.
Related
- Checkout inventory holds — reserved stock, checkout 409, commerce.inventory.adjusted fields
- Agent replenishment — agent gates tab, purchase requests, replenishment events
- Observe hub
- Signals and outcomes