Open Hello, navigate to "Manage," and select "Bots."
Click on the Create Bot button and select type as MSG91[Beta].
Name the bot and Save it
Click the "Create Flow" button (top-right corner) to begin creating your bot flow. Name the flow and select the appropriate flow type based on your needs—either Message-based or Fallback.
Defining Intents and Matching
Add intent keywords (words users may input when interacting with the bot) and enable Case Match and Regex Match based on your requirements:
Case Match: Enables case-sensitive keyword recognition. For example, if “Hi” is case-matched, only the exact match “Hi” is accepted, while “hi,” “HI,” or “hI” will be rejected.
Regex Match: Use regular expressions (regex) to define text patterns, making it possible to validate, search, or manipulate user input. For example, the regex \d{3}-\d{2}-\d{4} matches a U.S. Social Security number (e.g., 123-45-6789). For more details, click "Learn more" or use tools like ChatGPT to help create regex codes.
If a user doesn’t respond after a set time, enable Nudge Contact to send reminders. Customize the message, number of attempts, and delay time. Save once configured
Now you can add the following nodes in your flow:
Send a message or text
Ask text or button
Utility
The Send Message node allows one to either send a text or media of any type. You can also add a variable in the message node.
The Send Media option allows user to send/attach media of the following type
Audio
Image
Video
Document
Click on the supported file types button to know more about the files supported by the bot along with their size.
The Ask Questions node provides user with two options: Ask text and Ask button
The Ask Text button lets user ask questions and store them in either pre-defined variables such as customer_name, customer_mobile and customer_email or custom variables.
Create the variables by writing the variable name under the store response section.
Validation Settings: This feature helps a bot validate the responses received from the user. Enter the no. of attempts along with the message to be shown when user input is invalid.
Post the completion of no. of attempts, the bot can either do the following tasks
Drop from the bot
Skip the question
Proceed to fallback: Upon selecting this option, a fallback option is created allowing you to perform an action of your choice.
To validate the response add the max and min no. of character required along with the regex expression if required.
Ask Button: Add buttons [max 3] along with header storing following types of data
None
Text
Image
Video
Document
Add footer and variables if required.
Use Utilities to add custom logic or scripts using JavaScript. You can execute APIs and display responses based on your logic.
You can test the script and do the needful changes by clicking on the test script button before saving it.
Click on the Settings to configure the bot level settings
Configuring Settings
Enable Inbox: Select which inboxes to integrate with the bot.
Fallback Flow: Choose a custom fallback action in case of no response.
Non-response Action: Define the bot’s behavior when the user doesn’t respond.
Save all settings, and your MSG91 bot is ready to go!