πŸ› οΈ Managing Long User Messages with Advanced Builder

Sometimes users send lengthy messages that the chatbot's NLP may struggle to process. In this case, we'll configure the bot to notify the user that the message is too lengthy and prompt them to simplify their request. Follow this guide to set up a use case for handling long messages.

Step 1: Add a New Use Case πŸš€

  1. In your chatbot, navigate to Build β†’ Use Cases.
  2. Create a new Use Case named "Long Messages".


Step 2: Configure the Bot Response πŸ’¬

  1. Open the bot action.
  2. Edit the response to let users know the message is too long and ask them to simplify it. Feel free to customize this response.


  1. Save your changes.
  2. Set your Use Case Online.

Step 3: Configure the Trigger πŸ”

Since the NLP struggles with long messages, we’ll set up a filter based on message length instead of using an AI-based intent.

  1. Go to Use Case β†’ Start Intent.
  2. Delete the intent since we don’t need it.

πŸ“Έ Delete Intent

  1. In the sidebar, go to Build β†’ Filters.

  2. Create a Filter and use a regular expression to match messages longer than 300 characters.

    ^.[\s\S]{300,}
    
  3. Link this filter to the "Long Messages" bot action and Save.


Step 4: Test it! πŸ§ͺ

Use a test message over 300 characters to verify the filter triggers the "Long Messages" response.


Going Further πŸ”Ž

  • How do I know if a filter was triggered?
    • In the Inspector: Look for "No intent" under the Details tab or "Filter triggered" under the Checklist tab.
    • In the Trace: The Summary will show "No fired intent found," and the Raw tab under "Bom interface" will list any matched filters.


  • Managing Multiple Filters

    • Filters execute in order from top to bottom. If one isn’t matched, the next filter is evaluated until one matches or the NLP model takes over.
  • Quick Replies Triggering the Filter?

    • Filters apply to every user message, including quick replies. Make sure quick reply titles don’t match any filters, or the intended action won’t trigger.