How to submit user feedback
To submit feedback, callsubmitFeedback(_:for:onCompletion:) after a provider reviews a generated note. The API captures how well the note matched the encounter, helping Suki improve future note quality.
You can use it with a rating control, such as stars or thumbs up/down, and an optional comment field. A single submission can include both quantitative feedback (a rating) and qualitative feedback (comments).
Function signature
The method takes aFeedbackSubmission, the sessionId for the session you are rating, and a completion handler. On success, the handler returns a unique feedbackId; on failure, it returns an error.
Required data structures
To submit feedback, construct aFeedbackSubmission. It combines a FeedbackEntity (what the feedback is about), a QuantitativeFeedback (the rating and its scale), and an optional comments string for free-text feedback.
Implementation example
To submit feedback, you first create theFeedbackSubmission object and then pass it to the submitFeedback method along with the sessionId.
The method is asynchronous. The completion handler returns a Result containing either a success message with the unique feedbackId or an error if the submission failed.
Rating system
-
The
maxRatingmust be greater than theminRating. -
The rating must be within the inclusive range of
minRatingandmaxRating. -
The
commentsstring is optional and has a maximum length of 2000 characters.
-
Configure any integer rating scale. For example, create a 1 to 5 scale by setting
minRatingto 1 andmaxRatingto 5, or a binary scale by setting the values to 0 and 1. - Suki recommends using a scale of 1 to 5 for ratings.