Requiring PO numbers on Shopify B2B orders: setting up company checkout rules
If you sell wholesale to businesses, you’ve probably received a message like this: “We can’t process the invoice without a PO number.” In B2B, orders are supposed to be placed against a purchase order issued by the buying company. An invoice that arrives without that number has nothing to match against in their accounting system, so it sits unprocessed. The result is late payment. Then someone on your side has to match order numbers against purchase orders, send a correction email, and wait for the reply. An order that already sold stops moving because of paperwork.
In this article, I’ll walk through how to make the PO number required on Shopify’s B2B checkout, and stop orders without one before payment goes through. I built Validify Checkout Guard, the app used for this, so this comes from the person who made it. The idea is the same as fraud prevention and address validation: check conditions mechanically at the checkout screen and stop only the orders that trip them. B2B orders have a few validation points of their own, so I’ll go through them in order.
Where PO numbers become required
Whether you should require a PO number depends on how the buying company runs procurement. In business-to-business purchasing, PO numbers are effectively required in three situations.
The first is the procurement process itself. Purchases above a certain amount usually can’t be made on the sole judgment of the person on the ground. The purchasing department issues a purchase order, a manager approves it, and the order goes out carrying that number. In other words, the PO number is proof that the purchase cleared the company’s internal approval. An order without one sits outside their internal process, and it may not be accepted at all.
The second is the three-way match. Accounting departments confirm payment by matching three documents: the purchase order, the receipt, and the invoice. If the invoice doesn’t carry a PO number, there’s nothing to anchor the match against, and the invoice lands in the waiting pile. Days later you get a “could you tell us the PO number” inquiry, and payment slips by that much. The larger the order, the heavier the delay weighs.
The third is credit management. A purchase order with a PO number is a record that the buying company committed to paying. An order placed by word of mouth or chat alone leaves no document either company can point to if something goes wrong. The longer the relationship, the more it matters to keep records.
A rule example: block when the PO number is empty
Here’s an actual rule. Every rule in the checkout guard is built as criterion + operator + value. To make the PO number required on B2B checkout, you stack two conditions with AND:
- Criterion: B2B checkout / operator: is true
- Criterion: PO number / operator: is empty
B2B checkout is Shopify’s B2B selling mechanism, where a business customer orders from their company account and specifies one of the company’s locations. The rule above stops an order that is both “a B2B checkout” and “has an empty PO number” before payment proceeds. Consumer orders aren’t affected. Blocking happens only before checkout completes, and orders that don’t trip a rule are left completely alone.
One thing worth highlighting: where the error message appears. The PO number is one of only two criteria that can raise a field-level error (the other is the billing company name, covered later). When the rule trips, the error message shows directly under the PO number input. Unlike a red banner at the top of the screen, the buyer sees at a glance what to fix. Write “Please enter your PO number” and they type it in and move on. Block messages support 36 languages and display according to the buyer’s language setting.
Gating by company and location
A common companion to requiring PO numbers is a gate that restricts who can order, at the level of the company and its locations. The B2B criteria include company name, company ID, company location name, company location ID, and billing company name.
Here’s an example. Say you don’t want anyone outside your registered business customers buying from your wholesale-priced collections. You can stop orders where the company isn’t registered, for example where the company name is empty, and the cart contains a wholesale collection. Collections are available as a line item criterion, so “cart contains this product group” can be part of the condition. The construction is the same as the PO number example: conditions stack with AND and OR.
The billing company name also helps keep invoices addressed correctly. If payment gets processed by the buying company’s accounting department, you want the company name on the invoice to be the legal name. You can place a rule that stops orders where the billing company name is empty. Names that don’t start with the legal company name can be stopped with a regex mismatch (example: ^Acme Inc). Regexes can be up to 200 characters, and a compile check runs when you save. This criterion also supports field-level errors, so you can prompt for a correction right under the input field.
The list of B2B criteria
There are 8 B2B-specific criteria. Here’s the full picture again:
- PO number
- Whether it’s a B2B checkout
- Company name
- Company ID
- Company location name
- Company location ID
- Billing company name
- Order count for the company location
Company ID and company location ID are matched against the IDs Shopify assigns, not names, so even if two companies share a name there’s no misjudgment. The order count for a company location looks at how many times that company and location have ordered before. You can use it for things like adding a manual check only on a first transaction, or relaxing conditions for companies on their third order and beyond.
One caution: only the PO number and the billing company name produce field-level errors. Orders that trip the other six criteria show the block reason as a red banner on the checkout screen. The reason still appears on screen, so buyers never end up stuck with no idea why they can’t proceed.
How to separate B2B from general customers
A question I hear often in practice: how do you split B2B rules from rules for general customers?
The basic idea is simple: make “is this a B2B checkout” one of the conditions. Add “B2B checkout is true” with AND to a rule that should be B2B-only, and “is false” for one that should apply only to general customers. That cleanly separates business and consumer validation inside the same store.
On the general-customer side, customer tags work for sorting. If wholesale pricing is open only to tagged customers, draw the line with the customer tag criterion. The thinking and the rule construction are exactly what I wrote in detail in the fraud prevention article.
The wording of the block message matters too. Where you want to push buyers toward a business account, write the next step into the message, something like “To purchase at this price, please log in with your business account.” The buyer knows what to do and you get fewer support inquiries. You can write up to 500 characters per rule, so there’s room to include your contact point.
Getting started
The checkout guard is $5 a month with a 7-day free trial. My recommendation is to start with just the one PO number rule, then spend the trial comparing its behavior against your store’s B2B orders: is it over-blocking anything, is anything slipping through. The B2B criteria are grouped together when you switch the rule profile to the B2B one. If setup gives you trouble, I answer support myself within 24 hours. You can check the app details here.