When a bot receives an input message that it couldn't understand, it would reply with a "Sorry, I can't understand" message. If you wish to customize this default response message to give a reply of your own, you can customize that with Fallback function.
Enabling Fallback Function
- In a bot's detail page, under the ACTIONS section, click on ellipsis icon beside the ACTIONS section's filter.
- Click the Enable Fallback Function option. A pop-up window will be displayed for confirmation. Click OK.
- With this, Fallback function will be enabled and you will be redirected to the Fallback Function page.
- Save the function after constructing the required response.
Options to modify and disable Fallback function will also be available under the ACTIONS section, under the ellipsis icon, once the Fallback Function is enabled.
Any changes made to the Fallback function will reflect in the bot after the bot is published.
Invocation point
Fallback function is executed when the bot is unable to understand a user input message.
In addition to the system defined input arguments, the following input arguments are also available for Fallback Function.
Argument
| Deluge data type
| Description
|
userInput
| String
| Latest reply from user.
|
Return value