Skip to main content

Project restrictions

If you're a B2B tenant, a project can carry its own purchasing rules — restrictions on what may be bought against that project at checkout. These are separate from entity conditions: an entity condition applies to an item everywhere; a project restriction only applies when a purchase is being made against that specific project.

Project restrictions are managed on the project itself. This page defines what each restriction type means, since that's what ECS actually enforces at checkout.

Restriction types

Whitelist

Checks an item property against an allowed list.

{ "type": "WHITELIST", "propertyName": "department", "allowedValues": ["grocery", "pharmacy"], "allowIfMissing": false }

Denied unless item.additionalProperties[propertyName] is one of allowedValues. allowIfMissing (optional, defaults to false) decides the outcome when the item doesn't carry propertyName at all: pass if true, fail if false.

Blacklist

Checks an item property against a denied list.

{ "type": "BLACKLIST", "propertyName": "department", "deniedValues": ["tobacco", "alcohol"], "allowIfMissing": true }

Denied if item.additionalProperties[propertyName] is one of deniedValues. Same allowIfMissing mechanics as whitelist — and the same default: if the property is absent and allowIfMissing isn't set to true, the item is denied, not allowed. That's the non-obvious direction for a blacklist (missing the property means it can't match the denylist, but the default still denies) — set allowIfMissing: true if you want a missing property to pass instead.

Whitelisted items

Checks the item's own id against an allowed list.

{ "type": "WHITELISTEDITEMS", "itemIds": ["item-1", "item-2"] }

Denied unless item.id is one of itemIds.

Blacklisted items

Checks the item's own id against a denied list.

{ "type": "BLACKLISTEDITEMS", "itemIds": ["item-99", "item-100"] }

Denied if item.id is one of itemIds.

Things worth knowing

  • Multiple restrictions of the same type combine (union) rather than applying independently — for whitelist/blacklist that means same type and same property; whitelisted-items/blacklisted-items combine within their own type regardless, since they have no property to scope by.
  • A misspelled or unrecognized type doesn't block anything — it passes silently, with nothing to flag the mistake. Double-check the spelling.
  • Checked live per purchase (briefly cached), not against anything pre-loaded.

See Decisions and outcomes for what checkout sees when a restriction fails, and the API reference for how to preview a project restriction's outcome before relying on it.