Skip to content

Customer Conditions

Customer conditions let you personalize checkout rules based on who is buying — their account data, purchase history, tags, B2B status, and custom metafields.

Condition key: customerTag

Checks whether any of the specified tags are (or are not) applied to the customer’s Shopify account.

Operators: Is one of, Is not any of, Text contains, Text does not contain

Use cases:

  • Show wholesale payment methods only for customers tagged “wholesale”
  • Hide COD for customers tagged “high-risk”
  • Offer VIP shipping rates for customers tagged “vip”

Example: Show bank transfer only for “net30” customers:

  • Condition: Customer tag → Is one of → net30

Customer is B2B Shopify Plus

Section titled “Customer is B2B ”

Condition key: customerB2B

Returns true if there is a Shopify B2B company associated with the purchase. This is a Shopify Plus feature and only works with the native Shopify B2B functionality.

Operators: Is true, Is false

Use cases:

  • Show invoice payment for B2B customers
  • Hide COD for B2B accounts
  • Display different shipping rates for company accounts

Condition key: attributeB2B

A cart-attribute-based B2B check that works even without Shopify Plus. Returns true when the cart attribute b2b is set to true by your storefront.

Operators: Is true, Is false

Use cases:

  • Non-Plus stores that manage B2B via a custom cart attribute flag

Condition key: buyerIsAuthenticated

Returns true when the customer is logged in to their Shopify account during checkout.

Operators: Is true, Is false

Use cases:

  • Restrict certain payment methods to logged-in customers only
  • Show a loyalty discount shipping rate for account holders

Condition key: buyerEmail

Checks the email address entered by the buyer at checkout. This works even for guest checkouts.

Operators: Is one of, Is not any of, Text contains, Text does not contain, Is empty, Is not empty

Use cases:

  • Apply rules for orders from specific business email domains (e.g. contains @yourpartner.com)
  • Restrict payment methods for specific known email addresses

Condition key: customerEmail

Checks the email on the customer’s Shopify account (as opposed to the email entered at checkout, which may differ for guest orders).

Operators: Is one of, Is not any of, Text contains, Text does not contain, Is empty, Is not empty


Condition key: customerFirstName

Checks the first name on the customer’s Shopify account.

Operators: Is one of, Is not any of, Text contains, Text does not contain, Is empty, Is not empty


Condition key: customerLastName

Checks the last name on the customer’s Shopify account.

Operators: Is one of, Is not any of, Text contains, Text does not contain, Is empty, Is not empty


Condition key: customerDisplayName

Checks the customer’s display name, which can be their name, email, or phone number depending on how they registered.

Operators: Is one of, Is not any of, Text contains, Text does not contain, Is empty, Is not empty


Condition key: customerId

Checks the Shopify customer ID. Useful for applying rules to a specific set of known customers.

Operators: Is one of, Is not any of

Use cases:

  • Whitelist specific customers for special payment terms
  • Block specific accounts from using certain payment methods

Condition key: customerAmountSpent

Checks the total amount the customer has spent in your store (in your store’s default currency). Requires the customer to be logged in.

Operators: At least (≥), At most (≤)

Use cases:

  • Show VIP payment options for customers who have spent over £1,000
  • Restrict COD to customers with low purchase history (e.g. less than £100 total spend)
  • Reward loyal customers with free express shipping

Example: Offer premium payment terms for high-value customers:

  • Condition: Lifetime spend → At least → 1000

Condition key: customerNumberOfOrders

Checks how many orders the customer has placed. Requires the customer to be logged in.

Operators: At least (≥), At most (≤), Is (==), Is not (!=)

Use cases:

  • Restrict COD for first-time buyers (number of orders → Is → 0)
  • Offer special rates for repeat customers (number of orders → At least → 5)
  • New customer onboarding offers

Condition key: customerMetafield

Checks the value of a custom metafield on the customer’s account. You specify the metafield namespace and key.

Operators: Is one of, Is not any of, Text contains, Text does not contain, Is empty, Is not empty

Use cases:

  • Apply rules based on a custom CRM segment metafield
  • Check a “credit_limit” or “payment_terms” metafield for B2B customers
  • Trigger logic based on a loyalty tier metafield

B2B company name Shopify Plus

Section titled “B2B company name ”

Condition key: b2bCompanyName

Checks the Shopify B2B company name associated with the purchase. Requires Shopify Plus and a B2B company context.

Operators: Is one of, Is not any of, Text contains, Text does not contain, Is empty, Is not empty

Use cases:

  • Apply different payment terms per company
  • Show specific payment methods for named enterprise accounts