My Shopify app hides, renames and reorders payment and shipping methods at checkout. One screen in it sets up B2B: you say who counts as a business buyer, and it writes the rules for you.

This week the first store from outside my own test shops used that screen for real. It picked customer tags, created two payment rules, deleted both, and uninstalled the app 1 hour and 51 minutes after installing it. The uninstall reason said it wasn't working properly with the store.

The rule engine had no bug.

What the event log showed

The app writes one line per action, so the store's path was easy to read back:

  • The setup screen created two rules from a customer tag.
  • Both rules were created switched off. That's the default for anything the setup writes.
  • The store was on the free plan, which runs one rule at a time.
  • Nothing in the log shows a rule being switched on from the rules list.
  • The only other save was one rule-editor save, ten seconds before both rules were deleted. At the time, that line didn't record on or off.

So whatever the store tested at checkout, it most likely tested with no rule running.

Replaying the rule

I still wanted to know whether the rule would have worked once it was on. The setup's tag rule hides a business-only payment method from anyone without the wholesale tag. I ran it through the engine with a few buyers.

A logged-in customer with the tag saw the method. A logged-in customer without it didn't. A guest didn't either. Tag case and a trailing space made no difference, and there's a test for the case part.

The engine did what it was told.

Where tags come from

My function asks checkout for the buyer's tags like this:

buyerIdentity { customer { hasTags(tags: $customerTags) { tag hasTag } } } 

The tags hang off customer, and Shopify's schema describes that field as the customer interacting with the cart. The buyer's email is a separate field. A guest who types a wholesale buyer's email address is still a guest. There's no customer object, so there are no tags, and the rule treats them as retail.

My setup screen didn't say that. The option for Shopify B2B companies started with "Logged in". The tag option said "Customers with a tag".

I can't say whether this store would have hit the guest problem next. The log points to the first one: the setup left both rules off, and nothing shows them turned on.

I also checked whether functions needed a bigger Shopify plan. They don't for apps distributed through the App Store, so that wasn't it.

What changed the same day

  1. The end of B2B setup now has a Turn them on now button. It switches on the new rules in order while the plan allows, and names the ones that stay off.
  2. The setup states the free plan's limit and how many rules are running, even when the new ones fit.
  3. The tag option now reads "Logged-in customers with a tag", with this note under the tag field (the rule tester got a shorter one):
Tags count only for customers logged in at checkout. A guest who types a business buyer's email is treated as retail, so test with a logged-in account. 
  1. Results show right under the button. Pressing create again on rules that are already saved but off offers the same turn-on button.

Then I ran a real checkout on a test store. As a guest, cash on delivery was hidden, and logged in as a wholesale customer, it showed. No order was placed.

Later that day the same store installed the app again, and it now has one rule switched on. It didn't go through the B2B setup this time, and the log doesn't say why it came back.

Takeaway

A rule that's saved but off and a rule that reads a field checkout never fills look the same from the merchant's side. Nothing happens.

If I could only ship one of those fixes, I'd ship the turn-on button. It's the one the log points to.

If you've built anything on customer tags at checkout, which one bit you first: a setting that was saved but never active, or a guest checkout with no customer attached?

This post was drafted with AI help. The numbers and facts come from my own logs and repo.