> ## 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: Inputs, Cost & CLI Example

> List Salesforce leads, optionally incrementally. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=salesforce_list_leads:{}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                       | Type      | Required | Default | Description                                           |
| -------------------------- | --------- | -------- | ------- | ----------------------------------------------------- |
| `payload.limit`            | `integer` | No       |         | Maximum records to request in the first query page.   |
| `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={null}
  {
    "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 Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `record` | No       |         | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "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>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute salesforce_list_leads --payload '{}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

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