> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/plans-v3/sample-flows.md

## Article Content:

# Plans V3: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

## Import plans from external systems

You can create plans using data stored in external systems. This is useful when migrating to Wix from another platform or maintaining data across multiple platforms.

To import plans from an external system:

1. Prepare your plan data as an array of plan objects, ensuring each has the required fields: `pricingVariants` and `visibility`.

2. Iterate through your plan array, calling [Create Plan](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/create-plan.md) for each plan. To comply with rate limits, send the requests at least 1 second apart from each other.

3. [Set up ongoing synchronization](#sync-pricing-plans-across-multiple-systems) using events to keep both systems in sync.


## Sync pricing plans across multiple systems

You can synchronize plan data between Wix and external systems to maintain consistency across platforms.

To sync pricing plans with an external system:

1. Call [Query Plans](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/query-plans.md) to retrieve all existing plans from Wix.

2. Store the plan data in your external system, ensuring you save the plan's `id` and `revision` for future updates.

3. Set up event listeners for [Plan Created](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/plan-created.md), [Plan Updated](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/plan-updated.md), and [Plan Deleted](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/plan-deleted.md) events to automatically sync changes.

> **Note:** When receiving a [Plan Updated](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/plan-updated.md) event, use the `revision` number to avoid conflicts and update only the changed fields in your external system.

## Organize plans with tags

You can tag plans to group them by campaign, audience, or lifecycle stage, then retrieve each group without hardcoding plan IDs.

To organize plans with tags:

1. Create the tags you need with the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction.md), passing `wix.pricing_plans.v3.plan` as the `fqdn`, and store the returned IDs. A plan references tags by ID only.

2. Call [Bulk Update Plan Tags](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/bulk-update-plan-tags.md) with up to 100 plan IDs, passing each tag ID in either `assignTags.publicTags` or `assignTags.privateTags`. Site members and visitors can read public tags, so use private tags for internal classification. Check `itemMetadata.success` on each result, since individual plans can fail while the rest succeed.

3. To tag plans you can't enumerate, call [Bulk Update Plan Tags By Filter](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/bulk-update-plan-tags-by-filter.md) with a filter instead of IDs. The response returns a `jobId` rather than per-plan results, so poll the job to confirm completion.

4. Retrieve a group by calling [Query Plans](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/query-plans.md) with a `$hasSome` filter on `tags.publicTags.tagIds` or `tags.privateTags.tagIds`. Use `$hasAll` to require every tag in the list.

5. To keep an external system in sync, subscribe to [Plan Tags Modified](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/plan-tags-modified.md). It delivers the assigned and unassigned tags for each change, so you don't have to diff the plan's full tag list yourself.

> **Note:** Don't use [Update Plan](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/plans-v3/update-plan.md) to add a single tag. It replaces the plan's whole tag list, which drops tags set by other flows.