
## Crawl Salesforce

URL: https://docs.atlan.com/apps/connectors/crm/salesforce/how-tos/crawl-salesforce

> Extract metadata from Salesforce to catalog objects, fields, and relationships. Discover and govern your CRM data assets after configuring user permissions.

Extract metadata from your [Salesforce](https://docs.atlan.com/llms/connectors/salesforce/set-up-salesforce/llms.txt) organization into Atlan to catalog objects, fields, and relationships. After configuring the necessary user permissions, you can establish a connection and crawl to extract asset-level details and lineage.

To crawl metadata from Salesforce, review the [order of operations](https://docs.atlan.com/llms/catalog/connector-capabilities/order-workflows/llms.txt) and then complete the following steps.

## Select source

To select Salesforce as your source:

1. In your Atlan workspace, click **Connectors** in the left sidebar.
 * If you are using the **Old UI (Classic)**, click **New Workflow** in the top navigation.

2. Click **Marketplace**.

3. Search for **Salesforce Assets** and select it.

4. Click **Install**.

5. Once installation completes, click **Setup Workflow** on the same tile.

## Provide credentials

Enter credentials for your Salesforce integration in Atlan. The required fields vary depending on the authentication flow you choose.

To enter your Salesforce credentials:

1. For _Host Name_, enter the full URL for your Salesforce instance, including the `https://`. For example, `https://MyDomainName.my.salesforce.com`.

2. For _Authentication_, select **OAuth 2.0 JWT Bearer**.

3. For _Username_, enter the [integration user's email address](https://docs.atlan.com/llms/connectors/salesforce/oauth-jwt-bearer-setup/llms.txt).

4. For _Is this a Sandbox Org account?_, change to **Yes** if your org is a [copy of your production org](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_intro_get_dev_account.htm).

5. For _Consumer Key_, enter the [consumer key for the connected app](https://docs.atlan.com/llms/connectors/salesforce/oauth-jwt-bearer-setup/llms.txt).

6. For _Encrypted Private Key_, enter the [private key](https://docs.atlan.com/llms/connectors/salesforce/oauth-jwt-bearer-setup/llms.txt) from the `server.key` file in RSA256 format:
 ```
 -----BEGIN PRIVATE KEY-----
 MIIEvgIBADANBgkqhkiG.......
 -----END PRIVATE KEY-----
 ```
7. Click **Test Authentication** at the bottom of the form to confirm connectivity.

8. When successful, click **Next** at the bottom of the screen.

To enter your Salesforce credentials:

1. For _Host Name_, enter the full URL for your Salesforce instance, including the `https://`. For example, `https://MyDomainName.my.salesforce.com`.

2. For _Authentication_, select **OAuth 2.0 Client Credentials**.

3. For _Consumer Key (Client ID)_, enter the [Consumer Key from the external client app](https://docs.atlan.com/llms/connectors/salesforce/oauth-client-credentials-setup/llms.txt).

4. For _Consumer Secret (Client Secret)_, enter the [Consumer Secret from the external client app](https://docs.atlan.com/llms/connectors/salesforce/oauth-client-credentials-setup/llms.txt).

5. Click **Test Authentication** at the bottom of the form to confirm connectivity.

6. When successful, click **Next** at the bottom of the screen.

To enter your Salesforce credentials:

1. For _Host Name_, enter the full URL for your Salesforce instance, including the `https://`. For example, `https://MyDomainName.my.salesforce.com`.

2. For _Authentication_, keep the default option _Resource Owner_.

3. For _Username_, enter the integration user's email address.

4. For _Password_, enter the concatenation of the user's password and the [personal security token](https://docs.atlan.com/llms/connectors/salesforce/oauth-username-password-setup/llms.txt). Entering either password or personal security token alone is insufficient. For example, password `xyz` + token `123` → enter `xyz123`.

5. For _Is this a Sandbox Org account?_, change to **Yes** if your org is a [copy of your production org](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_intro_get_dev_account.htm).

6. For _Consumer Key_, enter the [consumer key for the connected app](https://docs.atlan.com/llms/connectors/salesforce/oauth-username-password-setup/llms.txt).

7. For _Consumer Secret_, enter the [consumer secret for the connected app](https://docs.atlan.com/llms/connectors/salesforce/oauth-username-password-setup/llms.txt).

8. Click **Test Authentication** at the bottom of the form to confirm connectivity.

9. When successful, click **Next** at the bottom of the screen.

## Configure connection

To complete the Salesforce connection configuration:

1. Provide a _Connection Name_ that represents your source environment. For example, you might want to use values like `production`, `development`, `gold`, or `analytics`.

2. (Optional) To change the users able to manage this connection, change the users or groups listed under _Connection Admins_. If you don't specify any user or group, nobody can manage the connection - not even admins.

3. At the bottom of the screen, click **Next** to proceed.

## Configure crawler

Before running the Salesforce crawler, you can further configure it.

On the _Metadata_ page:

1. For _Extract reports_, click **Yes** if you'd like to extract [report metadata](https://docs.atlan.com/llms/connectors/salesforce/what-does-atlan-crawl-from-salesforce/llms.txt) or click **No**.

2. For _Extract dashboards_, click **Yes** if you'd like to extract [dashboard metadata](https://docs.atlan.com/llms/connectors/salesforce/what-does-atlan-crawl-from-salesforce/llms.txt) or click **No**.

## Run crawler

To run the Salesforce crawler, after completing the previous steps:

1. To check for any [permissions or other configuration issues](https://docs.atlan.com/llms/connectors/salesforce/preflight-checks-for-salesforce/llms.txt) before running the crawler, click **Preflight checks**.

2. You can either:
 - To run the crawler once immediately, at the bottom of the screen, click the **Run** button.
 - To schedule the crawler to run hourly, daily, weekly, or monthly, at the bottom of the screen, click the **Schedule Run** button.

Once the crawler has completed running, you can see the assets in Atlan's asset page! 🎉

---
