Dynamic Filters are Catalog Filters for grouping together items that are created on demand, based on any Item field you require, and for all Items that have values for that field.
Whereas regular Filters would have needed to be individually created for each value, Dynamic Filters are based on the values in the data. When additional values are loaded, additional Filters are automatically created. Conversely - when values no longer exist (ie Items deleted or assigned to another subcategory), the corresponding Filters are not created.
Dynamic Filters can be positioned in a hierarchical tree layout, with multiple levels, making them a powerful tool in making your catalogs much easier to navigate.
They also prevent empty Filters from being created, because only Filters with the criteria that exist in the Item data will be created.
They come in really handy when you have a large number of items in your Pepperi data or periodically add a lot of Items to your Pepperi data via integration/uploads, because all the newly required Filters are created on the fly. Read on to understand the full picture!
Dynamic Filters may be set up in a "Tree" layout, where each sub-level is contained within the higher level. The levels are unlimited, so you can have as many levels of categories as you need.
Example of 3-level Filter Tree on WebApp:
NOTE: On mobile devices Dynamic Filters will only show 2 levels deep - the first level in the Menu and second level across the top of the Order Center (where Filters are typically locateD). On the Web Storefront all levels in the Filter Tree will be shown.
If you have 5,000 items divided into Main Category and a custom field called TSASubCategory
20 Main Categories
1,000 Items in Sub Category - Natural
500 Items in SubCategory - Organic
3,000 Items in SubCategory - Gluten Free
500 Items in SubCategory - Vegan
You need to create only 2 Dynamic Filters:
1 based on Main Category
1 based on SubCategory
Create these 2 Dynamic Filters and position them in the tree as follows:
The Filters will automatically be created for the Main Categories and underneath them for Items with the SubCategory values.
Whenever you add Items to Pepperi via integration which may contain additional SubCategories other than the initial ones you have loaded (above - Natural, Organic, Vegan, etc...), those SubCategory Filters will be created automatically.
For example, if you added 200 items with the following Main Categories and SubCategories:
2 more Main Categories
50 Items in SubCategory - Flavors added
120 Items in SubCategory - Allergans
30 Items in SubCategory - No Allergans
Those 2 Main Categories and 3 SubCategories would be added automatically.
How to Create Dynamic Filters
Firstly, in order for Dynamic Filters and the Filter Tree to be enabled you must enable both of these options in the Pepperi database for the customer. Pepperi support will enable this for you.
Go to Settings -> Items -> Filters -> Add New Filter
Select "Dynamic Filter"
Group by Main Category. This will create a Main Category filter for each Main Category value in your data.
You can also add rules below the Group By option, to filter only the Main Categories you wish to show, or to show only specific items within those Main Cateogries. These are the same rules as in the non-dynamic, regular filters.
Create another dynamic filter, this time group by SubCategory (a custom field in this example). A filter will automatically be created for each SubCategory that exists in your data. You can also add rules below the Group By option to determine which items appear in this Dynamic Filter.
For example: Item Formulation Contains "parabenFree" AND Item stock > 0.
This means that the items in the filter will contain paraben free formulation and be in stock. Items that don't fit these criteria won't be displayed in the SubCategory dynamic filter.
How to Position Dynamic Filters in the Catalog Filter Tree
Next, you'll need to assign the filters to the relevant Catalogs. If you are not using Multiple Catalogs, assign them to the Default Catalog. (You may need to enable the Multiple Catalog feature for the "Catalogs" configuration to be enabled).
Edit the Catalog and go to the Filters tab.
Add the 2 filters created above to the tree, indenting (by dragging right) the SubCategory Filter so it is underneath the MainCategory.
SubCategory Filters will be created for the Items in each Main Category that have a value for SubCategory. For example, if a Main Category does not contain any Items in the SubCategory "Gluten Free", that Filter will not appear under that Main Category.
On the Web Storefront the Filters will look like this:
In this example the first 4 Main Categories are opened for illustration -
|. . .|
When the additional 200 Items in the example above are loaded, the filters for their SubCategories "Flavors added", "Allergans" and "No allergans" will automatically be created and will include the Items in the Main Categories that have Items in those SubCategories.
Tip: You can create another non-Dynamic Filter called "All" and position it below Main Category, but above the SubCategory. This way when you click on a Main Category you will first see "All" items in that Main Category, rather than the first SubCategory of Items in the second level.
Your Filter Tree would then look like this, where ALL is simply a regular Filter (not Dynamic), that includes All the items at that level of the hierarchy:
On the Web Storefront the Filters would then look like this:
|. . .|
Adding more than 2 levels of Filters in the tree will result in each of the subCategories opening up into another level of Filters based on the field you grouped by when you created the Dynamic Filter (remember mobile devices show 2 levels only, any levels beyond that will be displayed on the WebApp only).
On mobile devices the first level in the Filter Tree is presented in the Main Category Menu on the left, as with regular Main Categories, and the second level in the Filter boxes to the right.