How to manually set expiry dates for Shopify products and apply discounts
If you are not using Freshly Inventory, you can still apply time-based discounts to your Shopify products. You will add an expiry date to each product variant yourself, then create a time-based discount in Simple Discounts that uses that date.
Step 1: Create the expiry date field
You only need to do this once. After it is created, the field is available on every product variant in your store.
- In your Shopify admin, go to Settings > Custom data.
-
Click Variants.
Click on Variants under Metafields and metaobjects section - Click Add definition in the top right corner of the page.
- Fill in the definition:
- Name: FC time-based discount date
- Namespace and key: freshly.expiry_date
- Type: Date
- Value: One value
- (Optional) Add a description, and pin the definition so it appears at the top of your metafield list and on your product variant pages.
- Click Save.
Important: The namespace and key must be exactly
freshly.expiry_date. If it is spelled differently, the discount will not pick up the date.
Step 2: Set the expiry date on each variant
Repeat these steps for every variant you want to discount.
- In your Shopify admin, go to Products and open the product.
- Under Variants, click the variant you want to discount.
- Scroll down to the Metafields section.
- Next to FC time-based discount date, choose the expiry date.
- Click Save.
You can change the date at any time by repeating these steps.
Note: Without Freshly Inventory, the expiry date has to be set manually on each variant. This can be done by a user in the Shopify admin or through the API.
Step 3: Create the time-based discount
- Open the Simple Discounts app.
- Create a new time-based discount.
- Enter the discount percentage.
- Choose when the discount applies:
- Days before: the discount applies in the days leading up to the expiry date.
- Days after: the discount applies in the days following the expiry date.
- Save the discount.
By setting expiry dates manually, you can still run time-based promotions on your Shopify store. If you have questions about creating discounts, please contact the Simple Discounts app support team.