Outbound webhooks, where Wetel pushes events such as “session ended” to a URL you register, are not available yet. Today your backend finds out in one of three ways: it subscribes to a conversation’s live events, it reads results back, or the workflow itself calls your system with a webhook step at the moment it matters.
Think of a new colleague on the front desk. You can sit beside them and watch (a subscription), ask them for the file afterwards (reading results), or give them a rule: “when a refund is agreed, ring the accounts team” (a webhook step). People on your team decide which of these happen when they build the workflow, in a workspace an owner is responsible for; the AI employee follows the workflow it was given.
Which option should I use?
Pick by what your other system needs.
| You need | Use | Main limit, as documented |
|---|---|---|
| Real-time updates while a conversation runs | The sessionEvents subscription | Your backend keeps a connection open per conversation |
| A copy of every chat turn in your own database | External conversation sync | Best-effort: a turn missed during an outage is not replayed |
| To tell another system something at one specific step | A webhook step inside the workflow | 30-second ceiling per call; the URL must be publicly reachable |
| The result of a task you started from your backend | workflowTaskOutcome | You poll; it never returns the run’s context or step-by-step trace |
How does the subscription work?
Your backend opens a websocket and subscribes to sessionEvents for one conversation. Every reply, every step starting or failing, and the end of the conversation arrive there; sending a message only returns an acknowledgement.
Plan for three limits:
- It is a persistent connection, not a one-off HTTP call.
- It authenticates once, when it opens, with the conversation’s session token. If you renew the token, close the socket and open a new one; an old socket on an expired token drops events quietly.
- It is live. A reply published while your socket was closed is not sent on reconnect unless you use the newer
sinceMessageIdoption, which replays what you missed. The changelog says where it is live. Never resend the customer’s message on reconnect: that starts a second run.
When is external sync the right answer?
When you want your own database to hold the conversation history, for reporting or record-keeping. You set a GraphQL endpoint on the agent, and after each turn Wetel calls mutations on your backend to record the conversation and its messages.
It is a one-way, fire-and-forget mirror. It never delays the customer’s reply; it retries a few times, then gives up on that turn. There is no replay for turns missed while your backend was down. The docs say plainly: if you need guaranteed delivery, read the conversation data from Wetel directly instead of relying only on the sync.
When should the workflow call out itself?
When something should happen at a specific point: “order confirmed, tell the warehouse.” A webhook step calls a URL you configure, with a templated JSON body. It can wait for the answer and save it for later steps, or with async: true fire and move on without waiting.
Its limits: the call times out at 10 seconds by default and never later than 30; the URL is checked when you save the workflow and private addresses are refused; redirects are not followed. The step’s entry in the run record shows the exact body it sent.
How do I get the result of a task I started?
If your backend started work with runWorkflowTask, a successful return only means the task was accepted and queued. Read the real outcome with workflowTaskOutcome, using the same API key: the newest run’s status, the runs (with a masked error message for a failed one) and the AI employee’s replies. Poll with a back-off; it is rate-limited.
What is not built?
Wetel pushing events to your URL. It is on the roadmap, and its state is on the status page.
Related reference docs
- Events & Subscriptions: connecting, the event list and reconnecting
- External Conversation Sync: delivery guarantees: what best-effort means
- Webhook Node: blocking vs. async mode: waiting for the answer or not
workflowTaskOutcome: reading a task’s result with an API key- Roadmap: outbound event webhooks: the feature that is not built yet
To wire up the real-time option, start with Events & Subscriptions.