Guide · Inventory and stock freshness

A Clearance collection that fills and empties itself in Shopify

Use the datima-expiring tag Datima sets on marked-down products to build one automated collection that adds short-dated products when a markdown starts and drops them when it ends.

A Clearance collection with three marked-down products tagged datima-expiring, and an empty slot where a sold-out product has left.
On this pageWhat sets the tag, and when it comes offStep 1: create the collectionWhat a shopper sees on the pageExample: a chilled shelf and one supplier’s linesWhen it emptiesEdge casesA short check you can runNext step

A food shop that marks down short-dated stock usually ends up maintaining a second list by hand: which products are cheap this week, which went back to full price, and which still sit on the Clearance page after the last discounted jar sold. Datima Expiry Management can take that job off the list, because every product with an active markdown carries a product tag, and Shopify can build a collection from a tag. This guide shows the one condition that turns that tag into a Clearance collection that fills and empties itself. It follows the app’s current guide, A Clearance collection that fills itself, last updated 14 October 2026 and checked for this article on 25 November 2026. The examples are illustrative, not results from a store.

What sets the tag, and when it comes off

The tag is datima-expiring. Datima puts it on a product when the first markdown on that product is applied, and takes it off when the last discounted batch is sold, written off, or the price goes back. The markdowns themselves are explained in automatic markdowns for short-dated stock; this article does not repeat how tiers are chosen. The only fact you need here is that the tag follows the markdown.

The tag is Datima’s own. The app adds and removes only datima-expiring, and only on products it has managed, so your other tags are not touched. If you already tag products yourself, those tags stay as they are.

Step 1: create the collection

  1. In the Shopify admin, open Products → Collections and choose Create collection.
  2. Name it for your shoppers: Clearance, Short-dated or Use soon.
  3. Under Collection type, choose Automated.
  4. Add one condition: Tag · includes · datima-expiring. The tag appears in the picker once a product carries it. Until then you can type it.
  5. Save, then add the collection to your menu under Online Store → Navigation if you want shoppers to find it.

From then on there is nothing to maintain. A product joins the collection when a markdown is applied to it and leaves when the markdown ends.

What a shopper sees on the page

Each product in the collection shows its reduced price. If your theme displays compare-at prices, the regular price appears struck through, because the markdown rules have an option to fill the compare-at price while a markdown runs. On the product page the Best before block can give the reason, in a line such as “Was $4.50 · short-dated, best before 5 Oct 2026”. How you add that block is in the best-before guide. How the compare-at looks depends on your theme, so check one product on your own storefront rather than assuming it matches the guide’s sample.

Example: a chilled shelf and one supplier’s lines

Conditions in an automated collection can be combined. Take an illustrative dairy-and-deli shop:

Illustrative collections built on the same tag
CollectionConditionsWho it is for
ClearanceTag includes datima-expiringEvery shopper looking for a bargain
Chilled clearanceTag includes datima-expiring and Product type equals DairyShoppers who buy from the chilled shelf
One supplier’s short-dated linesTag includes datima-expiring and Vendor equals the supplierA wholesale or repeat buyer for that supplier

The tag is the same in every row. The extra condition decides the cut, so you do not need a second tag or a second markdown rule.

When it empties

  • The batch sells out or is written off. The price goes back and, once the product has no discounted batch left, the tag comes off. See writing off expired stock for the write-off side.
  • You switch Markdowns to Off. The guide says every price goes back to regular and the tag is cleared from every product within minutes, so the collection empties by itself.
  • You switch back to Live. Products rejoin as batches fall within a tier.

Because the collection reflects the app’s state, an empty Clearance page is a valid result. It means nothing is currently marked down, not that the collection is broken.

Edge cases

  • Tag appears late. Datima applies markdowns and tags in short runs, not the same second a batch is edited. Allow a few minutes before deciding a product is missing.
  • A product with its own sale. The markdown rules have a setting to skip variants that already carry their own compare-at price. A skipped product has no Datima markdown, so it does not get the tag and will not appear in this collection.
  • Search and filters. Whether your theme’s collection filters expose price or tags is a theme matter. This article makes no claim about a particular theme.

A short check you can run

  1. Open one product with a batch inside a markdown tier and confirm its tags include datima-expiring.
  2. Create the automated collection with the single tag condition and open it in the Shopify admin preview. The product should be listed.
  3. Open the collection on your storefront and compare the shown price with the price on the product page.
  4. Sell or write off the discounted batch in a test, wait a few minutes, and reload the collection to see whether the product has left.

These steps describe what the guide says should happen. This article does not report that someone has run them.

Next step

Create the collection once, with only the tag condition, and add it to your menu. Then decide whether a second, narrower collection is worth having. To see how the discount and the product-page line work together, read the automatic markdowns guide. Datima does not promise that a Clearance page will increase sales; it only keeps the page accurate without manual work.

Written by the Datima team

Practical guidance from the team building Shopify apps for product presentation and stock management. About Datima.