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

# Salesforce

> Query Salesforce opportunities, accounts, leads and contacts live from Explore and AI agents

The Salesforce [live source](https://docs.lightdash.com/integrations/live-sources) reads the opportunities, accounts, leads and contacts in your Salesforce org.

## Before you start

* **A Salesforce org with API access**, on Enterprise, Unlimited, Performance or Developer Edition, or Professional with the API add-on.
* **A Salesforce user with the API Enabled permission.**

## Connect Salesforce

[Add a live source](https://docs.lightdash.com/integrations/live-sources/set-up-and-manage.md#connect-a-live-source), select **Salesforce** and click **Continue to Salesforce** to sign in and allow access.

![The Add Salesforce source dialog, with an Authentication card with the Use a sandbox switch, a Details card with the Name field, and the Continue to Salesforce button](https://mintcdn.com/lightdash/WuPlti30p6CHhcUC/images/integrations/live-sources/salesforce-config.png?fit=max\&auto=format\&n=WuPlti30p6CHhcUC\&q=85\&s=9fda0136c9179e3137bc270daf62fd05)

## Semantic layer

### Opportunities

Opportunities in Salesforce, one row per opportunity, with their fields

| Field | Description |
| - | - |
|  Record ID | Salesforce's 18-character ID for the record |
|  Created | When the record was created, in UTC |
|  Created day | Day the record was created, in UTC |
|  Created month | Month the record was created, shown as its first day, in UTC |
|  Created quarter | Quarter the record was created, shown as its first day, in UTC |
|  Created year | Year the record was created, shown as its first day, in UTC |
|  Count | Number of records that match |

Your opportunity fields, custom ones included, also show up as fields.

### Accounts

Accounts in Salesforce, one row per account, with their fields

| Field | Description |
| - | - |
|  Record ID | Salesforce's 18-character ID for the record |
|  Created | When the record was created, in UTC |
|  Created day | Day the record was created, in UTC |
|  Created month | Month the record was created, shown as its first day, in UTC |
|  Created quarter | Quarter the record was created, shown as its first day, in UTC |
|  Created year | Year the record was created, shown as its first day, in UTC |
|  Count | Number of records that match |

Your account fields, custom ones included, also show up as fields.

### Leads

Leads in Salesforce, one row per lead, with their fields

| Field | Description |
| - | - |
|  Record ID | Salesforce's 18-character ID for the record |
|  Created | When the record was created, in UTC |
|  Created day | Day the record was created, in UTC |
|  Created month | Month the record was created, shown as its first day, in UTC |
|  Created quarter | Quarter the record was created, shown as its first day, in UTC |
|  Created year | Year the record was created, shown as its first day, in UTC |
|  Count | Number of records that match |

Your lead fields, custom ones included, also show up as fields.

### Contacts

Contacts in Salesforce, one row per contact, with their fields

| Field | Description |
| - | - |
|  Record ID | Salesforce's 18-character ID for the record |
|  Created | When the record was created, in UTC |
|  Created day | Day the record was created, in UTC |
|  Created month | Month the record was created, shown as its first day, in UTC |
|  Created quarter | Quarter the record was created, shown as its first day, in UTC |
|  Created year | Year the record was created, shown as its first day, in UTC |
|  Count | Number of records that match |

Your contact fields, custom ones included, also show up as fields.

## Limits

| Limit | Value |
| - | - |
| Rows with metrics | 1,999 per query |
| Rows without metrics | 9,999 per query |
| Fields per object | 400, dimensions and metrics together |

A query with more rows than these limits shows an error rather than a partial result.


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