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

# Salesforce

> Build dashboards, Sales and CRM panels, and other custom internal tools on top of your Salesforce data

## Setting up Salesforce

### 1. Create a Salesforce app and add integration

Start by [configuring a connected app](https://help.salesforce.com/s/articleView?id=sf.connected_app_create_basics.htm\&type=5) in your Salesforce account. The app should have [OAuth Settings enabled](https://help.salesforce.com/s/articleView?id=sf.connected_app_create_api_integration.htm\&type=5), specifically using the [OAuth 2.0 Client Credentials Flow](https://help.salesforce.com/s/articleView?id=sf.connected_app_client_credentials_setup.htm\&type=5) authorization flow.

Follow the Salesforce REST API [Quick Start](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart.htm) for a full guide.

Once the app has been created, navigate back to Prod AI and select **Salesforce** from the **integrations page**.

### 2. Configure settings

Fill out the form with the following settings:

| Setting | Required | Description |
| - | - | - |
| Name | ✓ | Name that will be displayed to users when selecting this integration in Prod AI |
| Instance URL | ✓ | URL for the Salesforce instance, e.g. `https://your-domain.my.salesforce.com` |
| Token URL | ✓ | The full URL path to the token endpoint that serves OAuth tokens |
| Consumer ID | ✓ | A public identifier used to identify this Salesforce consumer to the authorization/token servers |
| Consumer Secret | ✓ | A secret shared between the Salesforce consumer and the authorizing/token servers to verify the Consumer ID |

### 3. Test and save

Click **Test Connection** to check that Prod AI can connect to the data source.

On Dedicated Cloud, allowlist your [Prod AI data plane IP addresses](https://docs.prod.ai/deployment/security/overview.md#ip-addresses).

After connecting successfully, click **Create** to save the integration.

### 4. Set data tags

Optionally, configure different data tags for [separate development environments](https://docs.prod.ai/development-lifecycle/build/data-tags.md).

**Salesforce connected!**
You can now build
[apps](https://docs.prod.ai/coding-agents/apps.md) and [agents](https://docs.prod.ai/coding-agents/agents.md) with Salesforce.

## Creating Salesforce steps

When using Salesforce steps, there are 3 options:

1. [SOQL queries](#soql-queries)
2. [Single object actions](#single-object-actions)
3. [Bulk actions](#bulk-actions)

### SOQL queries

Write **[SOQL queries](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm)** to perform read-only actions on your SFDC data.

### Single object actions

Use **single object actions** to perform CRUD actions on a single object. Pass in an object of data in the **Resource Body**.

* Create a single object
* Update a single object
* Delete a single object
* Read a single object

### Bulk actions

Use **bulk actions** to perform CRUD actions on several objects at time. Pass in an array of objects in the **Bulk Update Body**.

* Create several objects
* Update several objects
* Delete several objects
* Upsert (update or insert) several objects


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.