How to use "custom_data" to add more questions to the feedback flow?
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Table of Contents
It might happen that your business would require some additional information from users, as part of Feedback collection. This additional information can be collected from the users, in the form of questions asked at the time of feedback collection, with the help of custom_data.
Before we move to custom_data, let us understand how the feedback data is stored on our bot -
A Code Step has a variable called conversation_details, which works like a data dump, where you can store data as and when required and this data is accessible by all the Code Steps, throughout the bot. You can also store feedback-related data in this conversation_details variable.
This feedback data is stored at every checkpoint in the conversation_details variable. It does not wait for the user to reach till the end of the feedback flow, because if the user drops in between then the feedback collection rate will be affected.
You can consider conversation_details as a stack, where we can store data and use it whenever required.
Once the conversation is complete, the system checks the conversation_details to see if there is any feedback data present. If there is any data, it is dumped in the Analytics, which you can check in the Intelligent Analytics tool.
The Feedback flow contains some generic questions, like Was I able to help you? to which the user can reply with Yes or No, followed by more questions from the bot to understand the user's experience. You can learn more about it, here.
custom_data can be added to a Code Step, and you can add questions in it, that you want the user to answer in the feedback flow, or at the end of the feedback flow.
Adding the custom_data
Add a new Code Step in the bot.
You can add this Code Step at the end, or in between the Feedback Smart Skill flow, depending on your requirements.
In the code editor of the Code Step, you need to navigate to the conversation_details.
conversation_details will have the feedback data in it. In the feedback data, you can add custom_data, as shown in the code snippet below.
{
"user_feedback": {
"CSAT": {
"query_resolved": true
"query_rating": 4
"comment": "some comment given by the user"
"custom_data": {
"custom_question_1": "<answer>"
"custom_question_2": "<answer>"
}
},
"NPS": {
"query_resolved": true
"query_rating": 4
"comment": "some comment given by the user"
"custom_data": {
"custom_question_1": "<answer>"
"custom_question_2": "<answer>"
}
},
}
},
- The custom_data can be added as a dictionary, wherein you can add questions in the form of Key and value format so that it follows the pattern.