# Slack, Microsoft Teams and AI

Source: https://iskue.com/docs/chat-and-ai/

> Connect Iskue to Slack (two-way) and Microsoft Teams, and configure the optional AI provider: Anthropic or any OpenAI-compatible endpoint, off until an admin adds a key.

Chat and AI are Iskue features that talk to a third-party service, and both are **off until an administrator configures them**. Nothing is called while they are off. When you switch one on, the backend containers need outbound access to that provider.

## Slack, two-way

Create a Slack app for your workspace, then paste its **bot token** and **signing secret** into the project's chat settings (project admin). Secrets are write-only: the API never returns them. Then map Slack channels to the project, one project per channel:

- **Agent channel** — agents raise a ticket from a message by reacting with an emoji (`:ticket:` by default), and use `/iskue create`, `/iskue status` and `/iskue search`.
- **Request channel** — customers' messages become requests, optionally of a set request type. Public replies and status changes are posted back into the thread; internal notes never are, and a restricted ticket only posts "KEY updated".

Inbound Slack calls are verified with Slack's request signature (HMAC-SHA256, 5-minute replay window) against the signing secret of the project the channel belongs to. Outbound calls go only to `https://slack.com/api/*`. Set `PORTAL_BASE_URL` (or `app.chat.link-base-url`) so posts link back to the ticket. The older one-way Slack incoming webhook still works on its own.

## Microsoft Teams

Paste a Teams **incoming webhook** URL into the project's chat settings and choose which events to post. Iskue posts only to Microsoft's webhook hosts (`*.webhook.office.com`, `*.logic.azure.com`, `*.powerplatform.com`) over HTTPS, re-validated before every send.

## AI

An administrator configures AI once, under **Administration → AI**: the provider, the API key, the model and, optionally, a base URL. The key is write-only. AI is available on every edition — you bring the key — and stays off until it is switched on with one.

| Setting | Values |
| --- | --- |
| Provider | `ANTHROPIC` or `OPENAI_COMPATIBLE` |
| Model | Any model id. Defaults to `claude-opus-5-5`; `claude-sonnet-5-5` and `claude-haiku-5-5` are offered as cheaper choices. |
| Base URL | Optional. Points at a self-hosted OpenAI-compatible server or a gateway (http or https, no credentials in the URL). |
| Features | Four switches: portal answers, request-type suggestion, agent assist, natural language → TQL. |
| Monthly token budget | Default 2,000,000 tokens. Calls are refused once the month's input + output tokens reach it; usage is tracked per feature. |

### What the AI does

- **Portal answers.** Before a customer raises a request, the portal answers from the top 3 published, portal-visible articles, and only when the best match is relevant enough. Deflection is counted.
- **Request-type suggestion**, on the portal and for agents.
- **Agent assist.** A ticket summary, a reply draft (internal notes are left out) and "improve writing".
- **Natural language → TQL** on the search page.

### What reaches the model

Only what the feature needs, and only what the requesting user may read: portal answers see portal-visible articles; agent assist sees the ticket and comments the agent can open, with restricted-ticket visibility applied; NL → TQL sees the grammar and the caller's own autocomplete values. Each block is size-capped and treated as data. Logs record the feature, model, token counts and latency — never content. A **Test** button in the admin screen checks the connection before you switch features on.
