like and dislike button


(Reni Sweta) #1

Hi ,

Can you please guide me that somehow I can make a like and dislike button at the last of every conversation.

I want the Thumbs up and Thumbs Down button at the last of every conversation.

Please help in that.


(Subrahmanyam Donepudi) #2

@renisweta1094, Below is a thought I had on achieving your use case.

  1. Create a dialog (Say: “User Satisfaction” as a hidden dialog ) which has an entity node to collect user opinion.
  2. Configure the message at entity node to display a “quick replies template with images” which has like and dislike icons on it
  3. Transition the entity node to a script node and store the received input (Like / Dislike) into a BotContext type context variable. (You could even include the user info along with the select option if needed)
  4. Now link the dialog “User Satisfaction” at the end of each dialog in you bot as the last node.

Hope this helps :slight_smile:


(Subrahmanyam Donepudi) #3

The other way to handle this usecase is from the botkit.
It might be a tough job for the developer to link the dialog at end of conversation flow at the dialogs, considering the fact that there could be many end of dialog flows and even many dialogs in the bot.
Other problem area for the developer would be invoking the “User Satisfaction” dialog after an FAQ response.

These can be addressed if the botkit is enabled at the bot and is configured to have the onEvent received. At the bot kit, you could have the logic to trigger the dialog when the eventTypes “endFAQ” or “endDialog” are received at the bot kit.

Below is sample snippet at botkit for your reference.

on_event: function(requestId, data, callback)
{

    if (data.event && data.event.eventType === "endDialog")
   {
        storeData.metaInfo = {
        'intentInfo': {
          'intent': 'User Satisfaction',
			}
			};
    return sdk.sendBotMessage(storeData, callback);
   } 
    else {
   return callback(null, data);
	}
}