# Zendesk

![zendesk_logo.png](https://assets.relyanceuat.xyz/images/docs/6703662201101/6704513358989.png)
Zendesk is a cloud-based software-as-a-service help desk management solution provides companies with a method of tracking and responding to customer service requests. It provides customizable tools to build customer service portals, knowledge bases, and online communities.

In order to integrate Zendesk with Relyance AI you will need a **Zendesk Subdomain**, **Client ID**, **Client Secret**, and follow an **OAuth2** flow.

#### In Zendesk:

You will need to create an OAuth 2.0 application in Zendesk.

1. Login to your Zendesk account.
2. Go to the **Admin Center**.
3. Click on the **Apps and integrations** section in the left-side navigation menu.
4. Select the **Zendesk API** menu item.
5. Navigate to the **OAuth** **Clients** tab.
6. Click on the **Add OAuth client**.
7. Fill all the fields:

**Client name:** Relyance AI
**Description**: << A quick description >>
**Company**: << Your Help Center name >>
**Logo**: [See attached](https://support.relyance.ai/hc/en-us/article_attachments/6704552163213/Relyance_logo.png)
**Unique identifier**: relyance_ai
**Redirect URLs**: [https://root.relyance.ai/api/oauth2](https://root.relyance.ai/api/oauth2)

![Zendesk-3.png](https://assets.relyanceuat.xyz/images/docs/6703662201101/6704171367053.png)

8. Under **Client Kind** select **Confidential**.
9. Click **Save**.
10. Scroll to the bottom of the page to get the Secret.

![Zendesk-4.png](https://assets.relyanceuat.xyz/images/docs/6703662201101/6704238862093.png)

11. Copy the **Unique Identifier** and **Secret** to be used in Relyance AI as the **Client ID** and **Client Secret**.
The **Client ID**, as per the settings above, will be '**relyance_ai**'.
12. The **Zendesk Subdomain** will be the subdomain found in your Admin Center's URL.

![Zendesk-5.png](https://assets.relyanceuat.xyz/images/docs/6703662201101/6704380725517.png)

### Permissions and limits

Zendesk has one method, **Oauth2 / App Token**, taking the **Zendesk Subdomain**,
**Client ID** and **Client Secret** of an OAuth client you create. The
authorisation requests the `read` scope, and `write` in addition when DSR
fulfilment is enabled — without `write`, a DSR delete cannot be carried out.

**Maximum Number of Records** is required and defaults to 5000. It caps how much
Relyance pulls per scan, so raise it if your ticket volume is higher than that and
you need full coverage.

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **Zendesk** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Oauth2 / App Token**.
8. Paste the **Zendesk Subdomain**, **Client ID**, and **Client Secret** into their respective fields.

![Zendesk-1.png](https://assets.relyanceuat.xyz/images/docs/6703662201101/6703607276173.png)

9. Click **Authenticate**.
10. This will bring up Zendesk to allow Relyance permissions to connect. Click **Allow**.
An admin account will be required to allow the integration app.
11. At this point, you should see the following result on the Vendor Integrations page:

![Zendesk-2.png](https://assets.relyanceuat.xyz/images/docs/6703662201101/6703583640589.png)

12. Congratulations, you are now connected to **Zendesk**.

![Naming a new Zendesk connection](https://assets.relyanceuat.xyz/images/docs/ui/zendesk/03-add-connection.png)

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

The **OAuth (browser authorization)** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example zendesk/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

<!-- terraform-examples:end -->
