How to use time-based discounts with Freshly Inventory

Simple Discounts and Freshly Inventory work together to discount products as they get close to, or pass, their expiry date. This is useful for products with a limited shelf life, such as food and beauty products.

Freshly Inventory keeps each variant's expiry date up to date, and Simple Discounts reads that date to apply your discount automatically.

Before you start

  • Simple Discounts and Freshly Inventory are both installed on your store.
  • Your products have expiry dates recorded in Freshly Inventory.

Not using Freshly Inventory? See How to manually set expiry dates for Shopify products and apply discounts.

Part 1: Turn on expiry dates in Freshly Inventory

  1. Open Freshly Inventory and go to Preferences.
  2. Find the Expiry Date on Storefront section.
  3. Turn on Enable display of expiry dates on product pages.

Freshly Inventory then saves each variant's expiry date in a variant metafield, using the namespace freshly  and the key expiry_date . The date updates automatically as your inventory changes.

Turn on the display of expiry dates on product pages

Part 2: Create the time-based discount

Once your variants have expiry dates, create the discount in Simple Discounts.

  1. Open Simple Discounts and click Create discount, then choose Time-based discount.
  2. Choose the method: discount code or automatic.
  3. Enter the discount percentage.
  4. Choose when the discount applies, using days before or days after the expiry date, and enter the number of days.
  5. Set the products, customer eligibility, combinations, and active dates, then save.
Create time-based discount in Simple Discounts
Option When the discount applies Example
Days before In the days leading up to the expiry date 30% off in the 14 days before expiry
Days after In the days following the expiry date 50% off for 7 days after expiry, for clearance

Part 3: Test your discount

  1. Choose a variant whose expiry date is inside your days window.
  2. Add it to your cart on your online store.
  3. Check that the discount shows in the cart and at checkout and that the final price is reduced by the amount you set.

If you created a discount code, share the code with your customers. They enter it at checkout to receive the discount. An automatic discount applies on its own.

If your discount doesn't apply

  • Check that Freshly Inventory is saving expiry dates and that the variant has one.
  • Check that today falls inside your days before or days after window.
  • Check that the discount is active and the dates are correct.
  • Check that you haven't reached Shopify's limit on active automatic discounts. See Limit on automatic discounts.
  • If it still doesn't apply, contact our support team and share the discount name and an example product.

Need help?

Email us at hello@simplediscounts.io, and we'll get back to you as soon as we can.

Still need help? Contact Us Contact Us