# AI Ticket Deflection

<figure><img src="https://3500333410-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8Mly5TzbK30rAk6_PN%2Fuploads%2F2c671oV5Vjhv5Au8RR3U%2Fticket%20deflection%20in%20slack.gif?alt=media&#x26;token=5789bc1c-4e2f-4d23-9bd8-0a34aca205dc" alt=""><figcaption></figcaption></figure>

### How it works

First, add links to public-facing documents to your inbox, [connect to Notion](https://docs.wrangle.io/integrations/notion), or upload PDF documents if you prefer to work with private documentation.\
\
These documents contain answers to common questions you get in this inbox; for example, documentation for HR inboxes might include benefits information, your employee handbook, and instructions for accessing your company's HR portal.\
\
Wrangle's AI reads your documentation and looks for an answer whenever new questions are submitted to your intake channel.\
\
If Wrangle finds an answer, it will reply to the request with a summary of its findings, links to the relevant documentation, and the option to either close the issue or open a ticket.

If Wrangle doesn't find an answer, it will automatically open a ticket.

#### Requirements for ticket deflection

Ticket deflection is part of the Scale plan. **Contact us** at <sales@wrangle.io>, or reach out to us over live chat [here](https://slack.wrangle.io/support) to discuss adding it to your Wrangle account.

### Document links

You may use public-facing URLs (such as <https://wrangle.apidocumentation.com/>) for AI ticket deflection. Wrangle will automatically scan your content (every 24 hours) for updates, so we recommend you use this option when possible.&#x20;

#### How link following works

When you add a public URL to AI Ticket Deflection (like your help center or documentation), Wrangle doesn't just read that single page. It automatically discovers and indexes up to 50 additional pages linked from your original URL.

**Example:**

* You add: `yourcompany.com/help`
* AITD indexes that page, plus follows links to pages like:
  * `yourcompany.com/help/billing`
  * `yourcompany.com/help/setup`
  * `yourcompany.com/help/troubleshooting`
  * (up to 50 linked pages total)

### Document uploads

If you have your documentation in a private knowledge base or wiki, you'll first need to export any relevant articles or pages as PDFs. If your knowledge tool does not include an export-to-PDF option, you can copy and paste the page contents to a Google Doc or Word document, then save that as a PDF.&#x20;

Once your PDFs are ready, navigate to your Inbox Settings, open the AI Ticket Deflection tab, then click Add Documents. You can add up to 100 documents, as long as none of them exceed 10MB. If you need to edit a document, you can delete it from your inbox and upload the updated version.

### How tickets work with deflection enabled

Once ticket deflection is enabled and your help documents have been uploaded or linked to Wrangle, Wrangle's AI will start attempting to answer questions as they come in.

When Wrangle finds a match in your documentation, it will reply to the requester's message with both a summary of its answer, as well as links to the corresponding documentation. It'll also ask the requester whether their question has been answered, or if they'd like to open a ticket.

<figure><img src="https://3500333410-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8Mly5TzbK30rAk6_PN%2Fuploads%2FCOhW9zW0J3QJjY0u34jP%2FScreenshot%202024-03-29%20at%2012.59.19%20PM.png?alt=media&#x26;token=9aaf4946-7acc-4d3f-a4fa-b95a2b06d304" alt="" width="563"><figcaption><p>Wrangle's AI answering an incoming question</p></figcaption></figure>

If the requester selects "Yes, this answered my question" Wrangle will not open a ticket. If the requester selects "No, start a ticket" Wrangle will open a ticket directly within the thread.&#x20;

<figure><img src="https://3500333410-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8Mly5TzbK30rAk6_PN%2Fuploads%2Fx7ml5ebMo48j9an2cQjx%2Fticket%20deflection%20unsuccessful%20response.png?alt=media&#x26;token=381b1415-01dc-4813-9482-52c05354bfda" alt="" width="494"><figcaption><p>Wrangle's AI can't find an answer, so it opens a ticket</p></figcaption></figure>


---

# 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://docs.wrangle.io/tickets/ai-powered-ticketing/ai-ticket-deflection.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.
