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

# Bulk Upsert Customer Custom Attributes

> Creates or updates [custom attributes](entity:CustomAttribute) for customer profiles as a bulk operation.

`square.bulkUpsertCustomerCustomAttributes` creates or updates [custom attributes](entity:CustomAttribute) for customer profiles as a bulk operation.

## Example

```ts automations/square-bulk-upsert-customer-custom-attributes.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation(
  "Bulk Square Upsert Customer Custom Attributes",
  () => {
    onDashboardRun({ title: "Bulk Square Upsert Customer Custom Attributes" })

    square.bulkUpsertCustomerCustomAttributes({
      values: {
        id1: {
          customerId: "N3NCVYY3WS27HF0HKANA3R9FP8",
          customAttribute: {
            key: "favoritemovie",
            value: "Dune",
          },
        },
        id2: {
          customerId: "SY8EMWRNDN3TQDP2H4KS1QWMMM",
          customAttribute: {
            key: "ownsmovie",
            value: false,
          },
        },
        id3: {
          customerId: "SY8EMWRNDN3TQDP2H4KS1QWMMM",
          customAttribute: {
            key: "favoritemovie",
            value: "Star Wars",
          },
        },
        id4: {
          customerId: "N3NCVYY3WS27HF0HKANA3R9FP8",
          customAttribute: {
            key: "square:a0f1505a-2aa1-490d-91a8-8d31ff181808",
            value: "10.5",
          },
        },
        id5: {
          customerId: "70548QG1HN43B05G0KCZ4MMC1G",
          customAttribute: {
            key: "sq0ids-0evKIskIGaY45fCyNL66aw:backupemail",
            value: "fake-email@squareup.com",
          },
        },
      },
    })
  },
)
```

## Inputs

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

| Field    | Type                                                                                                      | Required | Default | Description                                                                                                                                                                                                                            |
| -------- | --------------------------------------------------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `values` | `Record\<string, Square.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest\>` | Yes      | —       | A map containing 1 to 25 individual upsert requests. For each request, provide an arbitrary ID that is unique for this `BulkUpsertCustomerCustomAttributes` request and the information needed to create or update a custom attribute. |

Use the official [BulkUpsertCustomerCustomAttributes reference](https://developer.squareup.com/reference/square/customer-custom-attributes-api/bulk-upsert-customer-custom-attributes) for provider field semantics and limits.

## Output

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