> ## Documentation Index
> Fetch the complete documentation index at: https://docs.digifist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Variants & Pricing

> How product variants, inventory quantities, prices, and option combinations are stored in Galantis and kept current from Shopify.

In Galantis, every product variant is stored with its own price, inventory quantity, SKU, images, and option combination. Variant-level data is what makes Back-in-Stock subscriptions work at the size and color level, what determines whether a product appears as in-stock in WhatsApp product messages, and what feeds automation conditions that evaluate product-level inventory.

## What this covers

* How variants are stored in Galantis
* All variant-level fields and their purpose
* How inventory quantity drives Back-in-Stock eligibility
* How price updates are handled
* How `selected_options` represents variant combinations

## Variant data model

Each variant record in Galantis stores the following fields:

| Field                | Source  | Purpose                                                                                                       |
| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| `price`              | Shopify | Per-variant price — displayed in SPM and MPM product cards, updated on each product update webhook            |
| `compare_at_price`   | Shopify | Pre-sale or original price — used to display a crossed-out price alongside the current price in product cards |
| `inventory_quantity` | Shopify | Current stock level — the primary field for Back-in-Stock eligibility and availability display                |
| `sku`                | Shopify | Stock-keeping unit — product identification per variant                                                       |
| `image`              | Shopify | Variant-specific image — overrides the parent product image in product cards when set                         |
| `selected_options`   | Shopify | The option combination for this variant (e.g., `Size: M, Color: Blue`)                                        |

## How inventory quantity works in Galantis

`inventory_quantity` is the most operationally significant variant field. Its value drives two distinct behaviors:

### Back-in-Stock eligibility

When `inventory_quantity` reaches `0` for a specific variant, that variant becomes eligible for Back-in-Stock subscriptions. The storefront widget appears on the product page for that variant, and customers can submit their WhatsApp number to subscribe.

When `inventory_quantity` changes from `0` to any positive value on a variant with active subscribers, the `BACK_IN_STOCK` automation trigger fires for each subscriber. See [Back-in-Stock — Notification Logic](/whatsapp/back-in-stock/notification-logic) for the full pipeline.

### Availability in WhatsApp product messages

In SPM and MPM templates, variant availability is reflected in the product card shown to the customer. Variants with `inventory_quantity = 0` are marked as unavailable. This data is kept current via automatic Shopify webhook processing within seconds of any inventory change.

<Note>
  Availability in WhatsApp product messages reflects the state of the Galantis catalog record at the time the message is sent, not a live Shopify query. For most stores this is effectively real-time given the seconds-level webhook latency — but in edge cases where a webhook fails or is delayed, a product card may show availability that differs from the live Shopify state. See [Catalog Health](./catalog-health) for monitoring and error recovery.
</Note>

## Price updates

Price changes in Shopify — including sale prices, compare-at prices, and variant-level price adjustments — are synced to Galantis within seconds of being saved in Shopify.

The updated `price` and `compare_at_price` values are then propagated to Meta on the next catalog sync, ensuring product cards in WhatsApp messages display current pricing.

**Price update flow:**

```
Shopify price change saved
  → products/update webhook fires
  → Price updated in Galantis
  → Meta Catalog updated with new price
  → WhatsApp product messages show current price
```

The time between a Shopify price change and that change appearing in a WhatsApp product message is typically seconds to minutes, depending on the Meta sync job interval.

## selected\_options

`selected_options` stores the specific combination of option values that defines a variant. It is a structured array — for example:

```json theme={null}
[
  { "name": "Size", "value": "M" },
  { "name": "Color", "value": "Blue" }
]
```

This data is used in WhatsApp product messages to display variant options to the customer — when a customer taps a product in an SPM or MPM card, they can select from the available variant options before adding to cart.

`selected_options` is also what Galantis uses to identify which specific variant a Back-in-Stock subscriber signed up for. A customer who subscribed to "Size: M, Color: Blue" will only receive a notification when that specific combination is restocked — not when a different size or color of the same product becomes available.

## Variants in product messages

When a product is displayed in an SPM template, the customer sees the product card with the option to select a variant before proceeding. Galantis passes all active variants for the product to Meta as `PRODUCT_SECTIONS` data in the template, letting WhatsApp's native commerce UI handle variant selection.

For MPM templates, variant data is included for each of the up to 30 products in the message. Customers can tap any product in the list and select their preferred variant from the product detail view.

## Best practices

* **Keep Shopify inventory data accurate.** Galantis relies entirely on Shopify inventory values — if Shopify shows `inventory_quantity > 0` for an out-of-stock variant due to a Shopify inventory management misconfiguration, Galantis will not trigger Back-in-Stock notifications when the product is actually restocked.
* **Use variant-specific images where available.** A product with multiple color variants benefits from variant-level images in WhatsApp product cards — customers seeing the correct color image have higher conversion intent than those seeing a generic product shot.
* **Monitor price sync after sale events.** After a Shopify sale ends and prices revert, verify that the Meta Catalog has received the updated pricing. Check **Catalog → \[Product]** for `SYNCED` status with a recent timestamp.

## Related guides

* [Product Fields](./product-fields) — Product-level fields that accompany variant data
* [Meta Catalog](./meta-catalog) — How variant data is pushed to Meta for product messages
* [Back-in-Stock — Notification Logic](/whatsapp/back-in-stock/notification-logic) — How `inventory_quantity` drives restock notifications
* [Back-in-Stock — Product & Inventory Rules](/whatsapp/back-in-stock/product-inventory-rules) — Per-variant subscription behavior
