Send events with webhooks
A webhook tells another system the moment something happens in your shop: a sale completes, a work order changes status, a customer is added. Telltail posts a small signed message to an address you choose, and retries until the other side takes it.
How it fits together
Two parts make a webhook. A webhook endpoint is the address of the other system, with a secret it uses to check that each message came from Telltail. An automation decides when to send: it names an event, optional filters, and the action Notify a webhook endpoint. One endpoint can serve any number of automations.
Both live in Automations. Setting them up needs the permissions to manage automations and webhooks, which only Admins have by default.
Add an endpoint
Open Webhook endpoints
In Automations, choose Webhook endpoints in the rail, then New endpoint.
Name it and give the URL
Give it a Name you’ll recognize and the URL to post to. Typed without https://, the address gets it added. Telltail only delivers to public internet addresses, never to a computer on the shop’s own network.
Copy the signing secret
Press Create. The Signing secret appears once. Press Copy secret and put it in the receiving system now. Telltail never shows it again.
Send a test
Open the endpoint and press Send test delivery. A webhook.test message goes out, and its result appears under Deliveries.
Send events to it
Create an automation
In Automations, press New automation and pick what should start it under Or start from what happens, such as A sale is completed, A work order’s status changes or A customer is added.
Narrow it, if you need to
Under Only if, press + Add a condition to send only some of them, for example only one store’s sales.
Add the step
Under Then, press + Add a step, choose Notify a webhook endpoint and pick the endpoint. Give the automation a name and press Save and turn on (or Save changes to keep it off until you’re ready).
What a delivery looks like
Each delivery is an HTTPS POST with a JSON body: the delivery’s id, the event type, when it was created, your shop’s organization id, the automation that sent it, and data. data holds the record’s id and a few related ids and values, never the full record or anything private such as a customer’s address. The receiver looks up what else it needs.
- Telltail-Delivery-Id
- The delivery’s id. The same id on a retry.
- Telltail-Event
- The event, such as sale.completed.
- Telltail-Signature
- t= the time in Unix seconds, and v1= an HMAC-SHA256 of the time, a period and the raw body, keyed with the signing secret. Recompute it, compare, and reject a time more than five minutes old.
When the other side is down
Any answer other than a 2xx is a failure. Telltail tries again after 1 minute, 5 minutes, 30 minutes, 2 hours, 8 hours and then daily, eight attempts in all. After the eighth, the delivery is Dead. Open the endpoint to see each delivery as Waiting, Delivered or Dead, with its attempts and last error. Press Send again on a dead one once the receiver is fixed.
Deliveries don’t always arrive in order. Use created and the record’s id to put them in order.
Turn off, rotate, archive
- Switch an endpoint off to stop sending. Anything waiting for it is dropped, and switching it back on doesn’t bring those back.
- Rotate secret makes a new secret and shows it once. The receiver rejects deliveries until it has the new one.
- Archive endpoint removes it and drops anything waiting.
Q&A
How long is delivery history kept?
Delivered messages for 30 days, dead ones for 90. Send a dead one again within that time.
Can a webhook change something in Telltail?
No. Webhooks only go out. Nothing outside Telltail can make changes in your shop.
Related: Build on the Telltail API, Manage connected apps.