The Preview tool is a web client that's designed to provide a full preview of the conversational experience as you design, develop and test the bot.
Note the following about Preview:
- The conversation doesn't go through Conversational Cloud, so there's no need to deploy an agent connector to use Preview. To test functionality that requires Conversational Cloud features (such as transfers), deploy the bot and then test in the Conversation Tester and/or in a web client. You can practice deployment and testing in a web client using the Deploy the Bot tutorial.
- Within Preview, all structured content is displayed. Keep in mind that not all channels support all structured content objects. Make sure to test and verify the bot on the device or in the appropriate application. See also this info on interaction support.
- The Preview window toggles its display to show the Bot Logs window.
- In the Dialog Editor, click Preview in the upper-right corner.
Reset the session
If you've already opened the Preview window and subsquently made changes to the bot while the Preview window is open (i.e., while the current session is active), you'll need to reset the session so that Preview can reflect those changes.
To reset the session
- Click Reset in the Preview window. Alternatively, enter "reset" and press Enter.
If you've disabled the Enable Debug bot setting, the Reset button is disabled.
Preview a Voice bot
Like with Messaging bots, you can use the Preview tool to get a full view of the conversational experience as you design and develop the bot. Use Preview to test the flow, the validation of consumer responses, the bot responses, etc., without deploying the bot or setting up a phone number. Note the following:
- If the bot supports touch-tone input, you can’t use Preview to test the touch-tone configuration and handling. However, you can enter numbers to invoke bot responses. To test the touch-tone configuration, perform end-to-end testing in the Voice channel itself.
Transfer Call interactions and Send SMS interactions: You can test the success and failure flows using the available buttons.
- Speech interactions: These aren’t spoken. They’re displayed as text-based messages.
- Audio interactions: Here again, these aren’t spoken. In this case, you can click the link to open the audio file in a separate browser tab, for testing purposes.
For Audio interactions, you can test how the conversation flows when the audio is played successfully and when it isn’t. Use the available buttons to test each flow:
The audio might fail to be played if the hosting website is down, there’s a network issue, the file is not present, etc.
You can do likewise with Speech statements (testing the flow when the TTS is played successfully and when it isn’t), although note that both of these flows follow a success path. This is because there is no recourse when the TTS fails, so the success path is followed.
Previewing how silence is handled (Speech question)
Use the Preview panel to test the Speech question’s handling of silence. Preview respects the settings that you’ve configured in the interaction for handling silence.
However, to simulate a conversational experience where the message is actually being played for the consumer, the system waits 2 seconds before starting the timer that counts the elapsed time before playing a follow-up prompt.
Previewing how silence is handled (Audio question)
Use the Preview panel to test the Audio question’s handling of silence. Preview respects the settings that you’ve configured in the interaction for handling silence.
In this example below, we've set Elapsed time before prompt to 5000 milliseconds in the interaction.
In an Audio question, the timer (that measures the amount of time elapsed before a follow-up prompt is played) will only begin counting once you click the If audio is played button. The same holds true once you click If audio fails.