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

# Teams and Slack

> Train your agents with Coach from Microsoft Teams or Slack, and get their escalations in a channel there: resolve one with a button, or reply to work on it with Coach.

Eager has an app in Microsoft Teams and in Slack. With it, your team can:

* **Train an agent where they already talk.** Message Eager and tell it what an agent should do differently. Coach changes the agent's procedures, instructions and test cases, the same as in the console, and saves the changes to the agent's **draft**. Publishing stays in the console, and Eager links to the draft whenever it changes something.
* **Get escalations in a channel.** Each new [escalation](https://docs.guidinghand.ai/concepts/escalations.md) is posted as its own thread, with what happened and a link to it in Eager. A button resolves it: **Mark handled** for a hand-off, **Dismiss** for a failed procedure, **Accept the change** or **Reject** for a procedure done another way. Reply in the thread to work on it with Coach, which reads what went wrong first. When it's resolved, anywhere, the thread says so.

## Who can do what

Eager knows people by their work email in Teams or Slack, matched to your org's members. Admins and owners can train agents, choose a channel for escalations and press the buttons. Other members are told to ask an admin, and people who aren't in your org are told Eager doesn't know them.

## Where Eager listens

* In a **direct message**, everything is for Eager. The conversation with Coach carries on until you say `new`.
* In a **channel**, Eager reads a message only when it's mentioned (`@Eager …`), or when it's a reply in a thread Eager started or answered. Each thread is its own Coach conversation. So that replies work without a mention, Slack and Teams send Eager every message in the channels it's in (in Teams, with the consent given when it's added to a team); the ones that aren't for it are dropped unread.

## Commands

| Say | What happens |
| - | - |
| `agent NAME` | Which agent you're talking about in this thread (and by default, if none is set). With one agent, it's that one |
| `new` | Starts a new Coach conversation |
| `escalations here` | Posts the org's new escalations in this channel (`stop escalations` to stop) |
| `link CODE` | Links this Teams tenant to your org |
| `help` | What Eager can do there |

## Set it up

### Slack

In the console, open **Settings → Connections → Chat apps** and click **Add to Slack**. Allow it in Slack, and the workspace is linked to your org. Invite Eager to the channel escalations should go to and say `@Eager escalations here`.

### Microsoft Teams

1. In **Settings → Connections → Chat apps**, click **Download the Teams app**.
2. A Teams admin uploads it in the Teams admin center (**Teams apps → Manage apps → Upload new app**), or with **Apps → Manage your apps → Upload an app** where custom apps are allowed.
3. Click **Make a link code** and send `link CODE` to Eager in Teams. The code works once, for 30 minutes.
4. Add Eager to a team, and in the channel escalations should go to, say `@Eager escalations here`.

A workspace links to one org at a time: one linked to another org stays there until an admin of that org unlinks it.

The same panel shows each linked workspace: choose the agent Coach talks about there by default, stop posting escalations, or unlink it. Unlinking stops Eager answering (it says it isn't linked) and posting there, and forgets its threads; the app stays installed until someone removes it.

## What's stored

For each linked workspace: its id and name, the channel escalations go to, and the default agent. For each thread: which Coach conversation and escalation it belongs to. For each person who wrote to Eager: their email there and the Eager member it matched, checked again daily. Slack's bot token is kept encrypted. The Coach conversations themselves are kept like any other, under your org's [retention](https://docs.guidinghand.ai/concepts/conversations.md).

## The API

| Endpoint | |
| - | - |
| `GET /v1/chat_apps` | Whether each app is set up, and your linked workspaces |
| `POST /v1/chat_apps/link_code` | A code to link a Teams tenant |
| `GET /v1/chat_apps/teams/package` | The Teams app's package |
| `PATCH /v1/chat_apps/workspaces/{workspace_id}` | `agent`, or `escalations: null` |
| `DELETE /v1/chat_apps/workspaces/{workspace_id}` | Unlinks it |

All of them need the admin role or an API key. Linking, choosing a channel and unlinking are in the [audit log](https://docs.guidinghand.ai/concepts/audit-log.md).


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