Push message to a visitor
chatra_push_messageWRITE: send an automated message (order status, product update, announcement) to a visitor whose account is bound to Chatra through a clientId. It is delivered into the visitor's chat on behalf of a random agent, a given agent (agent_id) or a random agent of a group (group_id). It reaches a real customer and cannot be unsent except by deleting it, so only call it with text the user asked you to send. Returns the new message with its id. POST /pushedMessages/.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Message text (plain text, 1-5000 characters). | |
| agent_id | No | Chatra agent id (shown on the agent's page in Chatra). | |
| group_id | No | Chatra agent group id (on the group's page); a random agent of the group writes. | |
| client_id | Yes | Chatra visitor id: the `clientId` your website passed to the chat widget (ChatraSetup.clientId) or the visitor id from a Chatra webhook (client.id). |