Skip to content

Plan Limits

A shop's plan sets limits: how many products, locations, staff and so on it may have (the keys are listed under Subscription Entitlements). This page is about what happens when a shop goes over one.

Admin is never blocked, the storefront is

Going over a limit never stops anyone working in admin. An owner can add the 51st product, open another location or set up another member of staff; admin shows a banner saying what is over and offering an upgrade. What changes is what shoppers see:

Limit While the shop is over it
maxProducts Only the first N products, oldest first, are live. The newer ones are left out of collection pages, product grids and search, their pages are not found, as if unpublished, and they can't be added to a basket or bought. The admin product list marks them Not live: over your plan's product limit. Disabled products don't count, so unpublishing some brings the shop back under
maxLocations Locations beyond the first N (the main location first, then oldest first) have no store page and aren't offered for collection or used to send deliveries from. The main location always serves the shop. The till and the dining room still work at every location
maxBookablePeople People beyond the first N aren't offered for online appointments. Staff can still book them by hand
maxTableBookingsPerMonth Once N table bookings have been made in the shop's calendar month, online booking closes for the rest of the month: the booking form shows no times and asks the guest to call (with the restaurant's number when it has one), and requests for a large table are refused too. The diary in admin and the app keep working, so staff can still take bookings by phone. Online booking reopens on the 1st
customDomain On a plan without a custom domain, the shop's own domain doesn't resolve to it: visitors get the "shop not found" page. Its address under the platform's domain (for example acme.bdgr.co.uk) keeps working
maxStaff Staff accounts beyond the first N, oldest first, can't sign in to the app or the till. The owner always keeps working and takes one of the places. Admin itself stays open
maxAdmins Nothing on the storefront: the banner only
maxMonthlyActiveCustomers A warning, never enforced. Nothing is held back: the shop keeps taking orders and bookings. Admin shows a banner at 80% and when over, and Badger staff are told

Monthly active customers are the distinct customers with an order, a table booking or an appointment in the shop's calendar month (in the shop's own time zone), matched across the three by email address, then phone number. The limit is set per location and multiplied by the shop's location limit; usage is the shop's total.

Table bookings are counted by when they were made, any source but walk-ins. A booking a guest cancels still counts towards the month.

Who is enforced

The storefront effects above apply only where the shop's limits are enforced, by the same rule as the capability gates (see Enforcement):

  • a shop that signed up self-serve is enforced from day one;
  • every other shop with a platform subscription (put on a plan by Badger staff, or moved from Badger Sett) is counted and alerted on in shadow mode: admin shows the banner, noting that nothing is held back yet, and the storefront is unchanged until enforcement is switched on;
  • a shop with no platform subscription has no limits at all.

On top of that, the global setting plan-limits-hold-back (System › Global configuration, off by default) must be on for anything to be held back. While it is off, every shop runs in shadow mode: usage is still counted, and the admin banner, the System "over limit" filter and Slack still report shops over their limits, but the storefront hides nothing. Custom domains are a plan feature rather than a count and are not affected by it.

Counting

Usage is counted:

  • a few seconds after a write that changes it: a product saved or deleted, a location saved, a table booking made, staff saved or a dining room's people edited. A burst of writes (a catalogue import) is counted once, not once per product;
  • whenever the shop's subscription is saved: a plan change, an allowance granted or removed, a Stripe update;
  • every night, for every subscribed shop, by a sweep in the worker. The sweep also starts each month afresh for the monthly limits.

What the count holds back is stored per shop and cached, so the storefront never counts anything while serving a page. The product limit is stored as a single cut-off date (the creation date of the last live product), which listings and search filter on directly; the product search index carries each product's creation time for that.

Setting Default
badger.billing.limit-sweep-schedule 0 10 1 * * * When the nightly sweep runs (worker)
badger.billing.limit-sweep-enabled true Turns the sweep off
badger.billing.platform-domains bdgr.co.uk,bdgr-demo.co.uk,bdgr.localhost The platform's own domains: a shop's address under one of these always works, whatever its plan

Alerts

Badger staff hear about limits in the #badger-notifications Slack channel: the shop's site id, plan, subscription, the limit and the counts, never anyone's name or contact details. A message is sent:

  • the first time a shop goes over a limit (the time is kept as overLimitSince on the subscription);
  • once a week while it stays over;
  • when it comes back within it, because usage fell or the limit was raised (an allowance, an extra location, a plan change);
  • for table bookings and monthly active customers, at 80% of the month's limit, and for table bookings when online booking closes for the month.

Each message says whether the limit is enforced on the storefront, in shadow mode, or advisory.

The admin banner

Every admin page shows people who can manage settings a banner when the shop is over a limit, or has used 80% of one of the monthly ones. Each line says what is over and what it does to the storefront, and the banner links to Settings › Plan & billing to upgrade, where the same usage is shown as meters and a downgrade the shop's usage is over is refused with what's over listed. It reads the last count, so showing it costs nothing.

See also