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

# Gong List Multiple Users Aggregate By Period: Inputs, Cost

> Retrieve aggregated activity for defined users by a date range with grouping in time periods (/v2/stats/activity/aggregate-by-period)

## 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=gong_list_multiple_users_aggregate_by_period:{"filter":{},"aggregationPeriod":"DAY"}' --json
```

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

## Input Schema

| Name                        | Type                                                | Required | Default | Description                                                                                                        |
| --------------------------- | --------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
| `payload.cursor`            | `string`                                            | No       |         | When paging is needed, provide the value supplied by the previous API call to bring the following page of records. |
| `payload.filter`            | `object`                                            | Yes      |         | Filter parameters.                                                                                                 |
| `payload.aggregationPeriod` | `"DAY" \| "WEEK" \| "MONTH" \| "QUARTER" \| "YEAR"` | Yes      |         | Calendar time period for aggregating data. Note: First day of the week is Monday.                                  |

### Allowed values

| Field                       | Allowed values                            |
| --------------------------- | ----------------------------------------- |
| `payload.aggregationPeriod` | `DAY`, `WEEK`, `MONTH`, `QUARTER`, `YEAR` |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Returns aggregated statistics for team members’ actions on calls in Gong, grouped by the specified time period (aggregationPeriod). Each record shows the total number of activities performed within the fromDate–toDate range. If the same activity occurs in different periods, it’s counted separately. For example, if a team member listens to the same call on two different days, each day counts as one; listening to the same call twice on the same day counts as a single activity. Use the userIds field to retrieve data for specific team members. If userIds is empty, only team members with activity in the specified date range are returned. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:stats:user-actions'.",
    "properties": {
      "cursor": {
        "type": "string",
        "description": "When paging is needed, provide the value supplied by the previous API call to bring the following page of records."
      },
      "filter": {
        "type": "object",
        "description": "Filter parameters.",
        "properties": {
          "fromDate": {
            "type": "string",
            "description": "The date (in the company's time zone) from which to list a user's activity. This value is inclusive. The date should be specified in the following format: YYYY-MM-DD."
          },
          "toDate": {
            "type": "string",
            "description": "The date (in the company's time zone) until which to list a user's activity. This value is exclusive. This value should not exceed the current day. The date should be specified in the following format: YYYY-MM-DD."
          },
          "createdFromDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "createdToDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "userIds": {
            "type": "array",
            "description": "Set of Gong's unique numeric identifiers for the users (up to 20 digits).",
            "uniqueItems": true,
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "fromDate",
          "toDate"
        ],
        "additionalProperties": false
      },
      "aggregationPeriod": {
        "type": "string",
        "description": "Calendar time period for aggregating data. Note: First day of the week is Monday.",
        "enum": [
          "DAY",
          "WEEK",
          "MONTH",
          "QUARTER",
          "YEAR"
        ]
      }
    },
    "required": [
      "aggregationPeriod",
      "filter"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `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": {
          "requestId": {
            "type": "string",
            "description": "A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes."
          },
          "records": {
            "type": "object",
            "description": "Information about the number of records that match the requested filter.",
            "properties": {
              "totalRecords": {
                "type": "integer",
                "description": "Total number of records.",
                "format": "int32"
              },
              "currentPageSize": {
                "type": "integer",
                "description": "Number of records in the current page.",
                "format": "int32"
              },
              "currentPageNumber": {
                "type": "integer",
                "description": "Current page number.",
                "format": "int32"
              },
              "cursor": {
                "type": "string",
                "description": "Returned only when there are more records to be retrieved. Repeat the API call and pass this cursor value in the request to retrieve the next page of records."
              }
            },
            "additionalProperties": false
          },
          "usersAggregateActivity": {
            "type": "array",
            "description": "A list, in which each item contains details of one user's activities.",
            "items": {
              "type": "object",
              "description": "A list, in which each item contains details of one user's activities.",
              "properties": {
                "userId": {
                  "type": "string",
                  "description": "Gong's unique numeric identifier for the user (up to 20 digits)."
                },
                "userEmailAddress": {
                  "type": "string",
                  "description": "The email address of the Gong user."
                },
                "userAggregateActivity": {
                  "type": "array",
                  "description": "A list, in which each item contains aggregate user activity for consecutive time periods in the date range.",
                  "items": {
                    "type": "object",
                    "description": "Aggregated activity for a user within a time period",
                    "properties": {
                      "callsAsHost": {
                        "type": "integer",
                        "description": "The number of recorded calls this user hosted.",
                        "format": "int32"
                      },
                      "callsGaveFeedback": {
                        "type": "integer",
                        "description": "The number of recorded calls the user gave feedback on.",
                        "format": "int32"
                      },
                      "callsRequestedFeedback": {
                        "type": "integer",
                        "description": "The number of recorded calls the user requested feedback on.",
                        "format": "int32"
                      },
                      "callsReceivedFeedback": {
                        "type": "integer",
                        "description": "The number of recorded calls the user received feedback on.",
                        "format": "int32"
                      },
                      "ownCallsListenedTo": {
                        "type": "integer",
                        "description": "The number of the user's own calls the user listened to.",
                        "format": "int32"
                      },
                      "othersCallsListenedTo": {
                        "type": "integer",
                        "description": "The number of other users' calls the user listened to.",
                        "format": "int32"
                      },
                      "callsSharedInternally": {
                        "type": "integer",
                        "description": "The number of calls the user shared with others inside the company.",
                        "format": "int32"
                      },
                      "callsSharedExternally": {
                        "type": "integer",
                        "description": "The number of calls the user shared with others outside the company.",
                        "format": "int32"
                      },
                      "callsScorecardsFilled": {
                        "type": "integer",
                        "description": "The number of scorecards the user completed.",
                        "format": "int32"
                      },
                      "callsScorecardsReceived": {
                        "type": "integer",
                        "description": "The number of calls in which someone filled a scorecard on the user's calls.",
                        "format": "int32"
                      },
                      "callsAttended": {
                        "type": "integer",
                        "description": "The number of calls in which this user is participant (not host).",
                        "format": "int32"
                      },
                      "callsCommentsGiven": {
                        "type": "integer",
                        "description": "The number of calls in which a user gave at least one comment.",
                        "format": "int32"
                      },
                      "callsCommentsReceived": {
                        "type": "integer",
                        "description": "The number of calls in which a user received at least one comment on the users calls.",
                        "format": "int32"
                      },
                      "callsMarkedAsFeedbackGiven": {
                        "type": "integer",
                        "description": "The number of calls in which someone pressed the \"Mark as reviewed\".",
                        "format": "int32"
                      },
                      "callsMarkedAsFeedbackReceived": {
                        "type": "integer",
                        "description": "The number of calls in which someone pressed the “Mark as reviewed” on the users calls.",
                        "format": "int32"
                      },
                      "fromDate": {
                        "type": "string",
                        "description": "The start of the period, or the request filter's fromDate for the first period in the range, in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC."
                      },
                      "toDate": {
                        "type": "string",
                        "description": "The end of the period, or the request filter's toDate for the last period in the range, in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC."
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

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

```bash theme={null}
deepline tools execute gong_list_multiple_users_aggregate_by_period --payload '{
  "filter": {},
  "aggregationPeriod": "DAY"
}' --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`.
