What is the best approach to apply discounts consistently for both B2B and B2C customers on Shopify while ensuring seamless integration with our ERP?
We can retrieve customers and company customers using segments, but applying discounts or overriding prices for a specific segment is challenging.
Previously, the priceRuleCreate mutation in v2024-07 provided the functionality we needed, but it has been deprecated. The alternative, discountCodeBasicCreate, requires customers to manually enter a discount code, which isn’t ideal. Meanwhile, discountAutomaticBasicCreate automatically applies discounts at checkout (which is what we want), but it does not support customer selection.
Our goal is to apply discounts dynamically for both B2B and B2C customers in a way similar to how segments work while ensuring that these discounts are synchronized with our ERP system. Ideally, we’d like to mix both customer types into a single discount group and have Shopify apply discounts automatically.
What would be the best approach to achieve this? Any insights on integrating this logic with our ERP would be greatly appreciated.
@Timothy_AS thanks for post can you try this way maybe helpful for you.
This response is generated by My workspace bot To effectively apply discounts for both B2B (Business to Business) and B2C (Business to Consumer) customers on Shopify, especially when integrating with an ERP (Enterprise Resource Planning) system, you will want to consider a few best practices. Below are the steps and methods you can implement to achieve this effectively.
Step 1: Define Discount Rules
Identify Customer Segments:
Define what differentiates your B2B and B2C customers (e.g., volume purchases, customer type).
Determine the types of discounts you want to offer (e.g., percentage discounts, fixed amount off, tiered pricing).
Set Up Discount Codes:
In your Shopify admin, go to Discounts and create discount codes that apply specifically to B2B or B2C customers.
Consider using tags or customer groups to differentiate between B2B and B2C customers.
Step 2: Use Customer Tags
Tag Customers:
Go to Customers in your Shopify admin, and tag your customers as "B2B" or "B2C" based on their type.
This will help in segmenting and applying specific discounts based on customer tags.
Implement Conditional Logic:
Use Shopify Liquid code in your theme’s cart or checkout templates to apply conditional logic for discounts based on customer tags.
Example Liquid code to display a discount message based on customer tag:
copy
liquid
{% if customer.tags contains 'B2B' %}
As a valued B2B customer, you get an additional 10% off your order!
{% else %}
Enjoy 5% off your first order!
{% endif %}
Step 3: ERP Integration
Choose an ERP System:
Select an ERP solution that integrates well with Shopify (e.g., NetSuite, SAP, Microsoft Dynamics).
Ensure the ERP can handle customer segmentation and discount applications.
Sync Customer Data:
Make sure your ERP system is syncing customer data, including tags and discount information.
Use tools like Shopify Flow (for Shopify Plus) to automate processes based on customer behavior and tags.
Set Up B2B Pricing in ERP:
Within your ERP, configure specific pricing rules for B2B customers, including bulk discount structures or contract pricing.
Ensure that these pricing rules are reflected in real-time or during the checkout process on Shopify.
Step 4: Implement Apps for Advanced Discounts
Use Discount Apps:
Consider third-party apps like Bold Custom Pricing, Wholesale Club, or Discounted Pricing that are designed specifically for B2B and B2C discounts.
These apps often provide features like tiered pricing, volume discounts, and customer group pricing.
Custom Checkout Solutions:
If you need more control over discounts and pricing at checkout, consider custom development solutions or apps that allow for different checkout experiences based on the customer type.
Step 5: Testing and Monitoring
Test Discount Applications:
Run tests to ensure that discounts apply correctly for both B2B and B2C customers.
Test with different customer tags to observe the behavior of discount codes and prices.
Monitor and Analyze Performance:
Use Shopify Analytics and your ERP's reporting features to monitor the effectiveness of your discount strategies.
Adjust your discount rules based on performance and customer feedback.
Conclusion
By following these steps, you can successfully apply discounts for B2B and B2C customers on Shopify while integrating with your ERP system. This approach allows you to cater to different customer needs, manage pricing effectively, and enhance the overall shopping experience. Always ensure that your processes are scalable and maintainable to accommodate future growth and changes in your business model.
@Timothy_AS , since native automatic discounts don’t allow you to target specific customers, our app, Discount Bot, lets you include or exclude customers based on customer tags. On top of this, you can easily target full-priced variants only (excluding all sale items), target generic variant options etc.
Here are some helpful screenshots with the admin settings for the discount:
This is a pretty real pain point right now, especially with the pricing / discount APIs shifting.
At a platform level, Shopify still doesn’t have a true “segment-based automatic discount” that works cleanly for both B2B and B2C. Automatic discounts are checkout-only and don’t support customer selection, and discount codes push too much friction onto the buyer. So you’re not missing anything — this is a known gap.
Without any app, the most reliable workaround is usually price-level control instead of discount-level control:
Use customer tags (or B2B company assignments) synced from your ERP
Serve different prices via:
Separate products/variants, or
Line-item scripts / Functions (if on Plus), or
Theme-level price overrides using metafields + Liquid
This works well with ERP syncs because you’re pushing “final price” instead of trying to reconcile discounts after the fact. It’s more deterministic, but the tradeoff is more product or pricing complexity.
Where this gets messy is when you want one catalog, mixed B2B + B2C customers, automatic behavior, and no checkout codes — that’s exactly where Shopify falls short today.
That’s actually why I built Latch. Instead of relying on Shopify’s discount system, it works higher up the funnel:
Customers (B2B or B2C) are grouped via tags or ERP-driven rules
Products, variants, or collections can be locked or adjusted based on those groups
Pricing logic can be handled before checkout, so customers always see the “right” price automatically
ERP stays in sync because pricing rules are deterministic, not code-based at checkout
Full disclosure: I’m the developer. Happy to answer questions or sanity-check an approach, even if you don’t end up using Latch. This is one of those areas where the right answer depends a lot on how tightly your ERP needs to control pricing vs how flexible Shopify needs to be.
This is a real pain point right now with the newer discount APIs. Shopify basically split “who gets the discount” from “how it’s applied,” which makes segment-style logic hard.
What I usually see working is pushing the ERP logic into customer tags (or company tags), then using automatic discounts that apply store-wide, while controlling who can actually see or buy at those prices via tagging. That way Shopify isn’t deciding eligibility — your ERP is.
I built Latch to help with this side of it. It lets you gate products, pricing, and purchase access based on customer or company tags, so B2B and B2C can live in the same store without relying on discount codes or deprecated APIs.
App link: https://apps.shopify.com/member-lock
Full disclosure: I’m the developer. Happy to chat through how others are wiring ERP → tags → pricing if helpful.