This article covers the Shopify side of B2C sell ahead: what TRAEDE sends to your shop during inventory sync, which product tag and variant metafields it writes for pre-order UX, and how your theme can read them in Liquid. It does not walk through creating purchase orders or enabling sell ahead on delivery notes — use the general Sell Ahead guide for that.
B2C sell ahead on Shopify is only available for TRAEDE all-in-one accounts.
Before you start
In TRAEDE, B2C sell ahead must already be configured on the relevant production order delivery notes (sell ahead to customers, sell ahead B2C, and expected arrivals). Use the guide in Related articles at the bottom of this page for that workflow.
For Shopify you also need:
- Inventory sync enabled on the integration and a correct B2C location mapping.
- Products/variants linked and Sync B2C inventory (or equivalent) enabled where you expect quantities and metafields to update.
What TRAEDE sends to Shopify
When inventory sync runs:
- Available quantity — Sell-ahead quantities count as available on your mapped Shopify B2C location(s), per your usual sync rules.
- Tag and metafields — On the sync pass for your shop's default B2C Shopify location (primary location on the integration when set, otherwise the first active location TRAEDE uses), variants with sell-ahead stock get the metafields in the next section. Mapped secondary locations still receive quantity updates only; TRAEDE does not duplicate tag/metafield writes from those passes, because tags and variant metafields are global on a product in Shopify.
- Variant metafield values refresh when that variant is included in an inventory sync at the default location. The
has_pre_order_variantstag and metafield removal run on a full inventory sync, not on partial (single-variant) syncs.
If your theme does not read these metafields yet, add clear copy on the product page so customers know items may ship later.
Pre-order tag for themes
When a product has at least one variant with sell-ahead quantity tied to a production order, TRAEDE adds the tag has_pre_order_variants on the next full inventory sync. When no variants on that product have sell-ahead deliveries anymore, TRAEDE removes the tag on a later full sync.
Use this tag in Liquid to scope badges, alternate add-to-cart labels, or messaging without parsing JSON.
Variant metafields (traede namespace)
For variants that currently have sell-ahead deliveries, TRAEDE sets:
| Key | Type | What it contains |
|---|---|---|
traede.next_po_delivery |
date | Earliest delivery date when TRAEDE has a parseable ETA. If the earliest row has no date yet, this metafield is not written — use po_deliveries or show "TBD". |
traede.next_po_quantity |
number_integer | Quantity on that earliest row (written when there is sell-ahead stock, even if the date is unknown). |
traede.po_deliveries |
json | All sell-ahead rows for the variant, by delivery date ascending (rows without a date last). |
When a variant no longer has sell-ahead deliveries, TRAEDE deletes these three metafields on the next full sync, and only when the product still had has_pre_order_variants in Shopify (so old pre-order fields are not left behind).
po_deliveries JSON shape
Array of objects, sorted by delivery_date ascending (null dates last):
-
delivery_date— ISO date string, ornullif no ETA on the delivery note. -
quantity— integer. -
production_order_number— PO number from TRAEDE, ornullif unresolved. -
production_order_delivery_note_number— delivery note number, ornullif quantity sits on the PO without a delivery note.
Example:
[
{
"delivery_date": "2026-06-15",
"quantity": 50,
"production_order_number": "PO-1042",
"production_order_delivery_note_number": "PO-1042-1"
},
{
"delivery_date": "2026-08-01",
"quantity": 30,
"production_order_number": "PO-1042",
"production_order_delivery_note_number": "PO-1042-2"
}
]Theme examples (Liquid)
Starting points — adapt naming, CSS classes, and translation to your theme.
Badge from next delivery date (uses tag + next metafields):
{% if product.tags contains 'has_pre_order_variants' %}
{% assign next_date = product.selected_or_first_available_variant.metafields.traede.next_po_delivery %}
{% assign next_qty = product.selected_or_first_available_variant.metafields.traede.next_po_quantity %}
{% if next_date %}
<p class="pre-order-badge">
Pre-order — ships {{ next_date | date: "%b %-d, %Y" }}
{% if next_qty %}({{ next_qty }} pcs incoming){% endif %}
</p>
{% endif %}
{% endif %}Full schedule from JSON:
{% assign deliveries = product.selected_or_first_available_variant.metafields.traede.po_deliveries.value %}
{% if deliveries.size > 0 %}
<ul class="pre-order-schedule">
{% for d in deliveries %}
<li>
{% if d.delivery_date %}{{ d.delivery_date | date: "%b %-d, %Y" }}{% else %}TBD{% endif %}
— {{ d.quantity }} pcs (PO {{ d.production_order_number }})
</li>
{% endfor %}
</ul>
{% endif %}Note: Tag add/remove and metafield cleanup depend on a full inventory sync. Variants not available for B2C are pushed with zero quantity and no sell-ahead deliveries; pre-order data should clear on the next full sync. Variants excluded from B2C inventory sync are skipped for that updater run. SKUs that match only Shopify bundle components are skipped; other SKUs on the same match sync as usual.
Shopify checkout and TRAEDE orders
When a customer buys a pre-order item on Shopify, inventory is reduced there as for any line item, and the order imports into TRAEDE as a B2C order if your integration is set up for it. How you hold or release shipments (rules, product groups, manual shipments) is a TRAEDE operations topic — see the Sell Ahead article and your shipping automation settings, not this Shopify reference.
Related articles
- How to use the "Sell Ahead" — required setup in TRAEDE before Shopify shows sell-ahead stock and metafields