|
| 1 | +--- |
| 2 | +title: Azure Communication Services End of Call Survey |
| 3 | +titleSuffix: An Azure Communication Services tutorial document |
| 4 | +description: Learn how to use the End of Call Survey to collect user feedback. |
| 5 | +author: amagginetti |
| 6 | +ms.author: amagginetti |
| 7 | +manager: mvivion |
| 8 | + |
| 9 | +services: azure-communication-services |
| 10 | +ms.date: 4/03/2023 |
| 11 | +ms.topic: tutorial |
| 12 | +ms.service: azure-communication-services |
| 13 | +ms.subservice: calling |
| 14 | +--- |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +# Tutorial: Use End of Call Survey to collect user feedback |
| 19 | + |
| 20 | + |
| 21 | +[!INCLUDE [Public Preview](../includes/public-preview-include-document.md)] |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +> [!NOTE] |
| 26 | +> End of Call Survey is currently supported only for our JavaScript / Web SDK. |
| 27 | +
|
| 28 | +This tutorial shows you how to use the Azure Communication Services End of Call Survey for JavaScript / Web SDK. |
| 29 | + |
| 30 | + |
| 31 | +## Prerequisites |
| 32 | + |
| 33 | +- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). |
| 34 | + |
| 35 | +- [Node.js](https://nodejs.org/) active Long Term Support(LTS) versions are recommended. |
| 36 | + |
| 37 | +- An active Communication Services resource. [Create a Communication Services resource](../quickstarts/create-communication-resource.md). Survey results are tied to single Communication Services resources. |
| 38 | +- An active Log Analytics Workspace, also known as Azure Monitor Logs, to ensure you don't lose your survey results. [Enable logging in Diagnostic Settings](../concepts/analytics/enable-logging.md). |
| 39 | + |
| 40 | + |
| 41 | +> [!IMPORTANT] |
| 42 | +> End of Call Survey is available starting on the version [1.13.0-beta.4](https://www.npmjs.com/package/@azure/communication-calling/v/1.13.0-beta.4) of the Calling SDK. Make sure to use that version or later when trying the instructions. |
| 43 | +
|
| 44 | +## Sample of API usage |
| 45 | + |
| 46 | + |
| 47 | +The End of Call Survey feature should be used after the call ends. Users can rate any kind of VoIP call, 1:1, group, meeting, outgoing and incoming. Once a user's call ends, your application can show a UI to the end user allowing them to choose a rating score, and if needed, pick issues they’ve encountered during the call from our predefined list. |
| 48 | + |
| 49 | +The following code snips show an example of one-to-one call. After the end of the call, your application can show a survey UI and once the user chooses a rating, your application should call the feature API to submit the survey with the user choices. |
| 50 | + |
| 51 | +We encourage you to use the default rating scale. However, you can submit a survey with custom rating scale. You can check out the [sample application](https://github.com/Azure-Samples/communication-services-web-calling-tutorial/blob/main/Project/src/MakeCall/CallSurvey.js) for the sample API usage. |
| 52 | + |
| 53 | + |
| 54 | +### Rate call only - no custom scale |
| 55 | + |
| 56 | +```javascript |
| 57 | +call.feature(Features.CallSurvey).submitSurvey({ |
| 58 | + overallRating: { score: 5 }, // issues are optional |
| 59 | +}).then(() => console.log('survey submitted successfully')); |
| 60 | +``` |
| 61 | + |
| 62 | +OverallRating is a required category for all surveys. |
| 63 | + |
| 64 | + |
| 65 | +### Rate call only - with custom scale and issues |
| 66 | + |
| 67 | +```javascript |
| 68 | +call.feature(Features.CallSurvey).submitSurvey({ |
| 69 | + overallRating: { |
| 70 | + score: 1, // my score |
| 71 | + scale: { // my custom scale |
| 72 | + lowerBound: 0, |
| 73 | + upperBound: 1, |
| 74 | + lowScoreThreshold: 0 |
| 75 | + }, |
| 76 | + issues: ['HadToRejoin'] // my issues, check the table below for all available issues |
| 77 | + } |
| 78 | +}).then(() => console.log('survey submitted successfully')); |
| 79 | +``` |
| 80 | + |
| 81 | +### Rate overall, audio, and video with a sample issue |
| 82 | + |
| 83 | +``` javascript |
| 84 | +call.feature(Features.CallSurvey).submitSurvey({ |
| 85 | + overallRating: { score: 3 }, |
| 86 | + audioRating: { score: 4 }, |
| 87 | + videoRating: { score: 3, issues: ['Freezes'] } |
| 88 | +}).then(() => console.log('survey submitted successfully')) |
| 89 | +``` |
| 90 | + |
| 91 | +### Handle errors the SDK can send |
| 92 | + ``` javascript |
| 93 | +call.feature(Features.CallSurvey).submitSurvey({ |
| 94 | + overallRating: { score: 3 } |
| 95 | +}).catch((e) => console.log('error when submitting survey: ' + e)) |
| 96 | +``` |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +<!-- ## Find different types of errors |
| 101 | +
|
| 102 | +### Failures while submitting survey: |
| 103 | +
|
| 104 | +API will return the error messages when data validation failed or unable to submit the survey. |
| 105 | +- At least one survey rating is required. |
| 106 | +- In default scale X should be 1 to 5. - where X is either of |
| 107 | +- overallRating.score |
| 108 | +- audioRating.score |
| 109 | +- videoRating.score |
| 110 | +- ScreenshareRating.score |
| 111 | +- ${propertyName}: ${rating.score} should be between ${rating.scale?.lowerBound} and ${rating.scale?.upperBound}. ; |
| 112 | +- ${propertyName}: ${rating.scale?.lowScoreThreshold} should be between ${rating.scale?.lowerBound} and ${rating.scale?.upperBound}. ; |
| 113 | +- ${propertyName} lowerBound: ${rating.scale?.lowerBound} and upperBound: ${rating.scale?.upperBound} should be between 0 and 100. ; |
| 114 | +- event discarded [ACS failed to submit survey, due to network or other error] --> |
| 115 | + |
| 116 | +## All possible values |
| 117 | + |
| 118 | +### Default survey API configuration |
| 119 | + |
| 120 | +| API Rating Categories | Cutoff Value* | Input Range | Comments | |
| 121 | +| ----------- | ----------- | -------- | -------- | |
| 122 | +| Overall Call | 2 | 1 - 5 | Surveys a calling participant’s overall quality experience on a scale of 1-5. A response of 1 indicates an imperfect call experience and 5 indicates a perfect call. The cutoff value of 2 means that a customer response of 1 or 2 indicates a less than perfect call experience. | |
| 123 | +| Audio | 2 | 1 - 5 | A response of 1 indicates an imperfect audio experience and 5 indicates no audio issues were experienced. | |
| 124 | +| Video | 2 | 1 - 5 | A response of 1 indicates an imperfect video experience and 5 indicates no video issues were experienced. | |
| 125 | +| Screenshare | 2 | 1 - 5 | A response of 1 indicates an imperfect screen share experience and 5 indicates no screen share issues were experienced. | |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | +> [!NOTE] |
| 130 | +>A question’s indicated cutoff value in the API is the threshold that Microsoft uses when analyzing your survey data. When you customize the cutoff value or Input Range, Microsoft analyzes your survey data according to your customization. |
| 131 | +
|
| 132 | + |
| 133 | +### More survey tags |
| 134 | +| Rating Categories | Optional Tags | |
| 135 | +| ----------- | ----------- | |
| 136 | +| Overall Call | `CallCannotJoin` `CallCannotInvite` `HadToRejoin` `CallEndedUnexpectedly` `OtherIssues` | |
| 137 | +| Audio | `NoLocalAudio` `NoRemoteAudio` `Echo` `AudioNoise` `LowVolume` `AudioStoppedUnexpectedly` `DistortedSpeech` `AudioInterruption` `OtherIssues` | |
| 138 | +| Video | `NoVideoReceived` `NoVideoSent` `LowQuality` `Freezes` `StoppedUnexpectedly` `DarkVideoReceived` `AudioVideoOutOfSync` `OtherIssues` | |
| 139 | +| Screenshare | `NoContentLocal` `NoContentRemote` `CannotPresent` `LowQuality` `Freezes` `StoppedUnexpectedly` `LargeDelay` `OtherIssues` | |
| 140 | + |
| 141 | + |
| 142 | +### Customization options |
| 143 | + |
| 144 | +You can choose to collect each of the four API values or only the ones |
| 145 | +you find most important. For example, you can choose to only ask |
| 146 | +customers about their overall call experience instead of asking them |
| 147 | +about their audio, video, and screen share experience. You can also |
| 148 | +customize input ranges to suit your needs. The default input range is 1 |
| 149 | +to 5 for Overall Call, Audio, Video, and |
| 150 | +Screenshare. However, each API value can be customized from a minimum of |
| 151 | +0 to maximum of 100. |
| 152 | + |
| 153 | +### Customization examples |
| 154 | + |
| 155 | + |
| 156 | +| API Rating Categories | Cutoff Value* | Input Range | |
| 157 | +| ----------- | ----------- | -------- | |
| 158 | +| Overall Call | 0 - 100 | 0 - 100 | |
| 159 | +| Audio | 0 - 100 | 0 - 100 | |
| 160 | +| Video | 0 - 100 | 0 - 100 | |
| 161 | +| Screenshare | 0 - 100 | 0 - 100 | |
| 162 | + |
| 163 | + > [!NOTE] |
| 164 | + > A question’s indicated cutoff value in the API is the threshold that Microsoft uses when analyzing your survey data. When you customize the cutoff value or Input Range, Microsoft analyzes your survey data according to your customization. |
| 165 | +
|
| 166 | +<!-- |
| 167 | +## Collect survey data |
| 168 | +
|
| 169 | +> [!IMPORTANT] |
| 170 | +> You must enable a Diagnostic Setting in Azure Monitor to send the log data of your surveys to a Log Analytics workspace, Event Hubs, or an Azure storage account to receive and analyze your survey data. If you do not send survey data to one of these options your survey data will not be stored and will be lost. To enable these logs for your Communications Services, see: [Enable logging in Diagnostic Settings](../concepts/analytics/enable-logging.md) |
| 171 | + |
| 172 | +
|
| 173 | +### View survey data with a Log Analytics workspace |
| 174 | +
|
| 175 | +You need to enable a Log Analytics Workspace to both store the log data of your surveys and access survey results. To enable these logs for your Communications Services, see: [Enable logging in Diagnostic Settings](../concepts/analytics/enable-logging.md). Follow the steps to add a diagnostic setting. Select the “ACSCallSurvey” data source when choosing category details. Also, choose “Send to Log Analytics workspace” as your destination detail. |
| 176 | +
|
| 177 | +- You can also integrate your Log Analytics workspace with Power BI, see: [Integrate Log Analytics with Power BI](../../../articles/azure-monitor/logs/log-powerbi.md) |
| 178 | + --> |
| 179 | + |
| 180 | +## Best practices |
| 181 | +Here are our recommended survey flows and suggested question prompts for consideration. Your development can use our recommendation or use customized question prompts and flows for your visual interface. |
| 182 | + |
| 183 | +**Question 1:** How did the users perceive their overall call quality experience? |
| 184 | +We recommend you start the survey by only asking about the participants’ overall quality. If you separate the first and second questions, it helps to only collect responses to Audio, Video, and Screen Share issues if a survey participant indicates they experienced call quality issues. |
| 185 | + |
| 186 | + |
| 187 | +- Suggested prompt: “How was the call quality?” |
| 188 | +- API Question Values: Overall Call |
| 189 | + |
| 190 | +**Question 2:** Did the user perceive any Audio, Video, or Screen Sharing issues in the call? |
| 191 | +If a survey participant responded to Question 1 with a score at or below the cutoff value for the overall call, then present the second question. |
| 192 | + |
| 193 | +- Suggested prompt: “What could have been better?” |
| 194 | +- API Question Values: Audio, Video, and Screenshare |
| 195 | + |
| 196 | +Surveying Guidelines |
| 197 | +- Avoid survey burnout, don’t survey all call participants. |
| 198 | +- The order of your questions matters. We recommend you randomize the sequence of optional tags in Question 2 in case respondents focus most of their feedback on the first prompt they visually see. |
| 199 | +- Consider using surveys for separate Azure Communication Services Resources in controlled experiments to identify release impacts. |
| 200 | + |
| 201 | + |
| 202 | +## Next steps |
| 203 | + |
| 204 | +- Learn how to use the Log Analytics workspace, see: [Log Analytics Tutorial](../../../articles/azure-monitor/logs/log-analytics-tutorial.md) |
| 205 | + |
| 206 | +- Create your own queries in Log Analytics, see: [Get Started Queries](../../../articles/azure-monitor/logs/get-started-queries.md) |
| 207 | + |
0 commit comments