> ## 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: List Campaigns

> List Salesforce campaigns (events, webinars, programs) with optional name and active filters. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List Salesforce campaigns (events, webinars, programs) with optional name and active filters.

<Info>
  Tool ID: `salesforce_list_campaigns`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

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

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

### CLI

```bash theme={null}
deepline tools execute salesforce_list_campaigns --input '{
  "limit": 123,
  "modified_after": "cursor_123",
  "next_records_url": "https://example.com"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "records": [
      {
        "id": "id_123",
        "name": "Example",
        "type": "example",
        "status": "example",
        "is_active": true,
        "start_date": "2026-01-15T12:00:00Z",
        "end_date": "2026-01-15T12:00:00Z",
        "parent_id": "parent_123",
        "number_of_leads": 123,
        "number_of_contacts": 123,
        "number_of_responses": 123,
        "last_modified_date": "2026-01-15T12:00:00Z"
      }
    ],
    "done": true
  }
}
```

Use `deepline tools get salesforce_list_campaigns --json` for the latest machine-readable contract.

## Input reference

List Salesforce campaigns.

| 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. |
| `payload.name_contains` | `string` | No | — | Case-insensitive substring match on Campaign Name. `%` and `_` match literally. Minimum length: 1. Maximum length: 255. |
| `payload.is_active` | `boolean` | No | — | Only include campaigns with this IsActive value. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "List Salesforce campaigns.",
    "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."
      },
      "name_contains": {
        "type": "string",
        "description": "Case-insensitive substring match on Campaign Name. `%` and `_` match literally.",
        "minLength": 1,
        "maxLength": 255
      },
      "is_active": {
        "type": "boolean",
        "description": "Only include campaigns with this IsActive value."
      }
    },
    "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[].name` | `string` | Yes | — | — |
| `result.data.records[].type` | `string \| unknown` | Yes | — | — |
| `result.data.records[].status` | `string \| unknown` | Yes | — | — |
| `result.data.records[].is_active` | `boolean` | Yes | — | — |
| `result.data.records[].start_date` | `string \| unknown` | Yes | — | — |
| `result.data.records[].end_date` | `string \| unknown` | Yes | — | — |
| `result.data.records[].parent_id` | `string \| unknown` | Yes | — | — |
| `result.data.records[].number_of_leads` | `number \| unknown` | Yes | — | — |
| `result.data.records[].number_of_contacts` | `number \| unknown` | Yes | — | — |
| `result.data.records[].number_of_responses` | `number \| 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={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"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "start_date": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "end_date": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "parent_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                },
                "number_of_leads": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {}
                  ]
                },
                "number_of_contacts": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {}
                  ]
                },
                "number_of_responses": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {}
                  ]
                },
                "last_modified_date": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "type",
                "status",
                "is_active",
                "start_date",
                "end_date",
                "parent_id",
                "number_of_leads",
                "number_of_contacts",
                "number_of_responses",
                "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](/docs/providers/salesforce/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


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