Try our conversational search powered by Generative AI!

Promotions - Only apply discounts if item is in stock


Im working with a customer that recently upgraded to the new promotion engine. A type of promotion they frequently used in the old engine was something along the lines of: 

"% discount as long as the item is in stock" 

Is there any simple way to achieve this in the new promotion engine without customizing all pre-existing promotions? 
I basically want an item to be excluded from a promotion if that item is not in stock. 

Feb 05, 2019 15:03

I'm not sure I understand the question entirely, because if an item is not in stock then customers can't buy them anyway.

If you want to exclude out of stock items from any promotions, then look into 

basically you can get inventory records of an entry to see if you should exclude from promotion engine

If you want to exclude out of stock items from a specific promotion, then you would have to wait for Commerce 13 with this new feature 

Edited, Feb 05, 2019 15:14

I understand the confusion. But the site allows for backorders when an item is out of stock, so a customer can still complete a purchase of said item but with a delayed delivery date. The purpose of the promotion is to promote sales of an item that may be over-stocked but no longer apply when that item is no longer in stock. Sort of like an online-outlet. 

So excluding specific items from all promotions is not exactly what i'm looking. I might have to wait for the upcoming feature and see if that solves my problem.

Feb 05, 2019 16:12

"So excluding specific items from all promotions is not exactly what i'm looking."

Actually it sounds like that is exactly what you want to do and the new feature won't help you.

As Quan said you implement a filter that check to see if the entry is out of stock and if they are you exclude them from all promotions.

Or are you saying that it is only a specific promotion than shouldn't be applied to items that are out of stock? And you have other promotions that should be applied?

Then you have no choice other than implement a custom promotion:
The new feature won't help you in this case either.

Edited, Feb 05, 2019 16:27

It sounds as if i might have to create a custom promotion for this as you said Erik. I tried using an EntryFilter but i still want the item to be eligible for order-level discounts. 

Feb 06, 2019 11:33

Yes, then a custom promotion is the way to go.

Feb 07, 2019 17:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.