# Turn on Like and Dislike user reactions to the message

# About the feature

A chat user can Like or Dislike a message.

Users can provide optional additional feedback in the case of a Dislike. The Provide additional feedback dialog is standard, you can't edit it.

Chat users can add reactions to any message with turned-on reactions during the conversation. Reactions remain available for the whole duration of the conversation.

If a conversation history is on for a chat, recorded Likes and Dislikes are available to view. A chat user cannot react to messages in past conversations that have ended.

The feature is available for messages created with:

  • Send Message (RWC)
  • Request Response (RWC)

If later in the Flow you use the Change or Delete Message (RWC) Step to change the message with a reaction, the content of the said message changes, but the reaction remains. If you delete the message with a reaction using the same Step, the reaction gets deleted together with the message bubble.

# Overriding reaction for multiple executions of the Step

Sometimes Send Message (RWC) and Request Response (RWC) Steps are executed more than once in the Flow. For example, the Step message can be sent in the chat more than once due to iteration or redirection with the Go to Step or Anchor Step. The Allow to override reaction toggle serves to control if a user will be able to react to the message only once or every time they receive it in the chat. Check the instruction below.

# Handling the like and dislike legs of the Step

When the Allow message reaction (Like/Dislike) toggle is enabled in the Step, it creates the like and dislike legs for the Step.

The like and dislike legs must be handled. Otherwise, when a chat user leaves a reaction to the message in the chat, it won't be recorded in the logs and you won't be able to find out easily about the reaction. Though the Merge fields for the reaction will be available.

The like and dislike exits of the Step start the secondary Thread (opens new window). If the like or dislike Thread has any RWC Steps, this Tread must end with the Go to Step or Anchor Step or the Return to Main Thread (RWC) Step to return the execution of the conversation with a user to the main Tread. Otherwise, after the logic of the secondary Thread is executed, a chat user cannot continue the conversation in the main Thread.

If the like or dislike has non-RWC Steps, no need to add an extra Step to reroute a chat user back to the main Thread because no RWC message exchange takes place in the secondary Tread of like or dislike. For example, the like or dislike leg has a Step to record user reaction to a database.

# Instruction

To turn on user reactions to a message:

  1. In the Flow, click the Send Message (RWC) or Request Response (RWC) Step with a message you want to turn on user reactions for.
  2. In the Deails tab on the right, scroll down to the Advanced settings section and expand it.
  3. Turn on the Allow message reaction (Like/Dislike) toggle. It creates the like and dislike legs for the Step. The Allow to override reaction toggle becomes available.
  4. Handle the like and dislike legs. If you add any RWC Steps to the like or dislike leg, use the Go to a Step in Current Flow or the Return to Main Thread (RWC) Step at the end of this leg. If you add non-RWC Steps to the like and dislike leg, no need to add extra Steps to reroute a user to the main Thread.
  5. If Allow to override reaction is off, a chat user can react to the message only once. If Allow to override reaction is on, a chat user can react to the message every time they receive this message in the chat. Consider turning it on if the Step is executed in the Flow more than once. For example, due to iteration or redirection with the Go to Step or Anchor Step.
  6. Save & Activate the Flow.

# Result

In the chat, the Like or Dislike reaction is available for the message. The Provide additional feedback dialog pops up in the case of a Dislike where the user can write extra info and tick reasons for the Dilsike or cancel the reaction. Once a user submits Dislike or clicks Like, only the chosen reaction remains for the message. It notifies a user their reaction has been recorded.

# Recording and passing reactions

When the Allow message reaction (Like/Dislike) is on, the Step has the following Merge fields (opens new window) to record and pass the data about the user reaction:

  • ​stepName​.reactionType​ - Like or a Dislike of the chat user.
  • stepName​.reactionFeedback- a string containing a feedback message in the case of Dislike.
  • stepName​.reactionReasons- reason(s) for a Dilsike a chat user ticked. In the form of an array.
  • ​stepName​.reactionReasons[0]- the reason for a Dislike from the array.

# Output structure for reactions

{
  "reactionType": "dislike", // value can be - "like"
  "reactionFeedback": "Your message does not fit the context!", // can be - "undefined"
  "reactionReasons": [ // value can be - "undefined"
      "inaccurate",
      "harmful",
      "not_helpful" ],
}
Last Updated: 9/22/2023, 10:58:53 AM