> 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: eCommerce Integration

## Article: eCommerce Integration

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md

## Article Content:

# eCommerce Integration

Adding products from your Wix Stores catalog to an eCommerce cart, checkout, or order, must follow the structure of the `catalogReference` object.

Pass the `catalogReference` object as part of the `lineItems` array to [eCommerce](https://dev.wix.com/docs/rest/business-solutions/e-commerce/introduction.md) methods such as:
+ [Add To Cart](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/cart/cart/add-to-cart.md).
+ [Create Checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/checkout/checkout/create-checkout.md) and [Add To Checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/purchase-flow/checkout/checkout/add-to-checkout.md).
+ [Create Order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/orders/create-order.md).

The `catalogReference` object includes the following fields:
+ `catalogItemId` - When passing Wix Stores products, this is the `productId`.
+ `appId` - The Wix Stores app ID. When using products from the Stores catalog, this must always be `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`.
+ `options` - This optional field can hold different key:value pairs, depending on [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) and whether the product/variant has custom text fields.

The examples below detail about the 2 main uses of the `catalogReference` object when passing Wix Stores products.

## Managed Variants

When a product's variants are managed (`product.manageVariants: true`), the `catalogReference.options` should hold the variant's `variantId`. In the following example, the variant also has `customTextFields`:

```json
{
  "catalogReference": {
    "catalogItemId": "5376f9ec-b92e-efa9-e4a1-f4f480aa0d3a",
    "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
    "options": {
      "variantId": "00000000-0000-0020-0005-ad9cdc10d3b8",
      "customTextFields": {
        "What would you like written on the custom label?": "Hope you enjoy the coffee! :)"
      }
    }
  }
}
```

## Non-Managed Variants

When a product's variants are not managed (`product.manageVariants: false`), the `options` object should hold the variant's options and choices:

```json
{
  "catalogReference": {
    "catalogItemId": "4d93fb7e-e612-612f-5c27-81b35b503ad7",
    "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
    "options": {
      "options": {
        "Size": "Medium",
        "Color": "Red"
      }
    }
  }
}
```