Templates

The Templates screen in the Rules Editor allows you to design, test, and implement a wide variety of search experiences. Results are conditionally delivered from multiple different query pipelines, enabling you to use Fusion’s search, browse, and AI-driven functionality throughout your site.

Template Manager

Access Templates from the Rules Editor by navigating to Relevance > Rules > Templates. See Use Predictive Merchandiser Templates for instructions on using Templates.

Templates are only available with a valid license for Predictive Merchandiser. If available, you’ll see the templates icon in the left navigation panel: Templates icon

Templates

Templates are comprised of two primary elements, the template itself and its associated zones. A variety of conditions, or triggers, determine which template is shown to the customer. These triggers can include whether the template is active, the template’s precedence over other templates, the customer’s query, and whether the template is triggered within a specific date range (if set).

Zones

Zones enable Fusion users to create rules designed for specific query profiles. Combined with templates, this allows a search application to display results from multiple query profiles in the same view.

For example, if a customer searches for climbing, one zone can fetch results for climbing apparel, and another zone can fetch blog posts about climbing. The same zone can be used in multiple templates, and changes to a zone will be made on all templates that zone is used in.

Templates backend example

In the example above, a unique template is fired for the query cyber monday. This template has two zones:

  • Zones indicator 1 Promoted - Display advertised products.

  • Zones indicator 2 Main Results List - Display general search results.

The template configuration above can be used to create a search experience similar to the following:

Templates frontend example

Configuration options

Templates

Option Description

Active

If set to Off, this template will only appear if inactive templates are specifically requested, such as in the Predictive Merchandiser screen. In the Off state, the template can be saved, updated, and tested without making the template public.

If set to On, the template will be public and visible per the precedence and triggers.

Important
Ensure templates that are On are given an appropriately low precedence so that the desired templates are visible when their triggers fire.

Precedence

If multiple templates are triggered, this setting determines which template is displayed. Lower numbers are considered higher precedence. For example, a template with precedence of 999 will trigger before a template with precedence of 1.

Template Name

The name of the template.

Template Type

The type of template. This is an arbitrary value classifying the template. It has no effect on triggering/rendering logic unless the value is Typeahead. If Typeahead is assigned, the template will be excluded from /trigger and /render endpoints.

This value is read-only and for informational purposes only.

Zones

Determines which zones are loaded when the template is triggered. Zones are displayed in the order they appear.

Triggering

The conditions that must be met for the template to display.

  • Date Range - Define a date range to trigger the display of the template. For example, a desired template may be set to display during a Black Friday sales event.

  • Trigger - Define triggers to trigger the display of a template. Triggers are added with the Trigger button.

    • Search Term - Search terms required in the query for this trigger to match. The configured analysis will be applied to tokenize and process these terms.

    • Match Mode - Defines search terms matching criteria.

      • phrase requires the search tokens of this trigger to exist as a phrase within the search terms of the query. The phrase must be in the same order.

      • all requires the search tokens of this trigger to exist within the search terms of the query in any order.

      • exact requires that the search tokens in this trigger exactly match the search tokens in the query in the same order. As with all match modes, exact still applies the configured analysis, such as stemming. Singular and plural forms will be considered identical despite not being exactly the same.

    • Filters - Filters (fq) values required in the query for this trigger to match. Additional filters may be present in the query and still satisfy this trigger.

    • Exact - If On, the nav state must match exactly this trigger’s criteria. For example, no extra filters are allowed, and no search terms are allowed if this trigger has none defined. Not to be confused with setting Match Mode to exact, which specifically defines the search term matching logic.

All

If set to On, this template is always displayed, and triggers are ignored.

Triggering

The date range trigger is activated alongside triggers with an AND logical operator. Conversely, triggers are activated alongside other triggers with an OR logical operator. For example, consider the following scenarios:

Scenario 1 Scenario 2

Date Range

none

Date Range

November 25, 2020 - December 5, 2020

Search Term

cyber monday

Search Term

cyber monday

Search Term

sales event

Search Term

sales event

In Scenario 1, no date range is configured. The template is triggered if:

  • The user searches the term cyber monday or sales event.

In Scenario 2, a date range is configured. The template is triggered if:

  • Today’s date is within the date range November 25, 2020 - December 5, 2020, and the user searches the term cyber monday

  • Today’s date is within the date range November 25, 2020 - December 5, 2020, and the user searches the term sales event

The template is not triggered if:

  • Today’s date is not within the date range November 25, 2020 - December 5, 2020

  • Today’s date is within the date range November 25, 2020 - December 5, 2020, but the user does not search the term cyber monday or sales event

Zones

Option Description

Zone Name

The name of the zone.

Query Profile

Determines query profile the zone will fetch results from.

Zone Type

The type of zone. This is an arbitrary value classifying the zone. It has no effect on triggering/rendering logic.

This value is read-only and for informational purposes only.

Product Image

Field name for the product image.

Product Title

Field name for the product title.

Product Description

Field name for the product description.

Note
Product Image, Product Title, and Product Description are only used for rendering products in Predictive Merchandiser. Your search application will determine what fields are used in production.