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

> Count Salesloft tasks grouped by task type, filtered by user, person, account, state or due date. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Count Salesloft tasks grouped by task type, filtered by user, person, account, state or due date.

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

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

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute salesloft_tasks_counts_index --input '{
  "ids": [
    123
  ],
  "user_id": [
    123
  ],
  "person_id": [
    123
  ]
}' --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": {
    "call": 123,
    "email": 123,
    "general": 123
  }
}
```

Use `deepline describe 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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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](https://deepline.com/docs/providers/salesloft/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.