> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refold.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

> Connect to your Zendesk Sell app for OAuth.

Refold offers both **Key Based** and **OAuth 2.0** integration for Zendesk Sell. In this guide, we will look at the OAuth App setup process.

To setup your Zendesk Sell app in Refold for OAuth, you will need the following credentials from your [Zendesk Sell Developer Console](https://developer.zendesk.com/documentation/):

* Client ID
* Client Secret

### Pre-requisites

1. Zendesk Sell Developer account. You can create one [here](https://www.zendesk.com/register/?source=zendesk_sell#step-1).

<Info>If you haven't already created an app in Zendesk Sell, you'd need to create one.</Info>

### Creating an app in Zendesk Sell

To create a Zendesk Sell app and acquire the above mentioned credentials, please follow the steps mentioned below:

1. Log in to your [Zendesk Sell Developer Console](https://developer.zendesk.com/documentation/).
2. Click on the `Settings` icon in the side menu and select `OAuth` under `Integrations` section.

<img height="200" src="https://mintcdn.com/cobalt-55/PicQQg0XJq1JrBVB/images/Zendesk/zendesk_navigation.png?fit=max&auto=format&n=PicQQg0XJq1JrBVB&q=85&s=05d95815236a8fd711ab68d93c46b7de" alt="Navigation for App setup" data-path="images/Zendesk/zendesk_navigation.png" />

3. Go to `Developer Apps` tab and click `+ Add Developer App` button.

4. Go to your [`Apps catalog`](https://app.gocobalt.io/apps) in **Refold** > Search for `Zendesk CRM` > `Settings` > `Use your credentials` > `Callback Url` > Copy it.

5. In the app, Add Application `Name`, `Description` and `Website` and paste the Callback Url under `Redirect URL` field. Click on `Save`.

6. Click on `Details` and copy the **Client ID** and **Client Secret** from the **Credentials** section.

<img height="200" src="https://mintcdn.com/cobalt-55/PicQQg0XJq1JrBVB/images/Zendesk/zendesk_credentials.png?fit=max&auto=format&n=PicQQg0XJq1JrBVB&q=85&s=b75c2cb2a5eb059dcba496e4af322fdc" alt="Getting Credentials" data-path="images/Zendesk/zendesk_credentials.png" />

#### Configuring credentials in Refold

App settings page lets you configure the authentication settings for an `OAuth 2.0` based application. For your customers to provide you authorization to access their data,
they would first need to install your application. This page lets you set up your application credentials.

<img height="200" src="https://mintcdn.com/cobalt-55/PicQQg0XJq1JrBVB/images/Zendesk/zendesk_cobalt.png?fit=max&auto=format&n=PicQQg0XJq1JrBVB&q=85&s=315b3d96a2424c6130bf4f3bd8258322" alt="Setting up application client credentials" data-path="images/Zendesk/zendesk_cobalt.png" />

Provide the acquired Client ID and Client Secret under Settings of the app and save it.

#### Configuring Scopes

Refold lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under `Permissions & Scopes`
section.

For some applications Refold sets **mandatory scopes** which cannot be removed. Additional scopes can be selected from the drop down. Refold also has the provision to add any
custom scopes supported by the respective platform.

<img height="200" src="https://mintcdn.com/cobalt-55/PicQQg0XJq1JrBVB/images/Zendesk/zendesk_scopes.png?fit=max&auto=format&n=PicQQg0XJq1JrBVB&q=85&s=675237e5429da05f3074dffc8f1b0f22" alt="OAuth Scopes" data-path="images/Zendesk/zendesk_scopes.png" />

Once the scopes has been added to the application in Refold, the app will now request for access of the mentioned scopes.

<Warning>
  If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform.
</Warning>

#### Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using Zendesk Sell actions and triggers. Following are the set of Zendesk Sell actions and triggers
supported by Refold.

<Tabs>
  <Tab title="Actions">
    <AccordionGroup>
      <Accordion title="Lead">
        1. **Create Lead** - Create a lead in Zendesk Sell.
        2. **Update Lead** - Update a lead in Zendesk Sell.
        3. **Delete Lead** - Delete a lead in Zendesk Sell.
      </Accordion>

      <Accordion title="Contact">
        4. **Create Contact** - Create a new contact in Zendesk Sell.
        5. **Update Contact** - Update a contact in Zendesk Sell.
        6. **Delete Contact** - Delete a contact in PZendesk Sell.
      </Accordion>

      <Accordion title="Deal">
        7. **Create Deal** - Create a new deal in Zendesk Sell.
        8. **Update Deal** - Update a deal in Zendesk Sell.
        9. **Delete Deal** - Delete a deal in Zendesk Sell.
      </Accordion>

      <Accordion title="Organization">
        10. **Create Organization** - Create an organization in Zendesk Sell.
        11. **Update Organization** - Update an organization in Zendesk Sell.
        12. **Delete Organization** - Delete an Organization in Zendesk Sell.
      </Accordion>

      <Accordion title="Others">
        13. **HTTP Request** - Make HTTP API calls to any Zendesk Sell documented REST APIs.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Triggers">
    There are no triggers in this application.
  </Tab>
</Tabs>
