# Getting Started with Salesforce

**Cognigy Support**  
January 14, 2025

**All articles on how to use the Salesforce Extension**

- **[Getting Started with Salesforce](https://support.cognigy.com/hc/en-us/articles/17486186819612)**
- [Identify a Contact](https://support.cognigy.com/hc/en-us/articles/17498619853212)
- [Manage Cases](https://support.cognigy.com/hc/en-us/articles/17500296035740)
- [Query Information](https://support.cognigy.com/hc/en-us/articles/17539864537628-Query-Information)

Salesforce in cooperation with the Cognigy Salesforce Extension provides the maintenance of any given Entity, such as **Contacts**, **Accounts**, **Events**, **Products**, and more. **This tutorial** will explain **how to integrate** an organization's **Salesforce** instance **to a Cognigy.AI Agent** and create, update or delete an entity in Salesforce with ease.

> [Watch Cognigy Showcase "Voice-enabled Salesforce CRM with Conversational AI"](/content/resources/showcases/voice-enabled-salesforce-crm-with-conversational-ai/index.html)

---

## Install the Salesforce Extension

The first step is to install the required integration. In this case, a so-called [Extension](https://docs.cognigy.com/docs/extensions) is installed to Cognigy.AI. Thus, navigate to the **Extensions Marketplace** inside of the Virtual Agent and add the **Salesforce** Extension by clicking on the **Install** button. Now follow [this installation guide and upload the Extension to Cognigy](https://support.cognigy.com/hc/en-us/articles/360016505680-Extensions-Installation#upload-an-extension-0-2).

**Congrats! The installation of the Extension is finished!**

## Create a Salesforce Connection

In this step, a so-called [Connection](https://docs.cognigy.com/ai/build/connections/) will be created. If one, in Cognigy.AI, clicks on the previously uploaded Extension, the following details can be observed:

The red-marked part in the above figure shows, that there is a Connection required. Therefore, it needs to be created and filled with the Salesforce instance information. In order to do so, one initial Salesforce Flow Node needs to be added to a Flow:

1. Create a new Flow in Cognigy.AI  
2. Inside of the Flow Chart, click on **+** and navigate to the Salesforce Extension:

3. For example, add the **Create Case** Flow Node by clicking on it:

4. In order to edit the Flow Node and create the Connection, please click on it. An _Edit Node_ menu will be opened on the right side of the screen:

5. Right next to the Connection field (the first one at the top), one needs to click on the + button. The Connection menu will be opened at the center of the screen:

6. Insert the credentials of the Salesforce Connected App that you want to use for this connection.
   1. **consumerKey**  
   2. **consumerSecret**  
   3. **instanceUrl**  
      - Salesforce instance URL, such as _https://cognigy.my.salesforce.com_
7. Click on the _Create_ button

### Create a Connected App in Salesforce

To create a **Connected App** in Salesforce called **"Cognigy Extension"**, follow these step-by-step instructions:

1. **Log in to Salesforce**: Log in to your Salesforce organization using an account with administrative access.
2. **Navigate to Setup**: In the top-right corner, click on the **gear icon** (⚙️) and select **Setup**.
3. **Open App Manager**: In the left-hand menu, type **"App Manager"** in the Quick Find search bar and select **App Manager** from the list.
4. **Create a New Connected App**:  
   - Click on the **New Connected App** button (found in the top-right corner).  
   - In the **Basic Information** section:
     - Set the **Connected App Name** to _"Cognigy Extension"_.  
     - The **API Name** will autofill based on your app name.  
     - Enter a valid **Contact Email** (e.g., your administrator's email).
5. **Enable OAuth Settings**:  
   - Scroll to the **API (Enable OAuth Settings)** section and check the box for **Enable OAuth Settings**.  
   - In the **Callback URL** field, enter your callback URL (e.g., `http://localhost`). This URL is where Salesforce will send the OAuth tokens. This URL is not required by the Cognigy Extension but must be filled with a value in Salesforce.  
   - Under **Selected OAuth Scopes**, select the following:
     - `Full access (full)`  
     - `Perform requests on your behalf at any time (refresh_token, offline_access)`  
     - `Access and manage your data (api)`  
     - Add other scopes if required for your integration.
6. **Save the Connected App**:  
   - Click **Save** at the bottom of the page.  
   - Salesforce will display a confirmation message. Allow 2-10 minutes for the new app to propagate across the system.
7. **Find the Consumer Key and Consumer Secret**:  
   - Return to **App Manager**.  
   - Find the newly created **"Cognigy Extension"** app in the list, click on the dropdown arrow next to it, and select **View**.  
   - Scroll down to the **API (Enable OAuth Settings)** section.  
   - Here you will find the **Consumer Key** (Client ID) and **Consumer Secret**.

Once you have the **Consumer Key** and **Consumer Secret**, you can use them to securely connect Salesforce to external systems like Cognigy using OAuth2 above.
