botBrains Rules: Custom Chatbots for Every Page
With botBrains new Rules feature, you can customize your chatbot for each URL individually. Control welcome messages, preview behavior, and suggestions with flexible glob patterns - for optimal customer engagement on every page.

Ben Meyer-Meisel
Co-Founder at botBrains
Your customers deserve unique communication – and the UI needs to be right too. With our new Rules feature, you can now precisely control how your chatbot communicates on different pages of your website.
Why Rules?
When you design your website, you surely have a specific purpose in mind for each page. Your homepage should spark curiosity, your blog posts want to inform, and on your product pages you want to convert. So why should your chatbot behave the same everywhere?
With Rules on the botBrains platform, you can specify exactly how your chatbot behaves on certain pages or URL patterns. You control precisely:
- Which starting message appears
- Whether the preview function is active
- Which suggestions are displayed
How Rules Work
Rules follow the principle: "If these conditions apply, then use these settings."

A Practical Example
For instance, we want to disable the preview function on all botBrains blog pages. Because if you're reading this, you probably don't want to interact with the chatbot, but rather learn about Rules!
So we create a Rule that applies to this page:
www.botbrains.io/en/blog/chatbot-customization-per-page-with-rules
And simply disable the preview function as shown in the image above. Done!
The Power of Glob Patterns
Now we have more than one blog article. We still want to disable the preview function on all blog pages. To avoid entering each page individually, we use glob patterns in "minimatch" style. Don't worry, it sounds more complicated than it is:
The Basics
*
stands for any characters (except/
)**
stands for any characters (including/
)?
stands for exactly one arbitrary character[abc]
matches one of the characters in brackets{a,b}
matches one of the alternatives
Examples of Glob Patterns
-
Match exact URL:
www.botbrains.io/en/blog
Applies only to exactly this page, in our case the blog overview page.
-
All subpages of a directory:
www.botbrains.io/en/blog/*
Applies to all direct subpages in the blog, e.g.:
- ✓
/en/blog/ai-chatbot-gets-image-understanding
- ✗
/en/blog/categories/news
(because*
doesn't match across/
) - ✗
/en/blog
(also here because*
doesn't match across/
)
- ✓
-
All subpages including nested ones:
www.botbrains.io/en/blog/**
Applies to all pages under blog:
- ✓
/en/blog/ai-chatbot-gets-image-understanding
- ✓
/en/blog/categories/news
- ✗
/en/blog
(because we force a/
afterblog
)
- ✓
-
Blog in all language versions with and without trailing slash: Either no trailing slash or all subpages
www.botbrains.io/en/blog{,/**}
Applies to all English-language blog pages:
- ✓
/blog
- ✓
/blog/
- ✓
/en/blog
and finally for all our pages in all languages:
www.botbrains.io/{,*/}blog{,/**}
- ✓
/blog/article
- ✓
/en/blog/article
- ✓
Pro tip: You can simply ask ChatGPT: "Create a pattern for me using the 'minimatch'-style glob syntax for [your desired paths]" – and you'll get the right pattern generated!
No Ideas Yet on How to Customize Your Chatbot?
Here are some examples of how you can customize your chatbot:
1. Support Focus on Help Pages
Guide visitors directly into the chatbot by offering your help:
Rule: www.example.com/{help,support,faq}/**
Starting message: "I see you're looking for help. What exactly do you need?"
2. Minimal Disruption on Checkout Pages
Disable the preview function on checkout pages to avoid interrupting the purchase process. If customers have questions, they can still get immediate help as relevant suggestions are offered directly:
- "Problem with checkout?"
- "Question about payment methods?"
Rule: shop.example.com/{checkout,cart,basket}/**
3. Context-based Selling
Control your selling on product pages or category pages with specialized suggestions.
shop.example.com/products/beginner-surfboard-*
Suggestions:
- "What's the best surfboard for beginners?"
- "What should I consider when buying my first surfboard?"
Priorities and Order
What happens when multiple rules match a URL? Simple: The more specific rule wins!
Example:
- Rule 1:
www.example.com/**
(general) - Rule 2:
www.example.com/blog/**
(more specific) - Rule 3:
www.example.com/blog/ai-article
(most specific)
For the URL /blog/ai-article
, Rule 3 will be applied.
Web SDK for Full Flexibility
By the way: For even more detailed customizations beyond Rules, our Web SDK offers the ability to control chat behavior directly via JavaScript. This allows you to implement actions like showing/hiding the chat, programmatically sending messages, or adjusting suggestions based on user interactions or other dynamic conditions. Find more details in the Web SDK Documentation.
Conclusion
With Rules, you give your chatbot the flexibility it needs to optimally support your customers. Instead of rigid behavior, your bot intelligently adapts to the context.
You can:
- Strategically control the customer journey
- Optimize conversion rates on important pages
- Create a consistent yet customized experience
- Better channel support requests
The new Rules feature is waiting for you on the botBrains platform!
PS: If you need help with setup, we're happy to assist you in creating your Rules.