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

# Salesforce Data 360

export const title_4 = "Salesforce Data 360";

export const title_3 = "Salesforce Data 360";

export const title_2 = "Salesforce Data 360";

export const title_1 = "Salesforce Data 360";

export const title_0 = "Salesforce Data 360";

## Prerequisites

### OAuth, OAuthPKCE, and OAuthJWT

To use OAuth, OAuthPKCE, or OAuthJWT authentication, you must create a Connected App in Salesforce:

<Steps>
  <Step>
    Log in to Salesforce Data 360 and click **Setup**.
  </Step>

  <Step>
    In the **Quick Find** box, search for **App Manager**, then click **New Connected App**.
  </Step>

  <Step>
    Enter a name for your app and your email address. Then select:

    * **Enable OAuth Settings**
    * **Enable Authorization Code and Credentials Flow**
    * **Enable Token Exchange Flow**
  </Step>

  <Step>
    Set the **Callback URL** to *[https://oauth.cdata.com/oauth/](https://oauth.cdata.com/oauth/)*.
  </Step>

  <Step>
    Add the following OAuth scopes:

    * Manage user data via APIs (`api`)
    * Perform requests at any time (`refresh_token`, `offline_access`)
    * Manage Data 360 profile data (`cdp_profile_api`)
    * Perform ANSI SQL queries on Data 360 data (`cdp_query_api`)
    * Manage Data 360 Identity Resolution (`cdp_identityresolution_api`)
    * Manage Data 360 Calculated Insight data (`cdp_calculated_insight_api`)
  </Step>

  <Step>
    Click **Save and Continue**. Make note of the **Consumer Key** and **Consumer Secret**. In Connect AI, these are entered as the **OAuth Client Id** and **OAuth Client Secret**.
  </Step>
</Steps>

### OAuthClient

To use OAuthClient authentication, you must create a Connected App with the client credentials flow enabled:

<Steps>
  <Step>
    Log in to Salesforce Data 360 and click **Setup**.
  </Step>

  <Step>
    In the **Quick Find** box, search for **App Manager**, then click **New Connected App**.
  </Step>

  <Step>
    Enter a name for your app and your email address. Then select:

    * **Enable OAuth Settings**
    * **Enable Client Credentials Flow**
    * **Enable Token Exchange Flow**
  </Step>

  <Step>
    Select an execution user for the flow.
  </Step>

  <Step>
    Add the following OAuth scopes:

    * Manage user data via APIs (`api`)
    * Perform requests at any time (`refresh_token`, `offline_access`)
    * Manage Data 360 profile data (`cdp_profile_api`)
    * Perform ANSI SQL queries on Data 360 data (`cdp_query_api`)
    * Manage Data 360 Identity Resolution (`cdp_identityresolution_api`)
    * Manage Data 360 Calculated Insight data (`cdp_calculated_insight_api`)
    * Manage user data via Web browsers (`web`)
  </Step>

  <Step>
    Click **Save and Continue**.
  </Step>

  <Step>
    From the connected app detail page, click **Manage**, then click **Edit Policies**.
  </Step>

  <Step>
    Under **Client Credentials Flow**, click the search icon next to **Run As** and select the execution user. For Enterprise Edition orgs, select a user with the **API Only User** permission.
  </Step>

  <Step>
    Save your changes. Make note of the **Consumer Key** and **Consumer Secret**. In Connect AI, these are entered as the **OAuth Client Id** and **OAuth Client Secret**.
  </Step>
</Steps>

## Setup Guide

Follow these steps to connect Salesforce Data 360 to your Connect AI account:

<Steps>
  <Step>
    Open the **Sources** page of the Connect AI navigation menu.
  </Step>

  <Step>
    Click **+ Add Connection** in the upper-right corner.
  </Step>

  <Step>
    Type *Salesforce Data 360* into the search field, then click the data source name.
  </Step>

  <Step>
    On the **Basic Settings** tab of the new connection, enter a connection name or keep the default name.
  </Step>

  <Step>
    (Optional) Enter the **Salesforce Access Token** that is used for authentication in the Salesforce instance.
  </Step>

  <Step>
    Select the **Auth Scheme**, then proceed to the relevant section and follow those instructions.
  </Step>
</Steps>

## Authentication Methods

<Tabs>
  <Tab title="OAuthPKCE">
    <Steps>
      <Step>
        Enter the **OAuth Client Id** and **OAuth Client Secret** obtained from your Salesforce Connected App.
      </Step>

      <Step>
        Click **Sign in** to connect securely through OAuth. This action opens the Salesforce sign-in page in a new tab.
      </Step>

      <Step>
        Log in to your Salesforce account and provide the requested permissions (if applicable).
      </Step>

      <Step>
        At the top of the Connect AI **Add {title_0} Connection** page, click **Save & Test**.

        * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
        * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
        * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
      </Step>
    </Steps>
  </Tab>

  <Tab title="OAuth">
    <Steps>
      <Step>
        Enter the **OAuth Client Id** and **OAuth Client Secret** obtained from your Salesforce Connected App.
      </Step>

      <Step>
        Click **Sign in** to connect securely through OAuth. This action opens the Salesforce sign-in page in a new tab.
      </Step>

      <Step>
        Log in to your Salesforce account and provide the requested permissions (if applicable).
      </Step>

      <Step>
        At the top of the Connect AI **Add {title_1} Connection** page, click **Save & Test**.

        * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
        * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
        * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
      </Step>
    </Steps>
  </Tab>

  <Tab title="OAuthClient">
    Use this method for service-to-service connections that authenticate without an interactive browser sign-in.

    <Steps>
      <Step>
        Enter the **OAuth Client Id** and **OAuth Client Secret** obtained from your Salesforce Connected App.
      </Step>

      <Step>
        At the top of the Connect AI **Add {title_2} Connection** page, click **Save & Test**.

        * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
        * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
        * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
      </Step>
    </Steps>
  </Tab>

  <Tab title="OAuthPassword">
    <Warning>
      OAuthPassword is deprecated. Use OAuthJWT or OAuthPKCE instead. The **Security Token** property is also deprecated and applies only to this scheme.
    </Warning>

    <Steps>
      <Step>
        Enter your Salesforce **User** and **Password**.
      </Step>

      <Step>
        (Optional) Enter a **Security Token**. This is required unless your IP address has been added to Trusted IP Addresses in Salesforce.
      </Step>

      <Step>
        At the top of the Connect AI **Add {title_3} Connection** page, click **Save & Test**.

        * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
        * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
        * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
      </Step>
    </Steps>
  </Tab>

  <Tab title="OAuthJWT">
    <Steps>
      <Step>
        Enter the following information:

        * **OAuth JWT Cert**–the content of the certificate in PEM format.
        * **OAuth JWT Cert Type**–the type of key store containing the certificate. The default cert type is **PEMKEY\_BLOB**.
        * **OAuth JWT Issuer**–The issuer of the Java Web Token.
        * **OAuth JWT Cert Password**–(optional) required only if the certificate is encrypted.
        * **OAuth JWT Cert Subject**–(optional) identifies the certificate subject in the store.
        * **OAuth JWT Subject**–(optional) the user subject for delegated access.
      </Step>

      <Step>
        At the top of the Connect AI **Add {title_4} Connection** page, click **Save & Test**.

        * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
        * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
        * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
      </Step>
    </Steps>
  </Tab>
</Tabs>

<Note>
  Ready to try this connector? [Create a free Connect AI account](https://cloud-login.cdata.com/u/signup) and set up your first connection in minutes.
</Note>
