How to Introduce Custom Delay Between Two Messages in Azure Bot Composer by info.odysseyx@gmail.com October 21, 2024 written by info.odysseyx@gmail.com October 21, 2024 0 comment 12 views 12 Improve user experience with timely responses Building conversational bots using Azure Bot Composer offers countless possibilities for creating seamless and engaging user experiences. One feature that can greatly improve user interaction is introducing a custom delay between two messages. This small but impactful addition mimics human-like pauses to make conversations feel more natural and thoughtful. This blog walks you through the steps to introduce a custom inter-message delay in Azure Bot Composer. Introducing a delay between messages can serve several purposes. Natural Flow: Emulates human conversation, making interactions feel less robotic. Attention Management: Give users time to read and process information before moving on to the next message. Contextual relevance: This helps keep you in context, especially in scenarios where the bot provides detailed explanations or instructions. Expected latency: Azure Bot Builder often makes outbound calls and gets a response back, and for example, if you want to get a token, it may take some time to get the desired response. In return, we would like to introduce an intentional delay in such scenarios. Before introducing custom delays, ensure that Azure Bot Composer is installed and set up. You can download it from the official GitHub repository and follow the provided installation instructions. Composer Installation Step 1: Open your bot project Start Azure Bot Composer and open an existing bot project or create a new project. Go to the dialog where you want to introduce a delay. Step 2: Add a new task Within the dialog box, click the ‘+ Add’ button to insert a new task. Select ‘Send Response’ from the list of available actions. This message is intended to introduce delay. [Activity Type = delay Value = "5000" ] You will need to add this code as JSON by clicking View Source Code and then adding it above. It should look like this: Enter the message text you want to send after the delay. This can be text such as follow-up questions or additional information. By default, input activity lasts for a short period of time. To customize the delay, you can adjust the input activity duration. Click the input activity and set the desired duration (in milliseconds) in the Properties window. For example, a setting of 3000 milliseconds results in a 3 second delay. Keep this value under 15 seconds. Step 3: Test your bot After configuring the delay and follow-up messages, it’s time to test your bot. To launch the Bot Framework Emulator, click the ‘Test on Emulator’ button. Interact with the bot to verify that delays are working as expected and messages are being sent in the correct order. Introducing custom delays between messages in Azure Bot Composer is a simple yet powerful way to improve the user experience. By following the steps outlined in this guide, you can create more natural, engaging conversations that keep your users interested and informed. Source link Share 0 FacebookTwitterPinterestEmail info.odysseyx@gmail.com previous post Migrating from Amazon QLDB to ledger tables in Azure SQL Database: A Comprehensive Guide next post More new languages supported in Microsoft 365 Copilot You may also like A good Los Angeles rebuild with fire-resistant houses January 20, 2025 2024 PC shipments increase with strong refresh cycle, Win10 ends January 15, 2025 Biden Battered Over AI Diffusion Policy January 14, 2025 The best thing about CES 2025 January 13, 2025 Meta Scrap fact-checker, eases content restrictions January 8, 2025 2025 Cyber Security Predictions Influenced by AI January 7, 2025 Leave a Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.