-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add customer satisfactory (CSAT) card #4899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
compulim
wants to merge
34
commits into
main
Choose a base branch
from
feat-csat
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tdurnford
reviewed
Oct 16, 2023
tdurnford
reviewed
Oct 16, 2023
tdurnford
reviewed
Oct 16, 2023
packages/component/src/types/external/OrgSchema/PropertyValueSpecification.ts
Show resolved
Hide resolved
tdurnford
reviewed
Oct 16, 2023
tdurnford
reviewed
Oct 16, 2023
tdurnford
reviewed
Oct 16, 2023
tdurnford
reviewed
Oct 16, 2023
tdurnford
reviewed
Oct 16, 2023
packages/component/src/providers/RovingTabIndex/RovingTabIndexComposer.tsx
Outdated
Show resolved
Hide resolved
tdurnford
reviewed
Oct 16, 2023
packages/component/src/Styles/StyleSet/CustomerSatisfactoryAttachment.ts
Outdated
Show resolved
Hide resolved
tdurnford
reviewed
Oct 16, 2023
packages/component/src/Attachment/CustomerSatisfactory/private/useStrings.tsx
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog Entry
Added
Customer Satisfactory Card (CSAT card)
Description
Power Virtual Agents and many customers implemented customer satisfactory (CSAT) cards using Adaptive Cards. However, as Adaptive Cards is designed for general purpose. Thus, the accessibility experience is not great for CSAT cards.
We are adding new attachment renderer for CSAT cards by leveraging https://schema.org/ReviewAction.
Design
We are using https://schema.org/ReviewAction for the representation of the CSAT card. The following is excerpt of the activity containing the CSAT card.
{ "type": "message", "attachments": [ { "content": { "@context": "https://schema.org", "@type": "ReviewAction", "actionStatus": "PotentialActionStatus", "description": "Great! Please rate your experience.", "resultReview": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue-input": { "@type": "PropertyValueSpecification", "valueName": "rate" } } }, "target": { "@type": "EntryPoint", "actionPlatform": "https://directline.botframework.com", "urlTemplate": "ms-directline-postback:?value={rate}" } }, "contentType": "application/ld+json" } ] }Explanation of fields
content['@context']"https://schema.org".content['@type']"ReviewAction".content.actionStatus"CompletedActionStatus", the card is submitted. Otherwise, the card is ready to submit.content.descriptioncontent.resultReview['@type']"Review".content.resultReview.reviewRating['@type']"Rating".content.resultReview.reviewRating.ratingValue1to5orundefined, default toundefined.content.resultReview.reviewRating['ratingValue-input']ratingValueshould be used as "input" parameters (a.k.a. request body). See https://schema.org/docs/actions.html for details.content.resultReview.reviewRating['ratingValue-input']['@type']"PropertyValueSpecification".content.resultReview.reviewRating['ratingValue-input'].valueNamecontent.target"EntryPoint".content.target['@type']"EntryPoint".content.target.actionPlatform"https://directline.botframework.com".content.target.urlTemplatecontentType"application/ld+json".Current designs and limitations:
resultReviewmust be thing of"Review"."UserReview"and other subclass of"Review"is not supportedresultReview.reviewRating.bestRatingandresultReview.reviewRating.worstRatingare ignoredactionStatusisCompletedActionStatus, it indicates the review is submitted, thus,targetis optional. Otherwise, review should be submittable andtargetmust be specifiedtargetcould be a non-templated URL, it is highly recommendedtargetis a thing ofEntryPointTarget URL
When the user change the rating, it will change the
resultReview.reviewRating.ratingValue. In Schema.org actions, theratingValue-inputwill be used to describe how theratingValueis used in the request body of the action.In the example payload,
ratingValue-input.valueNameisrate. When filling thetarget.urlTemplate, it will replace the variableratewith the user rating.If the user rated 4, the URL template will be expanded as by replacing variable
ratewith4:Thus, the postback activity payload will become:
{ "channelData": { "postBack": true }, "text": "4", "type": "message" }Followings are supported protocol and their query parameters:
ms-directline-postback:valuevaluetypeisapplication/json, will send as JSON viaactivity.value, otherwise, will send as string viaactivity.text.ms-directline-postback:valuetypevalueis a complex object, specify "application/json". This is not recommended because non-compliance with Direct Line protocol.ms-directline-imback:titleactivity.text.ms-directline-imback:valuetitleparameter is not specified, will send this value asactivity.text.ms-directline-messageback:valueactivity.value.ms-directline-messageback:textactivity.text.ms-directline-messageback:displaytextSpecific Changes
useOpenURLfor internal use onms-directline-*:protocolRovingTabIndexProviderOrgSchemaThingshould not typed outtype:typeis strictly forentitiesonlydocs/CUSTOMER_SATISFACTORY_CARD.mdCHANGELOG.mdReview Checklist
Browser and platform compatibilities reviewedz-index)Documents reviewed (docs, samples, live demo)package.jsonandpackage-lock.jsonreviewedSecurity reviewed (no data URIs, check for nonce leak)