How to split order by variant/product metafield
Splitting by Metafields
This guide explains how to create split rules based on variant metafields.
Correct Format
The format for metafield-based split rules is:
Metafield:key:valueExample: Metafield:presale:Presale
This will split variants where the metafield with key presale has the value Presale.
Format Options
Match a specific key and value
Metafield:key:valueExample:
Metafield:presale:PresaleMatches variants where the metafield with key
presalehas the valuePresale
Match any metafield with a specific value
Metafield:valueExample:
Metafield:PresaleMatches variants where ANY metafield has a value of
Presale
Important: Namespace vs Key
Shopify metafields have both a namespace and a key. For example, a metafield might be defined as customer.presale where:
customeris the namespacepresaleis the key
When creating split rules, use only the key (not the namespace).
customer.presale with value Presale
Metafield:presale:Presale
Metafield:customer.presale:Presale
custom.restock_date with value 2024-03
Metafield:restock_date:2024-03
Metafield:custom.restock_date:2024-03
Variant Metafields
The system reads variant metafields (up to 20 per variant). The matching is performed on variant-level metafields, so you can split orders based on metafields assigned to specific product variants.
Product Metafields
You can also split by product metafields (metafields on the product, not the variant). Use the ProductMetafield: prefix instead.
Match a specific key and value
Example:
ProductMetafield:warehouse:USMatches products where the metafield with key
warehousehas the valueUS
Match any metafield with a specific value
Example:
ProductMetafield:fragileMatches products where ANY metafield has a value of
fragile
When to use Product vs Variant Metafields
Metafield is set on individual variants
Metafield:key:value
Metafield is set on the product itself
ProductMetafield:key:value
Different variants have different metafield values
Metafield:key:value
All variants share the same metafield value
ProductMetafield:key:value
Common Mistakes
Including the namespace: Use
Metafield:presale:Presale, notMetafield:customer.presale:PresaleMissing the Metafield prefix: Use
Metafield:presale:Presale, notpresale:PresaleWrong separator format: Use
Metafield:key:value, notMetafield:key=value
Examples
Split variants marked as presale
Metafield:presale:true
Split variants with a specific restock date
Metafield:restock_date:2024-03
Split variants where any metafield equals "dropship"
Metafield:dropship
Split variants with fulfillment type "warehouse"
Metafield:fulfillment_type:warehouse
Last updated