# Zendesk Knowledge Ingestion

Most Zendesk implementations contain two data sources - **Tickets** and **Knowledge Base Articles** (Solutions for customer-reported issues).

The Aisera Admin UI contains a pre-mapped connector for a Zendesk product data store. \
In the first part of the connection task, you will specify the Integration authorization while working with your Zendesk Administrator. Depending on the authorization type that the administrator wants you to use, they may need to create an OAuth2 application for your Aisera Tenant instance to connect with.\
\
See also: [Content Access Control via APIs](https://docs.aisera.com/aisera-platform/adding-data-to-your-tenant/content-access-control/content-access-control-via-apis)\
\
The second part of the connection task involves mapping the data source for your Aisera Tenant instance. In this step, you will create a Data Source using the Aisera Admin UI. The Zendesk connector is pre-mapped, so you should only need to map custom fields, if you have any.

## To create a Zendesk Integration for your Aisera Tenant:

1. Navigate to **Settings > Integration** in the Aisera Admin UI.
2. Choose the **+ New Integration** button in the upper-right corner of the window.
3. Type Zendesk into the Search field.
4. Select the Zendesk icon and click Next.
5. For this step, you need to collaborate with the Zendesk administer and determine which authorization type they want to give you to access their Zendesk data source. The supported types appear as drop-down choices on the **Step 2 of 3: Configuration** window. &#x20;

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FA86T0SGRdubUT09DTNLh%2Fzendesk_auth2.png?alt=media&#x26;token=869d090c-3259-4792-bbb8-6b0a14212514" alt="" width="563"><figcaption></figcaption></figure></div>

Two of the most common authorizations are **Basic** and **OAuth2**.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F3UY1nW5pMADIs0uaIhtQ%2Fzendesk_integ3.png?alt=media&#x26;token=8ce73243-b66a-4a2b-ab8e-488bb17c6472" alt="" width="563"><figcaption></figcaption></figure></div>

If the Zendesk administrator gives you **Basic** authorization, you will need a username and possibly a password.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F2TjYDzvD5lJDd3tbXXmz%2Fzendesk_auth4.png?alt=media&#x26;token=74ff47db-0f3f-4b5b-85d1-76da3a2abf02" alt="" width="563"><figcaption></figcaption></figure></div>

If the Zendesk administrator gives you **OAuth** or **OAuth2** authorization, you will need to add the Client ID, Client Secret, and a Zendesk API Token for the Zendesk application that you're using as a data source.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FvP1tDaq5eiHoi4g9YnBj%2Fzendesk_auth5.png?alt=media&#x26;token=1b98c540-7f41-43e9-b1cf-5d1167da94d5" alt="" width="563"><figcaption></figcaption></figure></div>

Add the credentials from your Zendesk administrator and click **OK.**

## To add a Zendesk Data Source to your Aisera Tenant: <a href="#pdf-page-ufhbplegsm7egie61qlx-pdf-page-ks0vcddgjndxhpwr915b-id-2.-create-a-zendesk-data-source" id="pdf-page-ufhbplegsm7egie61qlx-pdf-page-ks0vcddgjndxhpwr915b-id-2.-create-a-zendesk-data-source"></a>

**Pre-requisiite:** Set up a Zendesk Integration for your Aisera tenant, and then you can add a data source.

1. Navigate to **Settings > Data Source.**
2. Click **+ New Data Source** and search for Zendesk.
3. Select the **Zendesk Icon** and click **Next.**
4. Enter the **General Details** and click **Next**.

| Name        | Description                                                                    |
| ----------- | ------------------------------------------------------------------------------ |
| Name        | Name of the Data Source                                                        |
| Integration | Select the Integration created in the step above                               |
| Functions   | Select one or more of the “Functions” for which this Data Source will be used. |
| Schedule    | Select the schedule of the DS you want it to run.                              |
| Description | Optional Description can be added                                              |

&#x20;       **Note:** The parameters below are optional.

5. Enter the configuration details and click **Next**.

| Name                  | Description                                                                                                                                                                                                                                                             |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Max Count             | The maximum number of concurrent processes                                                                                                                                                                                                                              |
| Ingest Macros         | <p>Select if you want to associate macros to tickets -</p><p>Example:</p><p>Zendesk A macro is a prepared response or action that an agent can manually apply when they are creating or updating tickets. Macros contain actions that can update ticket properties.</p> |
| Ingest Comments       | Ingest Comments                                                                                                                                                                                                                                                         |
| Event Type            | Enter the type of the Event                                                                                                                                                                                                                                             |
| Custom Query          | Optional field only if needed                                                                                                                                                                                                                                           |
| Transformation Script | Optional Description can be added                                                                                                                                                                                                                                       |

6. Select the Template (Optional).
7. Enter the Ingestion configuration.

| Name                                 | Description                                                                                                                                                                       |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ignore Unsupported Documents         | Ignore all documents of non-supported formats if true, otherwise, they will be parsed as plain text                                                                               |
| Filter Out Non-ASCII Characters      | Indicates whether non-ASCII characters will be removed during parsing (applicable only in Western character sets)                                                                 |
| Add Contents Section                 | Use font properties to delineate section start                                                                                                                                    |
| Merge Sections With Similar Subjects | If selected, a section listing the top-level sections is created for applicable documents                                                                                         |
| Use Predefined Section Titles        | A comma-separated list of words, sentences, or regular expressions will be used as section titles for every matching line of text; a value of {} activates default section titles |
| Show Sections As Images              | If selected, each page of the parsed document becomes a section, ignoring any section limits within the page                                                                      |
| Copy Images During Parsing           | If selected, images will be copied from the source to an Aisera server, for faster presentation                                                                                   |
| Renamed HTML Tags                    | Specifies HTML tags to be replaced before parsing. For example, to replace \<span> with \<p>, use tag=span,replacetag=p                                                           |
| HTML Parameters                      | Custom parameters applicable to HTML document parsing                                                                                                                             |
| PDF Parameters                       | Custom parameters applicable to PDF document parsing                                                                                                                              |

8. Navigate to Settings > Data Sources and choose the Data Source that you just created.
9. At the top of the Data Source window, click the triangle button to perform the data ingestion.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FiafwxYtLwsjoLMTUPQKb%2Fzendesk_ds_integ.png?alt=media&#x26;token=84bf375f-e0c6-4557-b2ea-150a15a3fd6f" alt="" width="563"><figcaption></figcaption></figure></div>

10. Look at the bottom of the Data Source window to see the fields that are mapped from your data source to the Aisera platform. In this example, both Ticket fields and Knowledge fields have been ingested into the Aisera platform and you can see the mapped fields for each by looking at the data on each tab.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FYwOyi03Ipmzjob3JB1bm%2Fingested_fields.png?alt=media&#x26;token=8e31659f-a917-4101-a41e-4ee9ac4dbce7" alt="" width="563"><figcaption></figcaption></figure></div>

11. Adjust the field mapping, as needed, using the buttons at the bottom of the window.

### Review Crawled Knowledge Documents <a href="#pdf-page-ufhbplegsm7egie61qlx-pdf-page-ks0vcddgjndxhpwr915b-id-3.-review-crawled-knowledge-documents" id="pdf-page-ufhbplegsm7egie61qlx-pdf-page-ks0vcddgjndxhpwr915b-id-3.-review-crawled-knowledge-documents"></a>

After the Data Source run completes, the administrator may review all the knowledge documents and ingested sections.

To view all the ingested documents:

1. Navigate to AI Workbench on the left-hand main navigation panel.
2. Click the **Review > Knowledge Review** tab at the top of the page.
3. You will see `Commit Reviewed` and the number of documents that are ingested.
4. Since this is the first crawl, all the documents are in `Reviewed` status by default.
5. Click on **Commit Reviewed** and click **Commit**.
6. Now, click on the **Knowledge** tab in the left panel and you will see all the ingested documents. (It might take a couple of minutes to show/load the docs in the knowledge tab)

<br>
