NPS - Satisfaction Survey August 30, 2023 19:56 Updated Index: Creation of the evaluation after The end of the service The event log NPS - Category Creation of the evaluation after the end of the service. Clicking Create Bot on the platform, we have the "Human Service" Bot. It can be used as a template to create your satisfaction survey or you can add a block before you end your service in the flow to configure the survey. The Block can be called "Service Note" where the user can leave their evaluation note about the service. After the human service, in the "Service note" block, we present the user with the message in the text content tab requesting a note: User input: When writing the note, we save it in the score variable as shown in the image above. In the block's output actions, we can use a Script to keep track of a range of notes received and an event log to record this information. In the output actions we have the Run NormalizeScore script to condition the reception of a value within the range (0 to 10) or within another desired range and then store it again in the score variable: // Receive the variables as parameters function run(score) { if(isNumeric(score)){ score = parseInt(score); if(score < 0) return 0; if(score > 10) return 10; return-score; } return "Outro"; } //check if a string has a number function isNumeric(num){ return !isNaN(num) } The event log: TrackScoreValue – Receives the “score” value and logs the event for later display on the custom report chart. In case of doubt about how to use the registry, we have the following documentation for your reference: Click on the link: Event Registration After creating the record, to generate the report you need to access the analysis tab of your bot or bot router in structures with router and subbots. Note: If your bot router context is enabled, the report will be generated on it by going to the "Analytics" 3 "Custom Report" tab. In case of doubt about how to use the registry, we have the following documentation for your reference: Click on the link: Custom Report In the charts under Custom Events, the Score category will appear: Note: The category to generate the graph will be available only after the records are initialized in the bot conversation. The Event is not raised during testing using the "Tester" user in the flow. You must use a "real" user accessing one of the channels connected to your bot. If you want to add more data to your report, we have the following documentation with more examples: Click on the link: How to save human services data NPS - Category Using the structure explained above, it is also possible to create an NPS report by category, to identify if the client is a detractor, neutral or promoter, the classification being based on the following metrics: Detractor -> Rating greater than or equal to 0 and less than or equal to 6. Neutral -> Grade greater than or equal to 7 and less than or equal to 8. Promoter -> Score greater than or equal to 9 and less than or equal to 10. To generate a report containing this ranking model is simple, below the NormalizeScore action, create a new script called Nps Category, as input variable pass the value of the score and save the return of the script in a variable called npsCategory. As shown in the picture below: function run(score) { if(score != "Outro") { let intScore = parseInt(score); if(intScore >= 9 && intScore <= 10) { return "promotor"; } else if(intScore >= 7 && intScore <=8) { return "neutro"; } else { return "detrator"; } } return "outro";} Now simply create an event log action to capture the value of npsCategory, for that create the log called TrackScoreCategory, passing the category NPS_Category and the variable {{npsCategory}} as a parameter, like the image below. The order of the configured actions must follow the following order. The order of the configured actions must follow the following order. Imagem! After that, just create the custom report and a view similar to this will be generated: For more information, access the discussion on the topic in our community or the videos on our channel. 😃 Related articles Satisfaction Analysis Action: Event log Attendant satisfaction survey report (Google Sheets) Sending WhatsApp Active Messages on Blip Desk How to create a bot router with 3 subbots