Looking for our logo?
Search isn’t only about retrieving results. Sometimes, depending on what the user searches for, you may want to display ads or promotional banners. This tutorial explains the process of setting up a Rule to trigger a banner image or a simple content.
NOTE: This requires front end development work to be in place to trigger the banner image. Check with your development team for that to be in place and reference the docs.
From the Merchandising Studio homepage:
Click the Merch tools link at the bottom of the left-hand navigation.
Click “Rules” in the left-hand navigation.
Continue to Step 2 of the tutorial below.
.png)
.png)
.png)
.png)
Algolia can only apply one Rule at a time (and, hence, display one banner). In case of multiple applicable banners, the precedence logic, ranked by importance, is as follows:
How does lexicographic order work?
If two letters are the same case, then alphabetic order is used to compare them. If two strings contain the same characters in the same positions, then the shortest string comes first.
Example:
An online IT hardware store has permanent banners for the following categories:
The store also has temporary offers and associated banners for the phrases/products:
The user starts on the Phones page (and can see the appropriate banner for that), then searches for “note”. For most stages, Huawei Honor Note 10, Xiaomi Redmi Note 10 Pro, and Samsung Galaxy Note 20 Ultra are tied and take precedence over the category banners. The final tie-breaking stage, invoked in this case, is Rule ID: this looks for the Rule with the smallest objectID, which in this case just happens to be for the Huawei Honor Note 10.
Note: It is a better practice to set Rule Object ID manually.
For example: { “objectID”: “harry-potter-rule” }

Recognized by IDC, Gartner, Forrester, and Paradigm B2B, Algolia helps enterprises turn search into a growth engine for AI-native experiences.
Algolia is recognized as a Leader in the 2026 Gartner® Magic Quadrant™ for Search and Product Discovery as the market shifts toward AI-powered, agentic discovery.
A Forrester Consulting study found Algolia delivered $3.1M NPV over three years, helping commerce teams improve relevance, automate merchandising, and grow revenue
IDC recognized Algolia as a leader in general-purpose knowledge discovery software, citing the growing role of search in AI-powered workflows and enterprise knowledge experiences
Algolia earned 12 medals across 12 categories in Paradigm B2B’s 2025 Enterprise Combine for Search and Discovery, with customers praising speed, transparency, analytics, and ease of use
Hi there 👋 Need assistance? Click here to allow functional cookies to launch our chat agent.
Thanks for visiting! 👋 I can help answer any questions about Algolia.
Hey! 👋 Got questions about pricing or plans?
Want to skip the form and book some time with our team right now?
Hey there! Would you like to book a meeting with our sales team now?
Thanks for visiting! 👋 I can help answer any questions about Algolia.