# Reply and approve from Slack or Discord

Link your chat account, then resolve, snooze and take over conversations, leave notes, run tools, approve tool calls and get pinged about waiting work without opening Median.

Everything here needs a connected [Slack workspace](/articles/mirror-conversations-into-slack) or
[Discord server](/articles/set-up-discord-support), and a linked chat account for each person
who uses it.

| Feature | Slack | Discord |
| --- | --- | --- |
| [`/note`](#leave-a-note) | Anywhere in the workspace | In a mirror thread or a ticket channel |
| [`/c`](#commands) | Anywhere in the workspace, with the conversation's id | In a mirror thread or a ticket channel |
| [`/t`](#tools) | Anywhere in the workspace, with the conversation's id | In a mirror thread or a ticket channel |
| [Tool approvals](#approve-tool-calls) | In the conversation's mirror thread | In the conversation's mirror thread |
| [Attention pings](#attention-pings) | In the mirror channel, or a conversation's thread | In the mirror channel, or a conversation's thread |
| [The assistant](/articles/ask-the-assistant) | Direct messages and mentions | Direct messages and mentions |

## Link your account

1. **Ask for a link**

   Message the assistant, run `/note`, or run `/c` or `/t` on a conversation.
   An account Median does not know gets a link. The assistant answers "I do not know who you are in
   Median yet. Open this while signed in and say hello again." with a
   **Link my account** button.

2. **Open it signed in**

   Open the link in a browser signed in to Median, with the organization you
   want selected. Select **Link account**. If you are signed out, select
   **Sign in to link** first.

3. **Check it worked**

   The page reads **Account linked**. In the thread where the assistant sent
   the link, it answers "Linked as Ada. Ask away." with your name.

| Rule | Detail |
| --- | --- |
| Slack email match | A Slack account whose email matches a member of the organization that installed the app links itself when it messages the assistant. No link is needed. `/note`, `/c` and `/t` do not match by email |
| Link lifetime | 15 minutes, and one use. An unused link older than that reads "This link has expired". A used link reads **Account linked** until the hourly cleanup removes it |
| One organization | A chat account links to one person in one organization, the one open when you select **Link account**. Linking it again moves it |
| Membership | Checked on every use. Leave the organization and the account stops working there |
| Privacy | Linked accounts are personal. Nobody else sees yours |

### Manage linked accounts

**Settings → General → Chat accounts** lists the accounts you linked, with the
platform and when you linked each one. **Unlink** asks to confirm with
"Messages from that account stop reaching the assistant until you link it
again."

With nothing linked, the section reads "Message the assistant in Slack or
Discord to get a link to connect your account."

## Leave a note

A note lands in the conversation under your name. Customers never see it. It
is the same as a note written in the [inbox](/articles/work-the-inbox).
**Discord**
Run `/note text:` in a mirror thread or a ticket channel. The note goes on that
conversation. Up to 2,000 characters.

**Slack**
Run `/note` anywhere in the workspace. **Add a note** asks for the
**Conversation**, from the 25 most recent that are not archived, and the
**Note**. Select **Add**.

Only you see the answers.

| Answer | Means |
| --- | --- |
| "Note added to" and the conversation | Done |
| A note needs some words. | The note was empty |
| This channel is not a conversation. | Discord only. Run it in a mirror thread or a ticket channel |
| That conversation is not yours. | Slack only. The conversation belongs to another organization |
| There are no conversations to act on yet. | Slack only. The organization has no conversations that are not archived |
| "Link this Slack account to Median first" or "Link this Discord account to Median first", with a link | Your account is not linked |

## Commands

`/c` runs the inbox's conversation commands, the same ones the composer offers
in the [inbox](/articles/work-the-inbox).
**Discord**
Run it in a mirror thread or a ticket channel. It acts on that conversation.

```text
/c resolve
/c snooze for:A day
/c take-over
```

**Slack**
Run it anywhere, with the conversation's id. The id is on the first post of
each mirror thread, like `W-12`. A link to the conversation works too, which
is how to name a thread opened before ids were shown.

```text
/c resolve W-12
/c snooze W-12 day
/c take-over W-12
```

`/c` on its own lists the commands.

| Command | Does | Applies when |
| --- | --- | --- |
| `resolve` | Resolves it | The conversation is open |
| `reopen` | Reopens it | The conversation is resolved or closed |
| `close` | Closes it | The conversation is open |
| `snooze` | Snoozes it for an hour, a day or a week. On Slack, type `hour`, `day` or `week`, or `1h`, `1d` or `1w` | Always. These are fixed lengths, since chat has no clock to read |
| `wake` | Wakes it up now | The conversation is snoozed |
| `archive` | Archives it | The conversation is in the inbox |
| `unarchive` | Moves it back to the inbox | The conversation is archived |
| `take-over` | Takes it over from the agent | The agent is answering it, or it is waiting for a person |
| `hand-back` | Hands it back to the agent | It was taken over, and your plan includes the agent |
| `read` or `unread` | Marks it as read or unread | Whichever fits |

Each command happens under your name, the same as in the inbox. One that does
not apply says why, like "Grace · Refund is already resolved."

## Tools

`/t` runs one of your team's switched on [tools](https://docs.median.sh/agent/tools) on a
conversation. Tools and their arguments are named in lowercase with dashes, so
a `refundOrder` tool with an `orderId` argument is `refund-order` with
`order-id`.
**Discord**
Run it in a mirror thread or a ticket channel. Each tool is a subcommand and
each argument an option, so Discord shows what a tool takes as you type.

```text
/t refund-order order-id:1182 notify:True
```

| Argument | Shows as |
| --- | --- |
| Yes or no | `True` or `False` |
| A choice of up to 25 values | A menu |
| Anything else | Text |

- Only members with **Manage Messages** see `/t`, so customers never see your
  tools. To change who sees it, open **Server Settings → Integrations →
  Median** and pick roles for `/t`.
- Each server's `/t` lists up to 25 tools, sorted by label, and fewer when their options pass Discord's size limit. It updates a few
  seconds after a tool is switched on or off.
- A tool with more than 25 arguments, or a name Discord does not accept, is
  left out. Run it in Median.
- A server with no tools switched on has no `/t`.

**Slack**
Run it anywhere, with the conversation's id, then each argument as
`name=value`. Quote a value that has spaces.

```text
/t refund-order W-12 order-id=1182 reason="Arrived late"
```

| Run | Answers |
| --- | --- |
| `/t` | Your tools, with the risk of any above low |
| `/t refund-order` | What the tool takes, and an example |

A yes or no argument takes `yes` or `no`. A choice takes its value or its
label.

Running a tool follows the same rules as running it from the inbox. See
[Approve tool calls and run tools](/articles/approve-tool-calls-and-run-tools). The answer reads "Running" and
the tool's name, then "ran." or "did not run:" with the reason.

## Answers

Only you see these.

| Answer | Means |
| --- | --- |
| "Resolved", "Snoozed" and so on, with the conversation | Done |
| The conversation, then "is already resolved", "is not snoozed" and so on | The command does not apply to it right now |
| The conversation, then "is waiting for a person. Take it over first." | `hand-back` needs the conversation taken over first |
| This channel is not a conversation. | Discord only. Run it in a mirror thread or a ticket channel |
| "No conversation called" and the id | Slack only. The id is not in your organization's inbox |
| Add the conversation's id, like /c resolve W-12. | Slack only. The id is missing |
| Say how long, like /c snooze W-12 day. | Slack only. `snooze` needs a length |
| `"x" is not a command. Run /c to see them.` or "is not one of your tools." | Slack only. The first word is not a command or a tool. Run `/c` or `/t` on its own to see them |
| That command is not one Median knows. Try /c again. | Discord only. The command is not one of `/c`'s |
| Your team has no tools switched on. | Slack only. `/t` has nothing to run. Switch a tool on under **Agent → Tools** |
| "has no argument called" | Slack only. The tool does not take an argument by that name |
| The tool's name, then "needs" and the arguments | Slack only. A required argument is missing |
| Handing conversations back to the agent is available on Standard and Pro. | Your plan does not include the agent |
| The tool's name, then "is not one of your switched on tools." | The tool was switched off |
| That tool is no longer switched on. | Discord only. The tool was switched off after `/t` last updated |
| Median is still starting up. Try again in a moment. | Discord only. The bot restarted a moment ago |

## Approve tool calls

When an agent tool call waits for the team, Median posts an alert with buttons.
That happens for a high risk call, or a reviewed call passed to the team. See
[Risk levels](https://docs.median.sh/agent/tools#risk-levels).

- The alert posts in the conversation's mirror thread. Median opens a thread if
  the conversation has none yet. A Discord ticket's alert also goes to the
  mirror thread, never the ticket channel the customer can see.
- Slack and Discord each need a mirror channel picked. The **Slack mirror** and
  **Discord mirror** switches can be off.
- It mentions every member with a linked account on that platform, 50 to a
  message. Nothing is posted when nobody has linked an account there.
- Nothing is posted if the request expired or was already decided, or the
  conversation was resolved, closed or archived, before the alert went out.

The alert reads "A tool needs approval." with the tool's name.

| Button | Does |
| --- | --- |
| **Approve** | Runs the tool. The alert changes to "Approved. The tool is running." |
| **Deny** | The tool does not run. The alert changes to "Denied. The tool will not run." |
| **View request** | Opens the conversation in Median |

Only a linked account of a current member can decide. Deciding here is the same
as deciding in the inbox, see [Approve tool calls and run tools](/articles/approve-tool-calls-and-run-tools).
Only you see these answers:

| Answer | Means |
| --- | --- |
| Link your chat account to a current team membership in Median first. | Your account is not linked, or you left the organization |
| This request has already been reviewed. | Someone decided it first |
| This request is unavailable in your inbox. | The request belongs to another organization |
| The review could not be saved. Try again. | Discord only. The decision did not save |
| The review could not be saved. Check its status in Median before retrying. | Slack only. The decision did not save |

## Attention pings

Median pings as soon as the agent asks for a person or asks the team a question. Once a minute, it also checks what else is waiting on [Home](/articles/find-your-way-around-the-dashboard#home)
and posts a ping for each new item. A ping reads
"Something needs attention in Median." with the item and a link to it.

| Item | Ping names | Who is mentioned |
| --- | --- | --- |
| A conversation where the agent asked for a person | "Median needs a person" and the subject | Everyone |
| A question the agent asked the team | "Median has a question" and the subject | The assignee, or everyone when it has none |
| An unread conversation a teammate took over | "Needs your reply" and the subject | The assignee, or everyone when it has none |
| A pending knowledge suggestion | "Knowledge suggestion" and its title | Admins and owners |
| A pending tool suggestion | "Suggested tool" and its title | Admins and owners |
| An open signal | "Open signal" and its title | Everyone |
| A fix commit to confirm | "Fix to confirm", the signal and the commit | Everyone |
| A document that failed to index | "Document failed to index" and its title | Everyone |
| A repository that is not syncing | "Repository is not syncing" and the repository | Everyone |
| A failing tool endpoint | "A tool endpoint is failing" | Everyone |
| A failing webhook | "A webhook is failing to deliver" | Everyone |

"Everyone" means every member with a linked account on that platform. A ping for an assignee who has not linked an account there is not posted. See
[Roles and permissions](/articles/roles-and-permissions) for who counts as an admin.

- A ping about a conversation posts in its mirror thread, Discord tickets
  included.
- Every other ping posts in the mirror channel.
- Pings follow the same channel rules as [tool approvals](#approve-tool-calls).
- Each item pings once per platform. If it clears and comes back, it pings
  again. Every new handoff and every new question pings again.
- The ping stays in the channel after the item clears.
- An organization with no linked accounts gets no pings.

## Talk to the assistant

A linked account also reaches the Median assistant in direct messages and
mentions. See [Assistant](/articles/ask-the-assistant).
