Promotions - Only apply discounts if item is in stock

Vote:
 

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. 

#201090
Feb 05, 2019 15:03
Vote:
 

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 https://world.episerver.com/documentation/Class-library/?documentId=commerce/11/F55785D0 

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 https://world.episerver.com/blogs/Quan-Mai/Dates/2019/2/new-feature-in-commerce-13-exclude-catalog-items-per-promotion/ 

#201091
Edited, Feb 05, 2019 15:14
Vote:
 

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.

#201093
Feb 05, 2019 16:12
Vote:
 

"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:

https://world.episerver.com/documentation/developer-guides/commerce/marketing/custom-promotions/
The new feature won't help you in this case either.

#201096
Edited, Feb 05, 2019 16:27
Vote:
 

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. 

#201114
Feb 06, 2019 11:33
Vote:
 

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

#201174
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.