The latest Oracle Digital Assistant release (from November) gave us a new system component that allows to capture user rating and feedback.
The below code is the default (sample from documentation)
getUserFeedback:
component: "System.Feedback"
properties:
threshold: 2
maxRating: 5
enableTextFeedback: true
transitions:
actions:
above: "positiveFeedback"
below: "negativeFeedback"
cancel: "cancelFeedback"
positiveFeedback:
component: "System.Output"
properties:
text: "Thank you for your rating of ${system.userFeedbackRating.value}."
transitions:
return: "done"
negativeFeedback:
component: "System.Output"
properties:
text: "You entered ${system.userFeedbackText.value}. We appreciate your feedback."
transitions:
return: "done"
cancelFeedback:
component: "System.Output"
properties:
text: "Feedback canceled."
transitions:
return: "done"
I added the above to an existing Skill and it works straight away.
The threshold property defines the border between positive and negative feedback, while the max rating sets….well…the maximum rating 🙂
We do need to define the transitions for above below and cancel.
The above picture shows a List of Values – That is the default for versions of the WebSDK previous to 21.10.
Starting with 21.10, the default is a star system.
When we give a rating above threshold, we get a message back “Thanks for…”
When the rating is below thresold, we can ask for a more detailed feedback.
Insigths
Having this functionality means we need to have Insights into the responses.
We can look into user Ratings.
And User Feedback as well.
All of the above is the default behavior of this component. Obviously we can change the output messages and customize accordingly based on the specific use case requirements. Either way, this is fairly simple to add to our Skills.