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

# Create Customer Group

> Creates a new customer group for a business.

`square.createCustomerGroup` creates a new customer group for a business.

## Example

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

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

  square.createCustomerGroup({
    group: {
      name: "Loyal Customers",
    },
  })
})
```

## Inputs

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

| Field            | Type                   | Required | Default | Description                                                                                                                                                     |
| ---------------- | ---------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `idempotencyKey` | `string`               | No       | —       | The idempotency key for the request. For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). |
| `group`          | `Square.CustomerGroup` | Yes      | —       | The customer group to create.                                                                                                                                   |

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

## Output

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