Okay
  Public Ticket #4533990
Multiple equipment per customer / multiple logical groups (visibility + price)
Open

Comments

  • Damien started the conversation

    Hello,

    I’m currently looking for a WooCommerce B2B project using B2BKing Pro, and I’m running into a structural limitation that I’m trying to solve.

    1f50e.svg Business context

    • We have ~5,000 B2B customers
    • Around 700 products
    • Products are consumables linked to specific laboratory analyzers
    • Each customer can have:
      • One or multiple analyzers
      • Different analyzer types (e.g. Analyzer A, Analyzer B, Analyzer C)
    • A customer should:
      • Only see consumables compatible with the analyzers they own or use
      • Never see products for analyzers they don’t have

    2699.svg Ownership / pricing logic

    For the same consumable:

    • If the customer owns the analyzer → price A
    • If the analyzer is provided / rented → price B (fixed price, NOT a % markup)

    Additionally:

    • Some customers belong to a commercial group with a global discount (e.g. -10%)

    274c.svg Current limitation

    From what I understand:

    • A customer can only belong to one B2BKing group
    • Groups are the main driver for:
      • Product visibility
      • Pricing rules

    This becomes an issue because:

    • Customers can have multiple analyzers
    • Modeling one group per analyzer does not work since we are limited (1 group max)
    • Modeling one group per analyzer combination quickly explodes (3000+ combinaisons)
    • Managing rules per customer is not realistic at this scale ( 5000 customer)

    2753.svg What I’m trying to achieve

    Conceptually, I’m looking for something like:

    • Multiple “logical memberships” per customer (equipment-based)
    • OR a way to combine:
      • Equipment-based visibility
      • Ownership-based fixed pricing
      • Optional global discount groups

    All of this without:

    • Creating hundreds of groups
    • Managing product rules customer-by-customer

    1f64f.svg My questions

    1. Is there a recommended pattern in B2BKing for handling:
      • Multi-equipment customers
      • With strict product visibility and price?
      • Any undocumented best practice?

    Thanks in advance for your guidance.

  •  2,636
    WebWizards replied

    Hi Damien,

    Thanks for reaching out with this! I think B2BKing can handle it with some minimal custom code.

     

    Here's how I'd suggest tackling this:

    1) Product Visibility

    Rather than using groups for visibility, I'd recommend using product categories. Create a category for each analyzer type, then place the relevant consumables in each category.

    For visibility control, edit each category and add the specific B2B customers who have access to that analyzer here: https://prnt.sc/Qpktp2Ns0bqe

    This way each customer only sees products for the analyzers they have access to.

    If manually editing each analyzer category becomes too time-consuming at your scale, you could import this data via CSV or create a small custom tool with checkboxes to manage analyzer access per customer - shouldn't be too complex to implement.

     

    2) Ownership-Based Pricing (Owned vs Rented)

    For pricing, create 2 groups in B2BKing → Groups: "Owned" and "Rented". When editing each product, you can enter both prices.

    Then use a bit of custom code hooking into this filter:

    $current_user_group_id = apply_filters('b2bking_b2b_group_for_pricing', $group_id, $user_id, $product_id);

    This filter controls which price group a user gets for a specific product. You could store ownership/rental status as user meta (e.g. using ACF to create custom fields per analyzer), and then the code snippet pulls that info to automatically apply the correct price.

     

    3) Global Discount (-10%)

    This works nicely on top of the group prices - just set up a simple Dynamic Rule discount that applies the 10% reduction and add specific users to the rule.

     

    Overall I believe this is achievable, though you'll likely want some custom code here and there to make it manageable at your scale. We're happy to support you with technical info, point you in the right direction, or provide small code snippets. However, please note we don't provide custom coding services as a company - if you're working with a developer, I believe this setup shouldn't be too difficult to implement.

     

    Let me know if you have any questions,

    Kind regards,
    Stefan