> 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/gift-cards/gift-card-products/sample-flows.md

## Article Content:

# Gift Card Products: 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.

## Create a gift card product with promotional pricing

You can create a gift card product where the price a buyer pays is less than the balance loaded onto the gift card. This is useful for running promotions, such as selling a $50 gift card for $45.

To create a gift card product with promotional pricing:

1. Call [Create Gift Card Product](https://dev.wix.com/docs/api-reference/business-solutions/gift-cards/gift-card-products/create-gift-card-product.md). In the `presetVariants` array, set each variant's `price` and `value` fields separately. For example:

    ```json
    {
      "giftCardProduct": {
        "name": "Holiday Special eGift Card",
        "presetVariants": [
          {
            "price": { "amount": "45" },
            "value": { "amount": "50" }
          },
          {
            "price": { "amount": "90" },
            "value": { "amount": "100" }
          }
        ]
      }
    }
    ```

2. Optionally, set the `expirationType` and the corresponding expiration details. For a gift card that expires 1 year after purchase, set `expirationType` to `RELATIVE` and `relativeExpirationDate` to `{ "value": 1, "period": "YEARS" }`.

## Sync gift card products across multiple sites

If you manage multiple Wix sites, you may want to keep gift card products consistent across all of them. For example, if you update a product's denominations on one site, you can replicate the change on other sites.

Each site currently supports a maximum of 1 gift card product, so syncing means either updating the existing product on the target site or creating one if none exists.

To sync a gift card product across sites:

1. Call [Get Gift Card Product](https://dev.wix.com/docs/api-reference/business-solutions/gift-cards/gift-card-products/get-gift-card-product.md) on the source site to retrieve the product you want to sync.
2. Extract the `giftCardProduct` object from the response.
3. For each target site, call [Query Gift Card Products](https://dev.wix.com/docs/api-reference/business-solutions/gift-cards/gift-card-products/query-gift-card-products.md) to check whether the product already exists by filtering on `name`.
4. If the product exists on the target site, call [Update Gift Card Product](https://dev.wix.com/docs/api-reference/business-solutions/gift-cards/gift-card-products/update-gift-card-product.md) and pass the updated fields along with the target product's `id` and current `revision`.
5. If the product doesn't exist on the target site, call [Create Gift Card Product](https://dev.wix.com/docs/api-reference/business-solutions/gift-cards/gift-card-products/create-gift-card-product.md) and pass the product details from the source site.

## Rename a gift card product

You can change the name of a gift card product after it's created (for example, to refresh seasonal branding or to correct a typo). A gift card product is a standalone catalog entity, so you rename it through the Gift Card Products API.

To rename a gift card product:

1. Call [Query Gift Card Products](https://dev.wix.com/docs/api-reference/business-solutions/gift-cards/gift-card-products/query-gift-card-products.md) to retrieve the product you want to rename. Each site currently supports a maximum of 1 gift card product, so an unfiltered query returns the site's product.
2. Extract the product's `id` and current `revision` from the response.
3. Call [Update Gift Card Product](https://dev.wix.com/docs/api-reference/business-solutions/gift-cards/gift-card-products/update-gift-card-product.md) and specify the new `name` along with the product's `id` and `revision`.