# Copilot for Human Support Teams

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FYkawxlq4hqsEE5MGwDF1%2FUntitled%20design%20-%202025-09-03T181009.244.png?alt=media&#x26;token=0309ebbc-32e2-4959-a567-963299831753" alt=""><figcaption></figcaption></figure>

Copilot is a built-in AI assistant that helps live agents resolve inquiries faster. When an operator clicks **Solve with AI** in the console, Copilot analyzes the conversation and searches your Knowledge Base (KB) to propose a ready-to-send answer. Operators review, tweak if needed, and send — no manual prompting required.

### Availability and Activation

**This feature is available only on the Business and Enterprise plans.** To enable it, email <support@tiledesk.com>.

We will activate Copilot on your project and can schedule a walkthrough to help your team configure it and get the most out of it.

### Using Copilot in the Agent Dashboard

1. Open the Tiledesk agent dashboard.
2. Open any active conversation.
3. Click **Solve with AI** (top right). The Copilot flow runs and returns a suggestion.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2F6rnvJRD3REj3ZOki8sC5%2FAlessandro%20(1).gif?alt=media&#x26;token=32c5e4eb-d58a-466a-ae22-21018d8e3031" alt=""><figcaption></figcaption></figure>

### Set Up the Copilot Flow

1. In the dashboard, go to **Flow** (left sidebar).
2. Click **New Flow** → **Automation** → **Copilot**.
3. Name the flow (e.g., *Copilot for Human Agents*) and choose the **Knowledge Base** to query (e.g., *Default*).

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2F6g126neNEbWMaaQnKM6H%2FScreenshot%202025-08-08%20at%2012.01.33.png?alt=media&#x26;token=7e2a9c27-2b82-4ea2-a1e8-e4e7a8b52659" alt=""><figcaption></figcaption></figure>

### How It Works

The Copilot automation is built in the Visual Flow Designer and is triggered by a webhook when the human **agent clicks the button.** Below are the two execution paths, with the exact block names as they appear in the template.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FMLiFDatuYBdmUewd9sIf%2FScreenshot%202025-08-08%20at%2015.20.24.png?alt=media&#x26;token=04a76fdc-cde9-41ca-8a99-153480a68c37" alt=""><figcaption></figcaption></figure>

#### Trigger

* Webhook payload provides `payload.text` (customer message) and `payload.request_id` (conversation ID).
* `extract_message_and_request_id` stores them in `message` and `request_id`.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2F4Yt3LSacQKjT2oX5FCvv%2FScreenshot%202025-08-08%20at%2015.22.08.png?alt=media&#x26;token=8635f3f7-e375-4f47-af34-fcf58169b7c6" alt=""><figcaption></figcaption></figure>

#### Message Validation

* `check_message` routes the flow:

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FAJE95LuXpbYhTpMpEkOU%2FScreenshot%202025-08-08%20at%2015.23.30.png?alt=media&#x26;token=4ee87f69-0760-4d6e-8aeb-919dcb9ccb5a" alt=""><figcaption></figcaption></figure>

* **Message missing** → *Transcript Recovery Path (Blue block)*
* **Message present** → *Direct Message Path (Green Block)*

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FjXkXiBCayFBsS6bbp1oW%2FScreenshot%202025-08-08%20at%2015.24.55.png?alt=media&#x26;token=c3e50314-d5f3-4659-aec7-742b8a577fc3" alt=""><figcaption></figcaption></figure>

#### Transcript Recovery Path (message missing)

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FmDxRW4LVIzZth8V0pSZs%2FScreenshot%202025-08-08%20at%2015.27.31.png?alt=media&#x26;token=c8570d15-75d8-47f9-91c0-179684684b43" alt=""><figcaption></figcaption></figure>

**1- check\_request\_id** → if missing, go to `no_msg_no_req` (HTTP 400).

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FpwQPjXes2Hero4hldWXN%2FScreenshot%202025-08-08%20at%2017.01.10.png?alt=media&#x26;token=629b94de-4100-4487-824b-b48ba46e688e" alt=""><figcaption></figcaption></figure>

**2- get\_request** → fetch conversation messages using `request_id`.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2Fjjg9hqWfJ65Ryc7LbQKE%2FScreenshot%202025-08-08%20at%2017.01.47.png?alt=media&#x26;token=88843d2e-d5a9-4cf0-92e4-97ad2c66e89a" alt=""><figcaption></figcaption></figure>

**3- create\_transcript** → build `transcript` from human-authored messages only (filter out items with `subtype`, `intentName`, `messageLabel`), formatted as *SenderName: message*.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2Fvgam15Dq5LODbBtyYte0%2FScreenshot%202025-08-08%20at%2017.03.13.png?alt=media&#x26;token=f3369a20-358a-4470-9523-98356c74f9d0" alt=""><figcaption></figcaption></figure>

**4- extract\_question** (ChatGPT task) → summarize the last unresolved issue from `transcript`; if none, return `NULL`.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FdtoQVNR8RIRkxub30hsk%2FScreenshot%202025-08-08%20at%2017.04.08.png?alt=media&#x26;token=221e2006-3190-497f-936d-30a8e5416890" alt=""><figcaption></figcaption></figure>

**5- check\_question** → if `gpt_reply == "NULL"`, go to `return_no_content_1` (HTTP 404); else continue.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FEh3br8Jpzr0MrCYzmI0t%2FScreenshot%202025-08-08%20at%2015.33.47.png?alt=media&#x26;token=a246883b-6b36-4370-99bf-d1187b57377d" alt=""><figcaption></figcaption></figure>

**6- ask\_kb\_from\_request** → query KB with `{{gpt_reply}}`.

* Success → **return\_response\_request** (HTTP 200, sends `kb_reply` to Copilot UI).
* Else → **return\_no\_content\_2** (HTTP 404).

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FS1yH9T4ZqkWDAaFOYIyC%2FScreenshot%202025-08-08%20at%2015.35.34.png?alt=media&#x26;token=a50b77ea-e980-4f18-b11e-2081c811e9bd" alt=""><figcaption></figcaption></figure>

#### Direct Message Path (message present)

**1- extract\_issue\_ai** (ChatGPT task) → validate and rewrite `{{message}}`; return `NULL` if not actionable.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FAfXgZLmiCjljOnbweYjD%2FScreenshot%202025-08-08%20at%2015.36.55.png?alt=media&#x26;token=3186bcbd-5968-467d-86a5-81e9b9b24dfe" alt=""><figcaption></figcaption></figure>

**2- check\_no\_issue** → if `gpt_reply == "NULL"`, go to `return_no_content_3` (HTTP 404); else continue.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2F4KaxzdGndJavXHTpRtLb%2FScreenshot%202025-08-08%20at%2015.39.08.png?alt=media&#x26;token=2f474ac0-49df-4a83-8a76-f0aac7ea6b25" alt=""><figcaption></figcaption></figure>

**3- ask\_kb\_from\_message** → query KB with `{{gpt_reply}}`.

* Success → **return\_response\_message** (HTTP 200).
* Else → **return\_no\_content\_4** (HTTP 404).

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FeDN34DPD1wUFhfgvxTpw%2FScreenshot%202025-08-08%20at%2015.40.04.png?alt=media&#x26;token=8dedb221-88a7-4503-96fa-1424ffeb41f3" alt=""><figcaption></figcaption></figure>

4- We’re almost done! The final step is to publish the flow using the blue button at the top right. You’re all set!

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2Fdp0CQW6qGhKlYXkjNY6c%2FScreenshot%202025-08-08%20at%2015.51.59.png?alt=media&#x26;token=a654653c-56d3-4225-ba8f-1638a0756bc8" alt=""><figcaption></figcaption></figure>

### How to Test Copilot for Human Support

To make testing easier, we prepared a simple mini AI Agent that triggers the **Transfer to human** action.

1. Add a button in your Agent flow and link it to the [transfer-to-a-human](https://guide.tiledesk.com/ai-chatbots-and-automation/actions-explained/transfer-to-a-human "mention") action.
2. Run the flow using the **Test** icon in the top-right corner of the editor.
3. In the conversation preview, click the **Talk with Operator** button.
4. Ask a question to start the test.
5. An operator will automatically be assigned to the conversation.
6. Go to the **Operator Dashboard** and open the conversation.
7. In the top-right corner, click **Solve with AI**.
8. Copilot will retrieve the answer from the connected Knowledge Base and display it for review.
9. The operator can tweak the suggestion if needed, then press **Send** to reply instantly.

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FrRqjEAXiqQGjTz5uH19n%2FAlessandro.gif?alt=media&#x26;token=8e907bdf-af3f-4f0c-b612-3dfab8bd442c" alt=""><figcaption></figcaption></figure>

### Flow Variables

| Variable     | Purpose                                                       |
| ------------ | ------------------------------------------------------------- |
| `message`    | Last customer message from webhook payload.                   |
| `request_id` | Conversation ID used to retrieve history and route replies.   |
| `transcript` | Clean, human-only conversation history built from `messages`. |
| `gpt_reply`  | AI-generated question for KB search.                          |
| `kb_reply`   | Knowledge Base answer returned by the Ask KB blocks.          |
| `kb_source`  | Source document/page for the KB answer (optional).            |

### Return Values to the Copilot UI

* **200 OK** → Copilot displays `kb_reply` (and optionally `kb_source`) for the agent to review.
* **404 Not Found** → No suggestion was found.
* **400 Bad Request** → Missing required data (`message` or `request_id`).

### Customization

* Adjust AI prompts for question extraction.
* Point to specialized Knowledge Bases.
* Include source citations for transparency.
* Add language detection and translation for multilingual support.

### Benefits

* 2× faster replies
* Less cognitive effort
* More consistent answers

Review the suggestion, tweak if needed, and send.

### Ready to Equip Your Team with Copilot?

Teams using Copilot are already resolving inquiries faster and with less effort.\
Don’t let your agents miss out — **email us today at** [**support@tiledesk.com**](mailto:support@tiledesk.com) to activate Copilot for your team and start boosting productivity right away.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.tiledesk.com/ai-chatbots-and-automation/knowledge-base/copilot-for-human-support-teams.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
