> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atonom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# External Chat

> Slack conversation webhook payload sent when an external chat closes

Slack is supported today. Microsoft Teams and Google Chat will use this same webhook soon.

Atonom sends this payload when a Slack conversation closes. Verify the request with [webhook authorization](/webhooks/authorization).

> To learn how to specify webhook URLs for your cloud employees in the Atonom app, please see the [webhook URLs](/get-started/quickstart/#configure-webhook) configuration step in the quickstart guide.

<Check>
  **Event type:**

  * `external-chat-data`: sent when the Slack conversation closes
</Check>

## Payload

```json theme={null}
{
  "event": "external-chat-data",
  "obj_id": "15",
  "tenant_id": 42,
  "dialogue_id": "15",
  "session": {
    "session_id": 44,
    "provider": "slack",
    "workspace_id": "T0911AYU7HA",
    "chat_id": "D0C5VSW0R5K",
    "chat_kind": "dm",
    "bot_id": 9
  },
  "transcript_with_tools": [
    {
      "id": 3,
      "kind": "chat",
      "body": "What are your hours?",
      "participant_id": 8,
      "participant_name": "Sam",
      "created_timestamp": "2026-09-30T12:00:00Z"
    },
    {
      "id": 9,
      "kind": "tool_invocation",
      "body": "",
      "participant_id": 8,
      "data": {
        "type": "tool_invocation",
        "tool_name": "search_kb",
        "tool_call_id": "call-123",
        "tool_args": "{\"query\":\"hours\"}"
      },
      "created_timestamp": "2026-09-30T12:00:01Z"
    },
    {
      "id": 10,
      "kind": "tool_result",
      "body": "",
      "data": {
        "type": "tool_result",
        "tool_call_id": "call-123",
        "results": "{\"status\":\"ok\"}"
      },
      "created_timestamp": "2026-09-30T12:00:02Z"
    },
    {
      "id": 11,
      "kind": "agent_message",
      "body": "We are open 9am to 5pm.",
      "participant_id": 8,
      "participant_name": "Atonom",
      "created_timestamp": "2026-09-30T12:00:03Z"
    }
  ]
}
```

`obj_id` and `dialogue_id` are the same dialogue id. `parent_id`, `participant_id`, `participant_name`, and `data` are left out when empty. A tool result usually has no participant.

## Session

| Field | Description |
| - | - |
| `session_id` | Atonom id for this Slack chat session |
| `provider` | `slack` |
| `workspace_id` | Slack workspace id, such as `T0911AYU7HA` |
| `chat_id` | Slack conversation id. A direct message is the channel id, such as `D0C5VSW0R5K`. A thread is `channel:thread_ts`, such as `C123:111.222` |
| `chat_kind` | `dm` or `group`. Slack direct messages are `dm`. Channel messages are `group` |
| `bot_id` | Atonom bot registration id |
| `parent_id` | Present for a thread. This is the Slack channel id, such as `C123` |

## Transcript

Each item in `transcript_with_tools` is one conversation event, in order.

| Field | Description |
| - | - |
| `id` | Conversation event id |
| `kind` | Event kind. Chat text is `chat` or `user_message`. The agent reply is `agent_message`. Tool calls are `tool_invocation` and `tool_result` |
| `body` | Message text. Empty for tool events |
| `participant_id` | Participant id, when the event has one |
| `participant_name` | Display name, when the event has one |
| `created_timestamp` | UTC time |
| `data` | Tool payload. Present on tool events |

`body` is the person's message text. Slack author tags are already removed.

### Tool invocation

```json theme={null}
{
  "type": "tool_invocation",
  "tool_name": "search_kb",
  "tool_call_id": "call-123",
  "tool_args": "{\"query\":\"hours\"}"
}
```

### Tool result

```json theme={null}
{
  "type": "tool_result",
  "tool_call_id": "call-123",
  "results": "{\"status\":\"ok\"}"
}
```

`tool_args` and `results` are strings. They are often JSON encoded as text. Match a result to its invocation with `tool_call_id`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.