> ## 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 Swap Plan

> Schedules a plan variation change for all active subscriptions under a given plan variation.

`square.bulkSwapPlan` schedules a plan variation change for all active subscriptions under a given plan variation.

## Example

```ts automations/square-bulk-swap-plan.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Bulk Square Swap Plan", () => {
  onDashboardRun({ title: "Bulk Square Swap Plan" })

  square.bulkSwapPlan({
    newPlanVariationId: "FQ7CDXXWSLUJRPM3GFJSJGZ7",
    oldPlanVariationId: "6JHXF3B2CW3YKHDV4XEM674H",
    locationId: "S8GWD5R9QB376",
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `ITEMS_READ` and `SUBSCRIPTIONS_READ` and `SUBSCRIPTIONS_WRITE`.

| Field                | Type     | Required | Default | Description                                                                                                                                                                                |
| -------------------- | -------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `newPlanVariationId` | `string` | Yes      | —       | The ID of the new subscription plan variation. This field is required.                                                                                                                     |
| `oldPlanVariationId` | `string` | Yes      | —       | The ID of the plan variation whose subscriptions should be swapped. Active subscriptions using this plan variation will be subscribed to the new plan variation on their next billing day. |
| `locationId`         | `string` | Yes      | —       | The ID of the location to associate with the swapped subscriptions.                                                                                                                        |

Use the official [BulkSwapPlan reference](https://developer.squareup.com/reference/square/subscriptions-api/bulk-swap-plan) for provider field semantics and limits.

## Output

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