Trigger a Shopify flow when Discount Expires

Why use the discount expiry trigger?

If a promotion ends at midnight but your homepage banner still shows the next morning, shoppers may try a code that no longer works. That usually leads to failed checkouts and avoidable support tickets.

The Discount Expired trigger helps prevent that. When a discount expires, the app can start a Shopify Flow workflow automatically. In one common setup, the workflow removes the expired discount code from a Shop metafield, which also removes the promotional banner from the storefront.

The Discount Expiry Trigger is detected through polling, because Shopify does not provide a native webhook for discount expiration.

Video Guide

You can see the whole process in video.

What this setup does

  • Watches for discounts that move from active to expired

  • Starts a Shopify Flow workflow using the Discount Expired trigger

  • Lets you remove or update storefront content that depends on the expired discount

  • Helps keep homepage banners, announcement bars, and metafield-driven promotions in sync

Before you begin

You need to enable discount access in the app before you can turn on expiry detection.

If you skip the permission step, the Enable Expiry Polling option and the Discount Expiry Trigger will not work.

Set up the trigger

In the app home screen, open the Setup Guide. Find Grant Discount Access and click it to give the app permission to work with discount events.

Setup Guide showing the Grant Discount Access option

After discount access is granted, return to the same Setup Guide section and click Enable Expiry Polling.

This opens the app's settings area, where polling-based triggers can be enabled.

Setup Guide showing the Enable Expiry Polling button under Grant Discount Access

In the app, go to Settings, then open Polling Triggers. Find Discount Expiry Trigger and switch it on.

This enables monitoring for expired discounts so the app can start your Shopify Flow workflow when a discount expires.

Settings page with Polling Triggers open and Discount Expiry Trigger enabled

Open Shopify Flow and create a new workflow. In the trigger picker, choose Flow Trigger Extensions, then select Discount Expired.

This trigger appears as Discount Expired with the description This workflow starts when a discount has expired.

Shopify Flow trigger list showing the Discount Expired trigger

In the workflow editor, use Select test event and then click Record events. This captures a real event so you can test the workflow with actual discount expiry data. You can explicitly create a test discount and then select the end data and end time from past, this will expire the disocunt and you will be able to see the event.

Shopify Flow test panel showing Select test event and Record events

Then in slack, create a workflow that starts with webhook and you can configure the variables here, then send message to specific slack channel when this webhhok is fired. We will make request to this webhook with discount data from the Shopify flow when discount is triggered.

image

image

Then in the shopify flow, you can make request to slack webhook with discount data. If you are using the basic shopify plan then HTTP request option is not available in Shopify flow. You can use flow action extension to send HTTP request.
I have used same flow action extension in the flow to send http post request to the slack webhook with deiscount data.

image

Now you can turn on the shopify flow and test the flow by explictly expiring a discount in Shopify. In the slack, you will be able to see the message like this:

image

In the events history, you can see the discount expired event and payload like this:

image

Example: remove an expired homepage banner

A common use case is removing a storefront banner that is powered by a Shop metafield.

  1. You store the active promotion code in a Shop metafield.

  2. Your theme reads that metafield and shows the banner on the homepage.

  3. When the discount expires, the Discount Expired trigger starts your Shopify Flow workflow.

  4. The workflow removes the expired discount code from the Shop metafield.

  5. Because the metafield is now empty or updated, the banner no longer appears on the storefront.

If your banner, announcement bar, or promotional block is driven by metafields, this is a reliable way to keep storefront messaging aligned with active discounts.

Expected result

After setup is complete:

  • The app detects when a discount expires

  • Shopify Flow starts your Discount Expired workflow automatically

  • Your follow-up actions can remove outdated promotional content, update metafields, or clean up expired campaign data

Troubleshooting

Check the app home screen and expand the Setup Guide. The permission appears there as Grant Discount Access.

This button only appears after Grant Discount Access has been completed.

When creating the workflow, choose Flow Trigger Extensions as the app source, then search for Discount Expired.

In Shopify Flow, open the trigger step, click Select test event, and use Record events so the workflow can capture a real example event.