To give a discount to everyone except wholesale customers, tag your wholesale customers Wholesale in Shopify, then add the Global Condition Customer Tag Is not one of Wholesale in OneCode: Stackable Discounts. Logged-in customers with that tag don’t get the discount. Everyone else does, including guests, because guests have no tags.

Example: the automatic discount RETAIL15 gives 15% off and free shipping to everyone except wholesale customers. On a $60 cart:

  • A guest, or a logged-in retail customer, saves $9 and gets free shipping. They pay $51.
  • A logged-in customer tagged Wholesale gets no discount. They pay $60 plus shipping.

RETAIL15 at checkout for a guest. The $60 Summer linen shirt is $51, Economy shipping is free instead of $8, and the total is USD $51.00.

Checkout for a signed-in customer tagged Wholesale. RETAIL15 doesn't apply, so the $60 Summer linen shirt is full price, shipping is $8, and the total is USD $68.00.

Set it up

  1. In Shopify admin, open each wholesale customer and add the tag Wholesale.
  2. In OneCode, click Create discount and choose Automatic discount. Enter a Title such as RETAIL15. Checkout shows the title as the label on the discounted items. Choose Discount code instead if customers should enter a code.
  3. Under Global Conditions, click Add Condition. Set Field to Customer Tag and Operator to Is not one of. In Select or enter customer tags, pick Wholesale, or type it and choose Add “Wholesale”.
  4. Click Add Discount Type and enter 15 in Percentage, keeping Target as All Products.
  5. Click Add Discount Type, set Discount Type to Shipping Discount, and keep Free Shipping.
  6. Click Save discount.

The OneCode editor for the automatic discount RETAIL15: Customer Tag is not one of Wholesale under Global Conditions, a 15% Product Discount on All Products, and a Free Shipping discount on all rates

Every Global Condition must be met for anything on the discount to apply. A wholesale customer gets neither the 15% nor the free shipping.

Leave out more than one group

Is not one of means the customer has none of the tags. To keep wholesale customers and staff out of the same discount, add both Wholesale and Staff to the one condition.

Keep wholesale out of only part of the offer

Customer Tag also works as a Per-Discount Condition on every discount type. To give everyone free shipping but keep the 15% for retail customers, leave the Global Conditions empty and add Customer Tag Is not one of Wholesale under Per-Discount Conditions on the product discount only. Wholesale customers still get free shipping, and everyone else gets both. A Shopify discount code holds one kind of discount, so with Shopify’s own codes the 15% and the free shipping would be two separate codes.

Use a tag, not a segment

Customer Segment can only include customers, so it can’t leave a group out. To keep wholesale customers out, tag them and use Customer Tag with Is not one of, as above.

The opposite setup works the same way. To give a discount only to one group, use Customer Tag Is one of with that group’s tag. See a discount only for customers tagged VIP.

Global Conditions with Field set to Customer Tag, Operator set to Is one of, and the tag VIP selected

Things to check before you launch

  • Tags are only known for logged-in customers. A wholesale customer who checks out without logging in is treated like any guest and gets the discount.
  • Type the tag exactly as it’s spelled on your customers.
  • Tag every wholesale customer before the discount starts. A customer you haven’t tagged yet gets the discount.
  • Before you launch, check the discount while logged in as a wholesale customer, and again as a guest.

OneCode costs $9.90 USD every 30 days after a 7-day free trial, billed by Shopify. Install it from the Shopify App Store.