Data reference
このコンテンツはまだ日本語訳がありません。
Product and collection keys
Section titled “Product and collection keys”Namespace app--284350873601--discount_os. See Read the data in Liquid.
| Key | Shopify type | Holds |
|---|---|---|
discounts | list.metaobject_reference | The discount entries for this product or collection |
max_reward_percent | number_decimal | Best percentage off every shopper gets, or 0 |
max_reward_cents | number_integer | Best fixed amount off every shopper gets, in minor units, or 0 |
max_reward_discount | metaobject_reference | The entry behind the best value. Missing when there is none. |
Shop keys
Section titled “Shop keys”The shop has the same four keys for the whole store, plus:
| Key | Shopify type | Holds |
|---|---|---|
sync_paused | boolean | true while Live sync is off |
synced_at | date_time | When the data was last written |
One entry in full
Section titled “One entry in full”This is the entry DiscountOS writes for a quantity break on a test store: buy 2 for 10% off, buy 3 for 15% off, on one product. It was produced by the app’s own code from the real discount. Fields with no value for this discount are not written, so they are missing here.
The entry’s handle is discount-2139462500662. Product references are shown as the IDs Shopify
stores. In Liquid, .value gives you the product objects.
{ "discount_title": "Layer Up Volume Pricing", "discount_type": "PRODUCT_VOLUME", "discount_class": "product", "provenance": "ours", "method": "automatic", "discount_id": "2139462500662", "discount_gid": "gid://shopify/DiscountAutomaticNode/2139462500662", "schema_version": 2, "threshold_type": "QUANTITY", "minimum_threshold_value": 2, "thresholds": [2, 3], "threshold_product_references": ["gid://shopify/Product/15397580472630"], "reward_type": "PERCENTAGE", "minimum_reward_value": 10, "maximum_reward_value": 15, "reward_values": [10, 15], "reward_product_references": ["gid://shopify/Product/15397580472630"], "threshold_messages": ["Layer Up Volume Pricing", "Layer Up Volume Pricing"], "universal": true, "test": false, "allow_b2b": true, "only_b2b": false, "all_products": false, "starts_at": "2026-09-28T10:04:00Z", "ends_at": "2026-09-30T10:25:05Z", "config": { "v": 2, "engine": "v2", "discount_type_ours": "price-list", "template": "quantity_break", "reward_type_ours": "percentage", "usage": {}, "purchase_type": "one_time", "configuration": { "discountValueType": "percentage_off", "tierBasis": "quantity", "tierScope": "selected", "convertCurrency": true, "priceRules": [ { "id": "qb0", "quantity": 2, "discountValue": 10 }, { "id": "qb1", "quantity": 3, "discountValue": 15 } ] } }}Step i is “buy thresholds[i], get reward_values[i]% off”. Money fields (none in this entry)
are in the smallest unit of the shop currency.
The discount entry
Section titled “The discount entry”Each entry is a metaobject with the handle discount-<Shopify discount ID>. Fields that do not
apply to a discount are left empty, so check for a value before you use one.
Who made it and what it is
Section titled “Who made it and what it is”| Field | Type | Holds |
|---|---|---|
discount_title | text | The title shoppers see |
discount_type | text | BASIC, PRODUCT_VOLUME (quantity breaks), ORDER_GOAL (spend tiers), BXGY, GWP (free gift), FREE_SHIPPING, SHIPPING, CUSTOM (DiscountOS Custom, Multi-offer and Bundle discounts) or UNKNOWN_APP |
discount_class | text | What it takes money off: product, order, shipping, or mixed for a discount with more than one |
provenance | text | Who made it: ours (DiscountOS), native (Shopify) or app (another app) |
method | text | automatic or code |
code | text | The discount code, for code discounts |
tags | list of text | The discount’s tags in Shopify |
discount_id | text | The Shopify discount ID (numbers only) |
discount_gid | text | The Shopify discount ID in gid:// form |
schema_version | integer | The version of this entry’s shape |
The reward
Section titled “The reward”| Field | Type | Holds |
|---|---|---|
reward_type | text | PERCENTAGE, FIXED_AMOUNT (money off) or FIXED_PRICE (a set price) |
minimum_reward_value | decimal | The smallest reward. A percent, or money in minor units. |
maximum_reward_value | decimal | The largest reward. A percent, or money in minor units. |
reward_product_references | list of products | The products the reward applies to, when it names products |
reward_collection_references | list of collections | The collections the reward applies to, when it names collections |
reward_product_indexes | json | For a free gift with steps: which of reward_product_references each step gives |
currency | text | For a DiscountOS price list limited to one currency: that currency. Otherwise empty, and money is in the shop currency. |
Thresholds and steps
Section titled “Thresholds and steps”| Field | Type | Holds |
|---|---|---|
threshold_type | text | What must be reached: QUANTITY, AMOUNT or NONE |
minimum_threshold_value | decimal | The first threshold. A quantity, or money in minor units. |
thresholds | list of integers | Every step’s threshold, lowest first |
reward_values | list of decimals | Every step’s reward, in the same order |
reward_quantities | list of integers | How many items each step gives, for buy X get Y and gifts |
threshold_messages | list of text | A short line per step |
threshold_product_references | list of products | The products whose quantity or amount counts towards the threshold. For buy X get Y, the “buy” products. |
threshold_collection_references | list of collections | The collections whose products count towards the threshold. For buy X get Y, the “buy” collections. |
Who can get it
Section titled “Who can get it”| Field | Type | Holds |
|---|---|---|
universal | boolean | true when every shopper gets it with no condition: automatic, not test mode, not buy X get Y or a free gift, no customer condition, every market, no usage limit, not subscription-only, no location or shipping condition. Only these feed max_reward_percent and max_reward_cents. |
test | boolean | true for a DiscountOS discount in test mode |
included_customer_tags | list of text | The shopper must have one of these customer tags |
excluded_customer_tags | list of text | The shopper must have none of these customer tags |
included_markets | list of text | Market handles the discount works in. Empty means every market. |
excluded_markets | list of text | Market handles the discount does not work in |
allow_b2b | boolean | Whether business (B2B) customers can get it |
only_b2b | boolean | true when only business customers can get it |
cart_attribute_key | text | A cart attribute the cart must carry |
cart_attribute_value | text | The value that attribute must have |
Where and when
Section titled “Where and when”| Field | Type | Holds |
|---|---|---|
all_products | boolean | true when it applies to every product. These entries live on the shop only. |
starts_at | date and time | When it started |
ends_at | date and time | When it ends. Empty when it has no end. |
config
Section titled “config”config is a json field with details that do not fit the fields above. It always has v (its
version). Keys you may find:
| Key | Holds |
|---|---|
discount_type_ours, reward_type_ours, engine | The DiscountOS type, reward and engine names |
template | The preset the discount was made from: quantity_break, smsm (Spend More Save More) or gift_with_purchase |
purchase_type | Which purchases it applies to: one_time, subscription or both |
exclusions | Products, collections or tags the discount does not apply to |
tiers_mixed, tier_reward_types, tiers_dropped | For discounts with steps: set when the steps use different reward types, or when a step could not be written |
usage | limit_total (total uses allowed) and once_per_customer |
targeting.variants | Variant IDs the discount is limited to. Empty means every variant. |
targeting.giftVariants | For a free gift: the gift’s variant IDs, one list per step |
eligibility | Customer conditions: counts for segments and named customers, and conditions such as locations. It never lists customer names or IDs. |
price_basis | For a set price: whether it is per item or for the whole set |
configuration | The DiscountOS setup for Custom, Multi-offer and Bundle discounts, such as bundleItems |
config_truncated | true when the details were too long and were cut. The discount works as set up; only the data is shorter. |
typename, combines_with, threshold_refs_unknown | For Shopify’s own and other apps’ discounts: the Shopify type, what it combines with, and whether the “buy” products could not be read |