Articles on: Hugo AI Agent & Chatbot

What are pattern matches and how do they work

This article explains how pattern matches work in Crisp Workflows and how to use them to detect user messages reliably.


Pattern matches let a workflow react to specific words, phrases, or structures in a user message. They are especially useful with User Message Matches blocks, where the right wildcard setup determines whether your workflow detects only exact messages or broader variations.



What is a pattern match?


A pattern is a regularity in the world. The elements of a pattern repeat in a predictable manner. At Crisp, we take advantage of patterns to build repetitive behaviors for our bots and autoresponders.


Here is an examples of a user message matches available in the chatbot that uses pattern matches to work:


Example of a pattern matching the word "Invoice"


Note that pattern are key sensitive, meaning that you have to take mistakes from your users into account.



How are message patterns formatted?


Message patterns are used to match sections of user messages. For instance, if I want to match an 'Hello, I have a question.' message, a pattern such as 'question' can be used.


You can use wildcards (*) to fuzzy-match parts of user messages.


Some languages, such as Chinese, Thai and others have no spaces between words in sentences. In such case, the regular pattern wildcard * won't work to match "any word" between given words. You're looking to use a double wildcard instead (**), which is not space-aware.


Here are some examples of matching patterns:


Example 1: Can you help me? matches pattern can* (starts with word)


Example 2: I need technical support matches pattern *support (ends with word)


Example 3: Hello, I need help matches pattern *need* (word anywhere in the sentence)


Example 4: Hi! I have a question matches pattern hi*question


Example 5: My MacBook is broken. Is there some warranty? matches pattern *macbook is broken.**warranty*


Here are some examples of non-matching patterns:


Example 1: Okay that sounds good. does not match pattern help*me


Example 2: Can I speak to Baptiste? does not match pattern can*speak*to*valerian



What is negative pattern match?


Negative pattern matches means that workflow will trigger only when it doesn't see this word in the chatbox. This is an option that can be activated on each "user message matches" block to trigger a specific behavior.


Example of a negative pattern match


Updated on: 04/05/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!