> ## 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.

# Salesloft: Tasks Counts Index

> Fetch task counts. Salesloft Tasks Counts Index reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Fetch task counts.

<Info>
  Tool ID: `salesloft_tasks_counts_index`
</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(
  'salesloft_tasks_counts_index',
  {
    "ids": [
      123
    ],
    "user_id": [
      123
    ],
    "person_id": [
      123
    ]
  },
);

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

### CLI

```bash theme={null}
deepline tools execute salesloft_tasks_counts_index --input '{
  "ids": [
    123
  ],
  "user_id": [
    123
  ],
  "person_id": [
    123
  ]
}' --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "call": 123,
    "email": 123,
    "general": 123
  }
}
```

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

## Input reference

Fetches task counts data grouped by the task type.

| Name                              | Type     | Required | Default | Details                                                                                                                                |
| --------------------------------- | -------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.ids`                     | `array`  | No       | —       | IDs of tasks to fetch.                                                                                                                 |
| `payload.user_id`                 | `array`  | No       | —       | Filters tasks by the user to which they are assigned.                                                                                  |
| `payload.person_id`               | `array`  | No       | —       | Filters tasks by the person to which they are associated.                                                                              |
| `payload.account_id`              | `array`  | No       | —       | Filters tasks by the account to which they are associated.                                                                             |
| `payload.current_state`           | `array`  | No       | —       | Filters tasks by their current state. Valid current\_states include: \['scheduled', 'completed'].                                      |
| `payload.task_type`               | `array`  | No       | —       | Filters tasks by their task type. Valid task\_types include: \['call', 'email', 'general'].                                            |
| `payload.time_interval_filter`    | `string` | No       | —       | Filters tasks by time interval. Valid time\_intervals include: \['overdue', 'today', 'tomorrow', 'this\_week', 'next\_week'].          |
| `payload.completed_time_interval` | `string` | No       | —       | Filters tasks by time interval. Valid time\_intervals include: \['today', 'yesterday', 'this\_week', 'previous\_week', 'this\_month']. |
| `payload.idempotency_key`         | `string` | No       | —       | Filters tasks by idempotency key.                                                                                                      |
| `payload.locale`                  | `array`  | No       | —       | Filters tasks by locale of the person to which they are associated.                                                                    |
| `payload.source`                  | `array`  | No       | —       | Filters tasks by source.                                                                                                               |
| `payload.sort_by`                 | `string` | No       | —       | Key to sort on, must be one of: salesloft.prioritizers/rhythm.                                                                         |
| `payload.sort_direction`          | `string` | No       | —       | Direction to sort in, must be one of: ASC, DESC.                                                                                       |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Fetches task counts data grouped by the task type.",
    "properties": {
      "ids": {
        "type": "array",
        "description": "IDs of tasks to fetch.",
        "items": {
          "type": "integer"
        }
      },
      "user_id": {
        "type": "array",
        "description": "Filters tasks by the user to which they are assigned.",
        "items": {
          "type": "integer"
        }
      },
      "person_id": {
        "type": "array",
        "description": "Filters tasks by the person to which they are associated.",
        "items": {
          "type": "integer"
        }
      },
      "account_id": {
        "type": "array",
        "description": "Filters tasks by the account to which they are associated.",
        "items": {
          "type": "integer"
        }
      },
      "current_state": {
        "type": "array",
        "description": "Filters tasks by their current state. Valid current_states include: ['scheduled', 'completed'].",
        "items": {
          "type": "string"
        }
      },
      "task_type": {
        "type": "array",
        "description": "Filters tasks by their task type. Valid task_types include: ['call', 'email', 'general'].",
        "items": {
          "type": "string"
        }
      },
      "time_interval_filter": {
        "type": "string",
        "description": "Filters tasks by time interval. Valid time_intervals include: ['overdue', 'today', 'tomorrow', 'this_week', 'next_week']."
      },
      "completed_time_interval": {
        "type": "string",
        "description": "Filters tasks by time interval. Valid time_intervals include: ['today', 'yesterday', 'this_week', 'previous_week', 'this_month']."
      },
      "idempotency_key": {
        "type": "string",
        "description": "Filters tasks by idempotency key."
      },
      "locale": {
        "type": "array",
        "description": "Filters tasks by locale of the person to which they are associated.",
        "items": {
          "type": "string"
        }
      },
      "source": {
        "type": "array",
        "description": "Filters tasks by source.",
        "items": {
          "type": "string"
        }
      },
      "sort_by": {
        "type": "string",
        "description": "Key to sort on, must be one of: salesloft.prioritizers/rhythm."
      },
      "sort_direction": {
        "type": "string",
        "description": "Direction to sort in, must be one of: ASC, DESC."
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                      | Type      | Required | Default | Details                                                                                    |
| ------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------ |
| `result.data`             | `object`  | Yes      | —       | Provider response payload.                                                                 |
| `result.data.call`        | `integer` | No       | —       | Number of tasks with type :call                                                            |
| `result.data.email`       | `integer` | No       | —       | Number of tasks with type :email                                                           |
| `result.data.general`     | `integer` | No       | —       | Number of tasks with type :general                                                         |
| `result.data.integration` | `integer` | No       | —       | Number of tasks with type :integration                                                     |
| `result.data.other`       | `integer` | No       | —       | Number of tasks of non-basic types                                                         |
| `result.data.total`       | `integer` | No       | —       | Number of all tasks                                                                        |
| `result.data.custom`      | `record`  | No       | —       | Number of tasks for each custom type. Provided as key-value pairs in the form of an object |
| `result.meta`             | `object`  | 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": {
          "call": {
            "type": "integer",
            "description": "Number of tasks with type :call"
          },
          "email": {
            "type": "integer",
            "description": "Number of tasks with type :email"
          },
          "general": {
            "type": "integer",
            "description": "Number of tasks with type :general"
          },
          "integration": {
            "type": "integer",
            "description": "Number of tasks with type :integration"
          },
          "other": {
            "type": "integer",
            "description": "Number of tasks of non-basic types"
          },
          "total": {
            "type": "integer",
            "description": "Number of all tasks"
          },
          "custom": {
            "type": "object",
            "description": "Number of tasks for each custom type. Provided as key-value pairs in the form of an object"
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "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

* [Salesloft provider guide](/docs/providers/salesloft/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)
