Customer Specific Catalogs

Customer-specific catalogs allow you to restrict product visibility, display tailored assortments, or serve unique category taxonomies based on customer segments or account roles. Implementing customer-specific catalogs ensures B2B buyers or segmented customer groups only interact with relevant, authorized products and category trees.

This guide answers the following technical question: How do you structure product feed attributes and configure Tweakwise Delivery API requests to serve customer-specific product assortments?

Implementation involves three main steps:

  1. Setting up customer group attributes and taxonomy structures in your XML product feed.
  2. Registering and mapping attributes in Tweakwise app.
  3. Querying customer-specific results using Delivery API contextual filters and parameters.

Instructions & implementation

Step 1: Define Customer Group Attributes in the Data Feed

To restrict or target products for specific customer groups, incorporate target segment attributes or custom catalog identifiers into your product feed.

  • Include a repeatable attribute (e.g., customer_group or catalog_id) for each item record in the feed.
  • Assign one or more customer group codes to items based on visibility permissions.

Example: XML feed structure

<?xml version="1.0" encoding="utf-8"?>
<tweakwise>
  <items>
    <item>
      <id>PROD-B2B-501</id>
      <name>Industrial Machinery Lubricant 5L</name>
      <attributes>
        <attribute>
          <name>customer_group</name>
          <value>WHOLESALE_GOLD</value>
        </attribute>
        <attribute>
          <name>customer_group</name>
          <value>WHOLESALE_PLATINUM</value>
        </attribute>
      </attributes>
    </item>
    <item>
      <id>PROD-RETAIL-101</id>
      <name>Standard All-Purpose Cleaner 1L</name>
      <attributes>
        <attribute>
          <name>customer_group</name>
          <value>RETAIL_PUBLIC</value>
        </attribute>
      </attributes>
    </item>
  </items>
</tweakwise>

Step 2: Map Attributes and Category Trees in Tweakwise app

After importing the product feed, configure attribute handling and taxonomy trees:

  • Run a feed import so Tweakwise automatically discovers the customer_group attribute.
  • Configure the customer_group attribute as a API attribute in Tweakwise app to allow API filtering. Learn more →.
  • If serving unique navigation hierarchies per customer type, define multiple category trees in your feed and link them to respective channel profiles.

Step 3: Query Customer-Specific Catalogs via Delivery API

When rendering lister pages or search results for authenticated users, pass customer group parameters in your API request.

  • Identify the authenticated user's assigned customer group code on your frontend server.
  • Construct the Delivery API search or lister request URL including the customer group filter parameter.
  • Apply hidden filter parameters using double URL-encoding for tn_parameters where necessary.

Examples:

  • Tweakwise JS: Handle Customer Specific Catalogs
  • API: Handle Customer Specific Catalogs

Notes & Important Considerations

  • Parameter Encoding: Hidden filter strings appended via tn_parameters or tn_parameters_except must be double URL-encoded to prevent query string truncation or malformed request errors.
  • Cache Isolation: Ensure frontend or edge caching strategies account for customer group context so that public users are never served cached responses belonging to B2B or VIP customer segments.
  • Default Fallback Assortment: Always configure default visibility logic in your frontend application for unauthenticated visitors who do not possess a specific customer group tag.

FAQ

How do I assign a product to multiple customer groups simultaneously?
In your XML feed, add multiple entries sharing the same name (e.g., customer_group) with different group values for that item record. Tweakwise indexes these values as multi-assign properties, enabling the item to appear in queries for any matching customer segment.

Can I serve entirely separate category navigation trees for different customer segments?
Yes. Tweakwise supports multi-tree category indexing. You can define multiple distinct category trees in your feed and request specific taxonomy trees by passing context parameters (such as tn_cid) in your Delivery API queries.

What happens if a logged-in user belongs to a customer group that has no assigned products?
If the Delivery API query filters by a customer group code that matches zero ingested products, Tweakwise returns an empty product grid with zero result counts. Your frontend should handle empty states gracefully by rendering clear messaging or offering fallback catalog navigation.