Preventing Product Sales in a Location
  • 04 May 2022
  • 1 Minute to read

Preventing Product Sales in a Location

This validation rule will prevent any product sale in the specified location. Customers and admins alike won't be able to purchase any product available in this location's inventory.

You need your Location reference to create this validation rule.

You can find your Location reference via Settings > General settings on the Admin Panel.


Make sure you copy and save it before starting the rule setup

  1. If the navigation menu isn't visible, click the menu icon in the top left corner of the page.

  2. Click Add rule

  3. Click on Manual entry

  4. Name your rule.

  5. Add a Description of the rule.

  6. Enable the This rule is active toggle.

  7. Select Product sale in the Record type drop-down list.

  8. Add the Error message to display if the validation rule is not met.

  9. Add the following snippet in the Formula field.

record.Business.Id <> 
  1. Add your Location reference at the end of the Formula field.

Your validation rule should now look like the example below, with your own location ID instead of 123456 in the Formula.


  1. Click the Save Changes button.

Your validation rule is now live. Customers and admins alike shouldn't be able to purchase any product from this location.