> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# List Customer Groups

> Retrieves the list of customer groups of a business.

`square.listCustomerGroups` retrieves the list of customer groups of a business.

## Example

```ts automations/square-list-customer-groups.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("List Square Customer Groups", () => {
  onDashboardRun({ title: "List Square Customer Groups" })

  square.listCustomerGroups({
    cursor: "cursor",
    limit: 1,
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `CUSTOMERS_READ`.

| Field    | Type             | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                               |
| -------- | ---------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cursor` | `string \| null` | No       | —       | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).                                                                                                                               |
| `limit`  | `number \| null` | No       | 50      | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results. If the limit is less than 1 or greater than 50, Square returns a `400 VALUE_TOO_LOW` or `400 VALUE_TOO_HIGH` error. The default value is 50. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |

Use the official [ListCustomerGroups reference](https://developer.squareup.com/reference/square/customer-groups-api/list-customer-groups) for provider field semantics and limits.

## Output

Returns the official `Square.ListCustomerGroupsResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
