Skip to main content

Notifications

Supply chain | Supply Chain Management, Commerce
Suggested answer

How to block a sale in the POS if the on hand quantity is not sufficient

Posted on by 40

Hi guys, 

I have a scenario where we would like to block sale at the POS level if the the on hand available quantity is not sufficient for the given transaction. 

What I am sure of is that there is no out of the box functionality yet by Microsoft, so a customization would be necessary. However, I have not done POS customizations before. 

Assistance on how to navigate and target the appropriate triggers in the commerce SDK would be highly appreciated. 

Thanks.

  • P Jackson Profile Picture
    P Jackson 1,571 on at
    RE: How to block a sale in the POS if the on hand quantity is not sufficient

    Why would you block a POS sale because of system inventory data. Surely if the customer/store has the physical stock, you want to sell it and complete a transaction?

  • boycez Profile Picture
    boycez on at
    RE: How to block a sale in the POS if the on hand quantity is not sufficient

    You can build customization by calling CSU inventory APIs to check on-hand prior to the order checkout flow. See Calculate inventory availability for retail channels - Commerce | Dynamics 365 | Microsoft Learn for more API details.

  • eetigu Profile Picture
    eetigu 40 on at
    RE: How to block a sale in the POS if the on hand quantity is not sufficient

    Hi Jeevan,

    Thanks for your response. However, the setups you suggested under retail and commerce are not in our environment.

    Thanks

  • Suggested answer
    JeevanG Profile Picture
    JeevanG 390 on at
    RE: How to block a sale in the POS if the on hand quantity is not sufficient

    Have to tried to set up an inventory check at the point of sale. This can be done by creating a validation rule that checks the on-hand quantity of a item at the time of sale and compares it to the quantity being sold. If the on-hand quantity is less than the quantity being sold, the sale can be blocked and a notification can be displayed to the user. Additionally, you can also set stock level alerts on certain items, so that when the stock goes below a certain level, the system will automatically block the sale of that item. You can also set up an inventory check in the product master record to automatically block the item when the on-hand quantity goes below a certain level. This will prevent the item from being sold in all channels (POS, eCommerce, etc.).

    To setup inventory check at the point of sale in D365 retail:

    1. Go to the Retail and Commerce > Channel setup > POS setup > Validation rules.
    2. Create a new validation rule by clicking on the "New" button.
    3. Name the validation rule and select "Sale" as the rule type.
    4. In the "Rule criteria" section, create a new line and select "Inventory" as the field, "is less than or equal to" as the operator, and enter a value of 0 as the constant. This will ensure that the rule only triggers when the on-hand quantity is 0 or less.
    5. In the "Rule actions" section, create a new line and select "Block transaction" as the action. This will prevent the sale from being completed.
    6. In the "Rule messages" section, create a new line and enter a message that will be displayed to the user when the rule is triggered. For example, "This item is out of stock."
    7. Save the validation rule.

    You will also need to activate this validation rule on the POS terminal, by going to Retail and Commerce > Channel setup > POS terminals > All POS terminals. Then select your terminal and activate the validation rule.

    To set stock level alerts on certain items:

    1. Go to Retail and Commerce > Products > Products, select the product you want to set the alerts on.
    2. In the product's form, scroll down to the "Inventory" section, you will see a field "Reorder point" and "Safety stock level".
    3. Enter the desired level in "Reorder point" and "Safety stock level" fields.
    4. Save the changes.

    Now, when the stock goes below the level set in the "Reorder point" or "Safety stock level" fields, the system will automatically block the sale of that item.

    Hope this helps. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans