6. Test your bot
The best way to check if the bot you're building is doing what you expect is to contantly test every new development. Here's more information about it.
The fastest way to test your bot is the 'Test your bot' widget in the bottom right corner.
When you click it, a pane will open on the right side of the screen and you can choose how to test your bot. So far there are three options:
- 2.Voice: allows you to listen and speak to your bot, if it was designed for a voice channel.
- 3.WhatsApp Sandbox: enables you to test your bot on a real WhatsApp channel.
You can test your voice bots by selecting the Voice option in the 'Test your bot' section. You can interact with your bot by clicking the red button with a microphone icon in it. Once you click it, you will hear the first bot message and be able to reply to it by talking.
When you select the WhatsApp Sandbox option, you will see a QR code. By scanning it with your phone or clicking the 'click here' link under it, you will be redirected to WhatsApp.
WhatsApp will open a new conversation with the Sandbox and a message will be pre-filled. This message will contain the ID of the bot you want to contact. As soon as you send the pre-filled message, your WhatsApp number will be connected to that bot for the next 72h, or until you send 'STOP'.
Redirecting page after clicking the 'click here' link
Pre-filled message on WhatsApp message composer when clicking 'Continue to chat' or when scanning the QR code
After connecting to your bot through the Sandbox, send a message to trigger it:
To disconnect from one bot and test another, send "STOP". You will receive a message confirming that your number was disconnected from that bot. You can connect to a different bot by sending another bot ID, for example "join xyz1234".