# Setup

> To enable the Salesforce activities, you must establish a connection to your Salesforce Org by entering credentials in the [Salesforce Application Scope](https://docs.uipath.com/activities/other/latest/legacy-integrations/salesforce-application-scope) activity. These credentials give a Robot the ability to take action on your behalf and automate the different Salesforce processes.

## Overview

To enable the Salesforce activities, you must establish a connection to your Salesforce Org by entering credentials in the [Salesforce Application Scope](https://docs.uipath.com/activities/other/latest/legacy-integrations/salesforce-application-scope) activity. These credentials give a Robot the ability to take action on your behalf and automate the different Salesforce processes.

As noted in the [About](https://docs.uipath.com/activities/other/latest/legacy-integrations/about-the-salesforce-activities-pack) page, the Salesforce activities have two prerequisites, a Salesforce [login](https://login.salesforce.com/) (non-developer or developer) and a Salesforce [connected app](https://help.salesforce.com/articleView?id=connected_app_about.htm&type=5). Each prerequisite generates or informs the credentials that the **Salesforce Scope Activity** needs to establish a connection (shown in the image below).

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-180381-b3df0d2c-d7fd8fc8.webp)

The following setup steps show you how to create a Salesforce developer login and connected app, as well as, show you how to collect the required credential details.

* If you have a non-developer or existing developer Salesforce login, you can go to the **Create a connected app** section (for automation development and testing purposes, it's recommended that you have a developer login to easily create and delete generated data).
* If you have both a Salesforce login and a connected app (that you want to use for the Salesforce activities), you can go to the **Get your credentials** section.

## Steps

### Create a Salesforce developer login

Creating a new Salesforce developer login is simple and free.

1. Go to https://developer.salesforce.com/signup.
2. Enter your contact information.
3. Enter a unique **Username**.
4. Submit the form and wait for your welcome email.
5. In the welcome email, click the link to set your **Password**.

You're done! The next step is to create a Salesforce Connected App.

* You don't have to perform any further configurations to start using the activities. But, if you're interested in learning more about your developer login and the different configurations you can do, see [Prepare Your Org](https://developer.salesforce.com/docs/atlas.en-us.externalidentityImplGuide.meta/externalidentityImplGuide/external_identity_prepare_your_org.htm) in the Salesforce External Identity Implementation Guide.

### Create a connected app

The following steps show the minimum information that you need to enter to create a connected app that works with the **Salesforce Application Scope** activity. 
  :::note
  Before you begin, go to OAuth and OpenID Connect Settings > OAuth and OpenID Connect Flows and enable the **Allow OAuth Username-Password Flows** option. This allows your org to use the legacy OAuth 2.0 username-password flow to authorize an app that already has the user's credentials.
  :::

1. If you're not yet already, login to your Salesforce Org (developer or non-developer).
2. Go to your account **Setup** page (click the gear icon in the upper right-hand corner).

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-178944-1be1c997-2091341b.webp)
3. In the left-hand navigation, under **Platform Tools > Apps** click **App Manager**.
4. After the **App Manager** opens, click the **Create New Connected App** button.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-179249-3e157784-75f52822.webp)
5. Under **Basic Information**, enter a **Connected App Name** and **API Name** (e.g., *UiPathTest* for both), along with your **Contact Email**.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-180216-1898a13e-256634e3.webp)
6. Under **API (Enable OAuth Settings)**, select **Enable OAuth Settings** (this opens the OAuth Settings).
7. Enter a **Callback URL** (e.g., *http://localhost:8080*).
8. For your **Selected OAuth Scopes**, add **Full Access** from the list of available scopes.
9. Select **Require Secret for Web Server Flow** (if it's not selected by default) and click the **Save** button at the bottom of the page.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-178848-eaec43e6-6db24ff7.webp)

You're done! You just created your connected app (it takes 2-10 minutes to fully populate in the system). The next step is to get the credentials you need for the **Salesforce Application Scope** activity.

### Get your credentials

The following steps show you where to get your Consumer Key, Consumer Secret, and how to generate your Security Token (required for developer logins).

First, get your Consumer Key and Consumer Secret.

1. After creating your connected app, the app's **Manage Connected App** page should open.
   * If it did not open, or if you're just starting your setup, follow the steps below:
     1. In the left-hand navigation, under **Apps > Connected Apps**, click **Manage Connected Apps**.
     2. Find your connected app in the list of apps (e.g., *UiPathTest*) and click the down arrow icon > **View**.
        + If you don't see a connected app or can't view the information, contact your Salesforce administrator.

          ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-178880-4abb5d4b-e85a91cf.webp)
     3. Under **API (Enable OAuth Settings)**, copy your **Consumer Key** and **Consumer Secret** and store them locally for quick and secure access later (remember where you store them as you'll need them when adding the **Salesforce Application Scope** activity to your project).

        ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-181152-478ea8a1-6fa491fd.webp)

   Next, generate your Security Token.
   * Go to your account **Settings** (by clicking on your profile icon in the upper right-hand corner)

     ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-185482-ad8274ee-dd6ee5b1.webp)
2. In the left-hand navigation, under **My Personal Information**, click **Reset My Security Token**.
3. Click the **Reset Security Token** button and check your email for your new token. After you receive your email, copy the new token and store it locally with your Consumer Key and Consumer Secret.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-178179-db0b5815-04986441.webp)

You're done! You now have your credentials and are ready to build automation projects with the Salesforce activities.

## Get started

To start building your automation projects, see the [Quickstart](https://docs.uipath.com/activities/other/latest/legacy-integrations/salesforce-quickstart) guide. This guide provides step-by-step instructions to help you create a working sample so that you can verify the connection to your Salesforce org and get familiar with the activity input/output properties.

To learn more about the Salesforce activities, see [Activities](https://docs.uipath.com/activities/other/latest/legacy-integrations/salesforce-activities) for links to the activity detail pages.
