Analytics & Reports

OR Navigations

This document is intended for clients who intend to allow users to select multiple refinements within a Dynamic Navigation. This document goes through an example user session demonstrating how selecting different refinements affect the records returned and the refinement counts.

Single OR Navigation

When a user comes to your store and searches for “dress” they will see a result page full of dresses. They can then refine using the color “blue”, to only see blue dresses. At this point, if the user also wants to see red dresses they can then select the red refinement and increase the number of products returned. This is set up by the merchandiser using the OR navigation option in the Command Center (see Dynamic Navigations or through the API.

In the above image, we can see the effect of enabling the OR Query option for the color Navigation.

Multiple OR Navigations

When creating multiple navigations that enable OR functionality, there are a few things to consider. As an example, we will have a set of shoes. The OR navigations will be shoeColor and shoelaceColor with regular AND navigations of be shoeSize and shoeWidth.

  1. Records returned will always respect all selected refinements

  1. Selecting one refinement in an OR navigation (color), will restrict the records, but the other refinement values for that OR navigation remain. It is important to note, any other OR navigations will now be also restricted by that selected refinements.
  1. Selecting one refinement from another OR navigation (shoelaceColor), will also restrict the records and all other navigations
  1. Lastly, selecting a second refinement from the first OR navigation (color) will increase the number of records returned. It is important to note, as the other navigations are restricted based on selected navigations, the counts for the other OR navigations (shoelaceColor) will increase.

Edge Case - Zero Results

While it is not possible to refine to a state where no records are returned, it is possible to un-select refinements into a state where there are no results. To continue the above example, imagine we only have"red/gray" (color/shoelaceColor) and “tan/blue” shoes.

The following steps will result in no results:

  1. Select the “red” and “tan” colors; and the “gray” and “blue” shoelaceColors
  1. Un-select the “tan” color and “gray” shoelaceColor
  1. “red/blue” will be selected and no results remain
How to avoid this scenario?

You can avoid this on the UI side by checking the selected refinements against the available navigations. Since the available navigations are always accurate, by removing any selected refinements that do not appear in the available navigations, they will become impossible to un-select refinements into an empty state.