Welcome to Zuora Product Documentation

Explore our rich library of product information

Product Search Plugin

Use the Product Search Plugin to customize how products and rate plans are prioritized and sorted in the Quote Studio Browse Products modal.

The Product Search Plugin lets you customize how products and rate plans are sorted in the Quote Studio Browse Products modal.

Without the plugin, search results are sorted by product name.

With the plugin, you can:

  • prioritize search matches by product name

  • prioritize search matches by rate plan name

  • apply different sort behavior based on quote context, such as currency, entity, or date

Like other Zuora CPQ extensibility points, you implement a global interface, deploy the Apex class.

How the plugin works

When a user searches for a product in Quote Studio, Zuora CPQ passes a SearchContext object to your plugin implementation.

Your plugin returns a SearchConfig object.

The sortBy value in SearchConfig determines how search results are ordered.

Sort options

Use one of the following sort priorities:

  • PRODUCT - Promotes product-name matches above rate-plan-only matches. Base ordering remains product name, followed by rate plan full name.

  • PRODUCT_DEFAULT - Preserves the default legacy ordering with no plugin-driven priority changes.

  • RATE_PLAN - Promotes rate-plan-name matches above product-only matches. Base ordering uses ProductRatePlanFullName__c where applicable.

Interface

Implement the following interface in your Apex class.

global interface zqu.ProductSearchPlugin.IProductSearchPlugin {
    zqu.ProductSearchPlugin.SearchConfig getSearchConfig(
        zqu.ProductSearchPlugin.SearchContext context
    );
}

SearchContext

SearchContext is passed to your implementation every time a user runs a product search. All fields are read-only.

FieldTypeDescription
searchKeyStringThe term entered in the search box
quoteStartDateDateThe quote subscription effective date
quoteCurrencyStringThe ISO currency code, for example, USD
entityIdStringThe multi-entity entity ID. This value is null in single-entity orgs

SearchConfig

Return a SearchConfig object from getSearchConfig(). All fields are optional. Default values are applied when a field is left null.

FieldTypeDefaultDescription
sortBySortPriorityPRODUCT_DEFAULTControls result ordering

SortPriority values

ValueBehavior
PRODUCTPromotes product-name matches above rate-plan-only matches
PRODUCT_DEFAULTPreserves the default legacy ordering
RATE_PLANPromotes rate-plan-name matches above product-only matches