Variant Metafield Price
We’ve introduced a powerful new discount type inside Unified Discounts → General Discounts called Variant Metafield Price.

This discount type allows you to:
Pull discount values directly from a Variant metafield (JSON type)
Retrieve a specific key from that JSON
Apply the discount dynamically based on how you interpret the value
This is ideal for brands that want to reduce config size, simplify complex setups, and store pricing logic directly at the variant level.
Why Use Variant Metafield Price?
Instead of:
Creating multiple large discount configs
Hardcoding tier logic in multiple places
Managing dozens of group conditions
You can:
✅ Store discount data inside the variant ✅ Keep Unified Discount configs lightweight ✅ Scale across hundreds of products easily ✅ Maintain pricing in one place (the variant)
How It Works
Each variant contains a JSON metafield that stores discount values.
The discount reads:
The Namespace.Key
The JSON key
Interprets the value as:
Fixed Amount Off
Percentage Off
Specific Price
Step 1: Create a Variant JSON Metafield
Go to:
Shopify Admin → Settings → Custom Data → Variants → Add Definition
Name it (example:
pricing_information)Select type: JSON
Save
You now have a JSON metafield attached to variants.
Step 2: Store Pricing Data Inside the Variant
Inside a variant, populate the JSON metafield like this:
You can store:
Specific prices
Fixed discounts
Percentage discounts
Or multiple pricing tiers inside the same JSON
Step 3: Configure Variant Metafield Price Discount
Go to:
Unified Discounts → General Discounts → Create Discount
Select: Discount Type: Variant Metafield Price
You’ll see three important fields:
1️⃣ Metafield Namespace.Key
Example:
2️⃣ Value Key from Metafield
Example:
This tells the discount which key to read from the JSON.
3️⃣ Value Interpretation
Choose how the value should be applied:
Fixed Amount Off
Percentage Off
Specific Price
Example:
If the JSON value is 575 and interpretation is Specific Price,
the product price becomes 575.
Example: Tiered Pricing (1–6, 7–12, 13+)
Let’s say your store has:
1–6 units → $575
7–12 units → $550
13+ units → $525
Instead of creating large legacy discount configs, you can:
Create 3 Groups in Unified Discount
Group 1: 1–6 Units
Condition:
Line quantity < 7
Value Key:
Interpretation: Specific Price
Group 2: 7–12 Units
Condition:
Line quantity > 6
Line quantity < 13
Value Key:
Interpretation: Specific Price
Group 3: 13+ Units
Condition:
Line quantity ≥ 13
Value Key:
Interpretation: Specific Price
Now the discount engine:
✔ Checks the condition ✔ Reads the correct JSON key from the variant ✔ Applies the value dynamically
No hardcoded price logic inside the discount config.
Subscription vs One-Time Example
You can also store multiple pricing types:
Then:
Config 1 – One-Time Users
Conditions:
Order count = 0
Selling plan = false
Key:
Interpretation: Fixed Amount Off
Config 2 – Subscription Users
Conditions:
Selling plan = true
Key:
Interpretation: Fixed Amount Off
The same variant JSON powers multiple discount scenarios.
Real-World Use Case
If you previously used legacy discounts for tier pricing and noticed inconsistencies (for example 7–12 works but 13+ doesn’t), switching to Unified Discount + Variant Metafield Price is the recommended approach.
Why?
Legacy discounts are older implementations.
Unified Discounts are more scalable and actively supported.
Variant Metafield Price reduces config complexity significantly.
Best Practices
Fill the JSON metafield for every variant you want the discount to apply to
Keep your JSON keys consistent across products
Use “All” discount allocation type when appropriate
Use descriptive keys (price_1_6, sub_discount, vip_price, etc.)
When Should You Use This?
This feature is perfect if:
You have many SKUs with different pricing tiers
You manage complex subscription vs one-time pricing
You want pricing logic stored at the product level
You want smaller, cleaner discount configs
You are migrating from legacy discount setups
Summary
Variant Metafield Price lets you:
Store discount logic in variant JSON
Pull values dynamically
Interpret them as:
Fixed Amount Off
Percentage Off
Specific Price
Build scalable and future-proof pricing systems
If you have any questions or need help setting this up, feel free to reach out.
Last updated