---
schema_version: "1"
id: c15ab248204e2e5feda8c365a2acb0ed851bff36dcaac155b969abe747581e2c
title: Test the Agentforce Sales ChatGPT App in a Sandbox (Beta)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/test_sales_chatgpt_sandbox.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.test_sales_chatgpt_sandbox.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a132efd10f14e0e8fdd17de4d9bd440ba1f4ec42b044d7cc5d3da82cd3446c0b
description: Test the Agentforce Sales ChatGPT App in a sandbox to make sure that your sellers safely access Salesforce data within ChatGPT. A sandbox is a copy of your Salesforce org to use for development, testing, and training isolated from production data and apps.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Test the Agentforce Sales ChatGPT App in a Sandbox (Beta)

Test the Agentforce Sales ChatGPT App in a sandbox to make sure that your sellers safely access Salesforce data within ChatGPT. A sandbox is a copy of your Salesforce org to use for development, testing, and training isolated from production data and apps.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions
                with the <strong>Agentforce for Sales</strong> add-on, </p>
              <p style="margin-bottom:0;">and <strong>Einstein 1</strong> and <strong>Agentforce 1
                  Sales</strong> Editions<strong>.</strong></p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d52725e84">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d52725e84 ">To create a sandbox:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d52725e84 ">
              <p style="margin-bottom:0;">Manage Dev Sandboxes (Developer or Developer Pro only) OR Manage Sandboxes (all sandbox
                types)</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d52725e84 ">To set up, and give users access to, the Agentforce Sales ChatGPT App in
              Salesforce:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d52725e84 ">Customize Application AND View Setup</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d52725e84 ">To turn on, create, and publish the Agentforce Sales app in ChatGPT:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d52725e84 ">ChatGPT Enterprise account AND ChatGPT admin</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d52725e84 ">To use the Agentforce Sales ChatGPT App:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d52725e84 ">Agentforce Sales ChatGPT App User AND ChatGPT Enterprise account</td>

          </tr>
        </tbody>
      </table>

Before you begin, prepare your sandbox. If you use an existing sandbox, make sure that your Sales licenses are in the sandbox by [matching production licenses](https://help.salesforce.com/s/articleView?id=xcloud.overview_licenses_and_sandbox.htm&language=en_US) or [refreshing your sandbox](https://help.salesforce.com/s/articleView?id=platform.data_sandbox_refresh.htm&language=en_US). You can also [create a sandbox](https://help.salesforce.com/s/articleView?id=platform.data_sandbox_create.htm&language=en_US).

Now that you’ve completed the prework, you’re ready to set up the app.

## Create a Permission Set

This permission set controls which users can access the Agentforce Sales ChatGPT App within your sandbox.

1. From **Setup**, in the Quick Find box, enter Permission Sets, and then select Permission Sets.
2. Click **New**.
3. Enter a label, such as Custom ChatGPT Permission Set, and Save.
4. From the System section, click **System Permissions**, and then **Edit**.
5. Select Agentforce Sales ChatGPT App User and save your work.
6. Confirm your changes.

## Give Users Access

1. In the Quick Find box, enter Permission Sets, and then select Permission Sets.
2. Select the permission set you created.
3. Assign the permission set to users who want to access the Agentforce Sales ChatGPT App in your sandbox.

## Create the Secure Connection Between Salesforce and ChatGPT

This step requires setup tasks in both ChatGPT and in Salesforce.

1. In ChatGPT, start setting up your app.
    1. Log in to your ChatGPT Enterprise workspace.
    2. Go to **Workspace Settings**, then to **Apps**, and then click **Create app**.
    3. In the MCP Server URL field, enter this URL: [https://api.salesforce.com/platform/mcp/v1-beta.2/sandbox/agentforce-sales](https://api.salesforce.com/platform/mcp/v1-beta.2/sandbox/agentforce-sales)
    4. Set authentication to OAuth.
    5. Copy the Callback URL to use later in the external client app setup in Salesforce.
    6. Keep your ChatGPT session open so that you can complete the app setup after you create your external client app in Salesforce.
2. In Salesforce Setup, create and configure your external client app.
    1. From **Setup**, enter External Client, and select External Client App Manager.
    2. Click **New External Client App**, and then enter your app name and admin email.
    3. In the **API (Enable OAuth Settings)** section, select **Enable OAuth**.
    4. Enter the callback URL from the ChatGPT app in the **Callback URL** field. The URL is in this format, containing a unique Id for your org:
        
        https://chatgpt.com/connector/oauth/{unique\_id}
    5. Select these OAuth scopes:
        
        - Manage user data via APIs (api)
        - Access the Salesforce API Platform (sfap\_api)
        - Perform requests at any time (refresh\_token, offline\_access)
        - Access Einstein GPT services (einstein\_gpt\_api)
    6. Deselect all the checkboxes under the **Flow Enablement** section.
    7. In the **Security** section, select these settings:
        
        - Require secret for Web Server Flow
        - Require secret for Refresh Token Flow
        - Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows
        - Enable Refresh Token Rotation
        - Issue JSON Web Token (JWT)-based access tokens
3. Click **Create**.

## Authorize Users and Get Credentials

1. On the **Policies** tab, expand **OAuth Policies**.
2. Click **Edit**.
3. Set **Permitted Users** to Admin approved users are preauthorized, and then click **OK**.
4. Expand **App Policies**.
5. Select the permission set you created in the first step.
6. Change the refresh token validity period to 30 days and save.
7. Next, go to the **Settings** tab.
8. In the **OAuth Settings** section, select **Consumer Key and Secret** and copy the values for the next step.

## Connect Your Sandbox to the Agentforce Sales ChatGPT App

1. In your ChatGPT Enterprise workspace, click **Advanced Settings** and set the Registration Method to User-Defined OAuth Client.
2. In the **Callback** section, paste the Consumer Key in the **OAuth Client ID** field.
3. Paste the Consumer Secret into the **OAuth Client Secret** field.
4. Accept the terms, and then click **Create**.