What are fallback messages?

What are fallback messages?

Fallback messages enable the bot to provide a response when there is no result or there are multiple options based on the user's input.

When there is one result based on the user's responses, you set up the final answer presented to the user in the body of the article that uses the entity. There could be multiple possible results or no result based on the user's responses. you define what happens in these cases in the Fallback Messages section of the entity.

No results

You can define a fallback message that is presented when the user's answers match the data in the entity source file, but there is no result in the entity that fits the customer's answers. Using the example in this article, if the customer is asking for an iPhone 7 with a 10 megapixel camera, the no result fallback message is presented as iPhone 7 and 10 megapixels are both part of the entity file, in model and camera pixels respectively, but there is no iPhone 7 with a 10 megapixel camera in the database. If however, the customer is asking for a Sony phone, which is not one of the brands in the file, the bot returns the error message defined in the widget configuration.

The fallback message for no result can be either a statement or an article. A statement is plain text that is displayed to the user.
Note: You can't select an article that contains an entity as a no result fallback message.

For custom entities, the message or article you define here is displayed when the customer provided wrong input more times than the property's error message is set to be displayed. For example, you have a property where detect is set to Email, the bot query is What's your email address? and the error message is Please provide an email address. which is set to be displayed 3 times. When the user fails to provide an email address for the fourth time, the fallback message or article is displayed.

Multiple results

When there is more than one result to present, you can set up the bot to generate a carousel of these results. In the Fallback Messages section of the entity page, set what cards in the carousel should look like: specify the property to be presented as title and subtitle, and if you have images in the data source, you can also provide an image property. Using the example in this article, you could have:

Tip: If you don't want to have a carousel of different results, you can use Quick Options instead. See What are the property options for data source entities? for more information.

API Invalid response (for API-based entities only)

Note: This option is displayed only when you provide a link to an API in the Data Source URL field. When your entity reads data through an API, the API may return an invalid response. For example, if your API receives invalid input from the customer or when the API server is unavailable. For these cases, you can define an error statement that is to be presented to the customer.