Articles on: Regios Discounts

Metafield Discounts

Our app gives you the ability to create discounts based on the values of product/variant metafields.


Due to the Shopify Functions Input Query Complexity Limitation, product/variant metafield eligibility conditions had to be put in their own separate discount type, rather than being available in other discount types. Also, due to this limitation, several features that are available in other discount types are not available in metafield discounts (though you can submit a feature request). These limitations are largely about some discount conditions not available in Metafield Discount.


Use cases

  • Creating discounts for products with specific metafield values
  • Creating discounts for product variants with specific metafield values
  • Combining several metafields (for example "in stock" or "quick ship") into one discount condition


How to create metafield discounts


To create a new metafield discount:


Screenshot of our Metafield Discount Templates



  1. On the home screen of the app, click "Create discount."
  2. Click "Browse Templates".
  3. Type "Metafield" in the search bar.
  4. Select you desired Metafield discount bly clicking "Use Template".


Product/variant metafield eligibility conditions

Screenshot of a product metafield eligibility condition


Metafield discounts have additional product eligibility options available:


  • Product metafield
  • Product variant metafield


Options:

  • Choose metafield: A customer metafield definition from your store. We automatically load these from your store, but you can choose to "Enter metafield manually."
  • Condition: Either "equals" (the default), or "contains." This determines how the discount handles the product/variant's metafield value.
  • Metafield value: If your condition is "equals," your discount will only apply if the product/variant's metafield value is exactly equal to this field's value. If your condition is "contains," then your discount will apply if the product/variant's metafield value contains this field's value.


If you choose "Enter metafield manually," you will be shown 2 additional fields: Metafield namespace and Metafield key.


Screenshot of the fields for manually entering a metafield definition


You can find the correct metafield namespace and metafield key in Settings > Custom data > Metafields in your Shopify admin dashboard.


Using more than one metafield


A Metafield discount can check 1 product metafield and 1 variant metafield. You can add as many checks as you like on each of those fields (for example "equals A" or "contains B"), but you can't add a second variant metafield or a second product metafield. This limit comes from Shopify (see Shopify Functions Input Query Complexity Limitation).


If you need more, use one of these options.


Option 1: Move one condition to the product. If a value is the same on every variant of a product, store it as a product metafield. The discount can check that product metafield as well as your variant metafield.


Option 2: Combine your conditions into one field. Create one True or false variant metafield, for example "Discount eligible". Set it to true on the variants that should get the discount, then check only that field in the discount ("Discount eligible" equals true). True or false metafields are supported.


You can set this field by hand, with Shopify's bulk editor, or automatically with Shopify Flow:


  1. In Shopify, go to Settings > Metafields and metaobjects > Variants and add a True or false definition, for example "Discount eligible".
  2. Open the Flow app and click Create workflow.
  3. Trigger: Scheduled time. Pick a start time and add a repeat, for example every day or every hour.
  4. Add the action Get product variant data. Set Maximum number to 100 and choose the query Updated in the last day.
  5. Add the action For each loop (iterate) and pick the list from step 4.
  6. Under Repeat for each item, add the action Update product variant metafield and choose your "Discount eligible" metafield.
  7. In Value, click Add variable and add each metafield you want to combine. Then write the rule. For example, with two True or false metafields named "In stock" and "Quick ship":


{% if getProductVariantDataForeachitem.inStock.value == true or getProductVariantDataForeachitem.quickShip.value == true %}true{% else %}false{% endif %}


Use or if a variant should qualify when any of the fields is true, and and if all of them must be true. The variable names come from step 7, so use the names Flow shows you.


  1. Turn on the workflow.


Each run updates the variants that changed in the last day, up to 100 per run. For the first setup, or if more than 100 variants change in a day, set the field with the bulk editor too.


If you'd like help, send us your conditions and we'll set up the discount for you.


Your Feedback Matters

Your review helps keep this small business running. Please leave one on the Shopify App Store.

Updated on: 27/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!