AI actions
Let the chat AI act in your own system (resend an invoice, restart a deploy, check a subscription) through signed calls to your endpoints.
The chat AI answers from the knowledge base and calls the team when it cannot help. With actions it can also do things in your system while it talks to the customer: each action is an https endpoint of yours that it calls with what it gathered in the conversation.
Set them up in the Mobiari admin, in Conversas → Configurações → Assistente → Ações no seu sistema. Managing actions is not part of the public API yet. Calls are signed with the workspace's integration secret (see customer context), so create one first.
An action
| Field | |
|---|---|
name | reenviar_boleto: lower-case letters, digits and _. The AI sees the tool action_reenviar_boleto. |
label | What the team reads: "Reenviar boleto". |
description | When to use it and what it does, for the AI: "Resends the open invoice to the customer's e-mail when they ask for a copy." |
url | Your https endpoint. |
parameters | What the AI must gather first: key, description, kind (string, number, boolean) and required. Up to 10. |
requires_identity | Offered only in chats with a signed identity, when the customer is who your site says. On by default: keep it on for anything about an account. |
confirm | The AI tells the customer what it will do and calls only after a yes. Enforced by Mobiari, not left to the AI: the first call only records the request; the same call (same parameters) runs only when the customer's next message is a clear yes ("sim", "pode", "ok"; anything with a no, a question or a condition is not), within 30 minutes, and only once. |
enabled | Off keeps it saved but hidden from the AI. |
The call
Mobiari POSTs JSON to the url, with the same X-Mobiari-Timestamp and
X-Mobiari-Signature headers as the context URL:
{
"event": "ai.action",
"action": "reenviar_boleto",
"store_id": "…",
"conversation_id": "…",
"customer": {
"external_id": "acct_42",
"verified": true,
"email": "ana@example.com",
"phone": null,
"name": "Ana",
"customer_id": "…"
},
"input": { "fatura": "INV-9" }
}Check the signature, act for customer.external_id, and answer within 8
seconds. Any 2xx counts as done; the body (JSON, or text, up to 4000
characters) is what the AI reads to tell the customer the result, so say it
plainly: {"ok": true, "sent_to": "ana@example.com"}. Another status is a
failure: the AI says so and offers the team. A test from the admin carries
"test": true and no customer.
The AI never invents parameters or results: it asks the customer for what is missing and reports what your endpoint answered.
Help center
Publish knowledge base articles on a public help site, with search, the chat, a request form and a page where customers follow their tickets.
Realtime inbox
The two WebSockets behind the shared inbox and the storefront chat. The chat widget socket, every event, heartbeats, reconnects and how to catch up over REST.