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

# Gainsight

> Connect BonData to Gainsight for customer success data

Gainsight is the leading customer success platform, helping companies drive retention, reduce churn, and grow revenue through data-driven customer engagement. With BonData, you can connect to your Gainsight instance to read and enrich customer health, usage, and lifecycle data within Agent workflows.

BonData supports three authentication methods for Gainsight.

<CardGroup cols={3}>
  <Card title="M2M OAuth" icon="robot" href="#m2m-oauth">
    Machine-to-machine
  </Card>

  <Card title="OAuth Code Flow" icon="shield-check" href="#oauth-code-flow">
    User-delegated
  </Card>

  <Card title="Access Token" icon="key" href="#access-token">
    Direct token
  </Card>
</CardGroup>

***

## M2M OAuth

Follow these steps to create Machine-to-Machine credentials for BonData.

### Step 1: Access Connected Apps

1. Log in to your Gainsight instance as an admin
2. Go to **Administration** → **Integrations** → **Connectors 2.0**
3. Click **Connected Apps**

### Step 2: Create a Connected App

1. Click **Create Connected App**
2. Enter a name (e.g., `BonData Integration`)
3. Select **Machine-to-Machine** as the app type
4. Configure the required scopes/permissions
5. Click **Save**

### Step 3: Copy Credentials

After creation, you'll see:

* **Client ID** - the unique identifier for your app
* **Client Secret** - the secret used for authentication

<Warning>
  Copy both values - the Client Secret may not be shown again.
</Warning>

### Step 4: Get Your Application URL

Your Gainsight URL is in the format:

* `https://yourcompany.gainsightcloud.com`

### Step 5: Enter Credentials

Enter your Client ID, Client Secret, and Application URL in BonData.

### Required Fields (M2M OAuth)

| Field           | Description                 |
| --------------- | --------------------------- |
| Client ID       | OAuth app Client ID         |
| Client Secret   | OAuth app Client Secret     |
| Application URL | Your Gainsight instance URL |

***

## OAuth Code Flow

Follow these steps to configure OAuth authentication for BonData.

### Step 1: Access Connected Apps

1. Log in to your Gainsight instance as an admin
2. Go to **Administration** → **Integrations** → **Connectors 2.0**
3. Click **Connected Apps**

### Step 2: Create a Connected App

1. Click **Create Connected App**
2. Enter a name (e.g., `BonData Integration`)
3. Select **Authorization Code** as the grant type
4. Set the **Redirect URI**: `https://app.bondata.ai/auth/oauth2/callback`
5. Configure the required scopes/permissions
6. Click **Save**

### Step 3: Copy Credentials

After creation, you'll see:

* **Client ID** - the unique identifier for your app
* **Client Secret** - the secret used for authentication

<Warning>
  Copy both values - the Client Secret may not be shown again.
</Warning>

### Step 4: Get Your Application URL

Your Gainsight URL is in the format:

* `https://yourcompany.gainsightcloud.com`

### Step 5: Enter Credentials

Enter your Client ID, Client Secret, and Application URL in BonData, then click Connect to authorize via OAuth.

### Required Fields (OAuth Code Flow)

| Field           | Description                 |
| --------------- | --------------------------- |
| Client ID       | OAuth app Client ID         |
| Client Secret   | OAuth app Client Secret     |
| Application URL | Your Gainsight instance URL |

***

## Access Token

Follow these steps to get an access token for BonData.

### Step 1: Get an Access Token

You can obtain an access token in one of these ways:

**Option A: From Gainsight Admin**

1. Log in to your Gainsight instance as an admin
2. Go to **Administration** → **Integrations**
3. Generate or copy an existing access token

**Option B: From OAuth Flow**

If you have OAuth credentials, you can generate an access token using the OAuth flow and copy it here.

### Step 2: Enter Credentials

Enter your Gainsight access token in BonData.

<Note>
  Access tokens may expire. For long-term integrations, consider using the M2M OAuth option instead.
</Note>

### Required Fields (Access Token)

| Field        | Description                                |
| ------------ | ------------------------------------------ |
| Access Token | Access token from Gainsight Administration |
