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

# Batch Change Inventory

> Applies adjustments and counts to the provided item quantities.

`square.batchChangeInventory` applies adjustments and counts to the provided item quantities.

## Example

```ts automations/square-batch-change-inventory.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Batch Square Change Inventory", () => {
  onDashboardRun({ title: "Batch Square Change Inventory" })

  square.batchChangeInventory({
    idempotencyKey: crypto.randomUUID(),
  })
})
```

## Inputs

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

| Field                   | Type                               | Required | Default | Description                                                                                                                                                                                                                                                                              |
| ----------------------- | ---------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `idempotencyKey`        | `string`                           | Yes      | —       | A client-supplied, universally unique identifier (UUID) for the request. See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the [API Development 101](https://developer.squareup.com/docs/buildbasics) section for more information. |
| `changes`               | `Square.InventoryChange[] \| null` | No       | —       | The set of physical counts and inventory adjustments to be made. Changes are applied based on the client-supplied timestamp and may be sent out of order.                                                                                                                                |
| `ignoreUnchangedCounts` | `boolean \| null`                  | No       | `true`  | Indicates whether the current physical count should be ignored if the quantity is unchanged since the last physical count. Default: `true`.                                                                                                                                              |

Use the official [BatchChangeInventory reference](https://developer.squareup.com/reference/square/inventory-api/batch-change-inventory) for provider field semantics and limits.

## Output

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