Wetel
Go back

How do my other systems find out what an AI employee did?

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 needUseMain limit, as documented
Real-time updates while a conversation runsThe sessionEvents subscriptionYour backend keeps a connection open per conversation
A copy of every chat turn in your own databaseExternal conversation syncBest-effort: a turn missed during an outage is not replayed
To tell another system something at one specific stepA webhook step inside the workflow30-second ceiling per call; the URL must be publicly reachable
The result of a task you started from your backendworkflowTaskOutcomeYou 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:

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.

To wire up the real-time option, start with Events & Subscriptions.


Share this post:

Next Post
Getting structured data out of a conversation: order numbers, dates and categories
Previous Post
Claims intake over a messaging app (a pilot): one claim, three parties