web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

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

(0) ShareShare
ReportReport
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.

I have the same question (0)
  • Suggested answer
    JeevanGambhir Profile Picture
    390 on at

    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. 

  • eetigu Profile Picture
    40 on at

    Hi Jeevan,

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

    Thanks

  • boycez Profile Picture
    on at

    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.

  • P Jackson Profile Picture
    1,614 on at

    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?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 266 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 140 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans