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

# Salesforce: Syncs/leads

> List Salesforce leads, optionally incrementally. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

List Salesforce leads, optionally incrementally.

> [!NOTE]
>
> Tool ID: `salesforce_list_leads`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'salesforce_list_leads',
  {
    "limit": 123,
    "modified_after": "cursor_123",
    "next_records_url": "https://example.com"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute salesforce_list_leads --input '{
  "limit": 123,
  "modified_after": "cursor_123",
  "next_records_url": "https://example.com"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "records": [
      {
        "id": "id_123",
        "first_name": "Jane",
        "last_name": "Doe",
        "company_name": "Example Corp",
        "email": "jane.doe@example.com",
        "owner_id": "owner_123",
        "owner_name": "Example",
        "phone": "+14155550123",
        "salutation": "example",
        "title": "VP of Engineering",
        "website": "https://example.com",
        "industry": "example",
        "last_modified_date": "2026-01-15T12:00:00Z"
      }
    ],
    "done": true
  }
}
```

Use `deepline describe salesforce_list_leads --json` for the latest machine-readable contract.

## Input reference

List Salesforce leads.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.limit` | `integer` | No | — | Maximum records to request in the first query page. Minimum: 1. Maximum: 2000. |
| `payload.modified_after` | `string` | No | — | Only include records modified after this timestamp. |
| `payload.next_records_url` | `string` | No | — | Salesforce `nextRecordsUrl` from a previous response. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "List Salesforce leads.",
    "properties": {
      "limit": {
        "type": "integer",
        "description": "Maximum records to request in the first query page.",
        "minimum": 1,
        "maximum": 2000
      },
      "modified_after": {
        "type": "string",
        "description": "Only include records modified after this timestamp."
      },
      "next_records_url": {
        "type": "string",
        "description": "Salesforce `nextRecordsUrl` from a previous response."
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.records` | `array` | Yes | — | — |
| `result.data.records[].id` | `string` | Yes | — | — |
| `result.data.records[].first_name` | `string \| unknown` | Yes | — | — |
| `result.data.records[].last_name` | `string` | Yes | — | — |
| `result.data.records[].company_name` | `string` | Yes | — | — |
| `result.data.records[].email` | `string \| unknown` | Yes | — | — |
| `result.data.records[].owner_id` | `string` | Yes | — | — |
| `result.data.records[].owner_name` | `string` | Yes | — | — |
| `result.data.records[].phone` | `string \| unknown` | Yes | — | — |
| `result.data.records[].salutation` | `string \| unknown` | Yes | — | — |
| `result.data.records[].title` | `string \| unknown` | Yes | — | — |
| `result.data.records[].website` | `string \| unknown` | Yes | — | — |
| `result.data.records[].industry` | `string \| unknown` | Yes | — | — |
| `result.data.records[].last_modified_date` | `string` | Yes | — | — |
| `result.data.done` | `boolean` | Yes | — | — |
| `result.data.totalSize` | `integer` | No | — | Minimum: 0. |
| `result.data.nextRecordsUrl` | `string \| null` | No | — | — |
| `result.meta` | `record` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "first_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "last_name": {
                  "type": "string"
                },
                "company_name": {
                  "type": "string"
                },
                "email": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "owner_id": {
                  "type": "string"
                },
                "owner_name": {
                  "type": "string"
                },
                "phone": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "salutation": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "website": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "industry": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "last_modified_date": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "first_name",
                "last_name",
                "company_name",
                "email",
                "owner_id",
                "owner_name",
                "phone",
                "salutation",
                "title",
                "website",
                "industry",
                "last_modified_date"
              ],
              "additionalProperties": false
            }
          },
          "done": {
            "type": "boolean"
          },
          "totalSize": {
            "type": "integer",
            "minimum": 0
          },
          "nextRecordsUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "records",
          "done"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Salesforce provider guide](https://deepline.com/docs/providers/salesforce/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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