> ## 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/opportunities

> List opportunities (deals) from Salesforce, optionally only those changed since a date. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List opportunities (deals) from Salesforce, optionally only those changed since a date.

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

## 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_opportunities',
  {
    "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_opportunities --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",
        "opportunity_name": "Example",
        "account_name": "Example",
        "account_id": "123456789",
        "amount": 123,
        "description": "Example description",
        "close_date": "2026-01-15T12:00:00Z",
        "created_by_id": "created_by_123",
        "created_by": "example",
        "owner_id": "owner_123",
        "owner_name": "Example",
        "stage": "example",
        "probability": 123,
        "type": "example",
        "last_modified_date": "2026-01-15T12:00:00Z"
      }
    ],
    "done": true
  }
}
```

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

## Input reference

List Salesforce opportunities.

| 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 opportunities.",
    "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[].opportunity_name` | `string` | Yes | — | — |
| `result.data.records[].account_name` | `string \| unknown` | Yes | — | — |
| `result.data.records[].account_id` | `string \| unknown` | Yes | — | — |
| `result.data.records[].amount` | `number \| unknown` | Yes | — | — |
| `result.data.records[].description` | `string \| unknown` | Yes | — | — |
| `result.data.records[].close_date` | `string` | Yes | — | — |
| `result.data.records[].created_by_id` | `string` | Yes | — | — |
| `result.data.records[].created_by` | `string` | Yes | — | — |
| `result.data.records[].owner_id` | `string` | Yes | — | — |
| `result.data.records[].owner_name` | `string` | Yes | — | — |
| `result.data.records[].stage` | `string` | Yes | — | — |
| `result.data.records[].probability` | `number \| unknown` | Yes | — | — |
| `result.data.records[].type` | `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"
                },
                "opportunity_name": {
                  "type": "string"
                },
                "account_name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "account_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "amount": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {}
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "close_date": {
                  "type": "string"
                },
                "created_by_id": {
                  "type": "string"
                },
                "created_by": {
                  "type": "string"
                },
                "owner_id": {
                  "type": "string"
                },
                "owner_name": {
                  "type": "string"
                },
                "stage": {
                  "type": "string"
                },
                "probability": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {}
                  ]
                },
                "type": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "last_modified_date": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "opportunity_name",
                "account_name",
                "account_id",
                "amount",
                "description",
                "close_date",
                "created_by_id",
                "created_by",
                "owner_id",
                "owner_name",
                "stage",
                "probability",
                "type",
                "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.