Skip to content

Commit 70368a7

Browse files
committed
update
1 parent 4276e0f commit 70368a7

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

articles/communication-services/tutorials/end-of-call-survey-tutorial.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,17 @@ This tutorial shows you how to use the Azure Communication Services End of Call
4343
4444
## Sample of API usage
4545

46+
Call Survey feature should be used after the call ends. Users can rate any kind of call, 1:1, group, meeting, outgoing and incoming. Once the call ends the application can present a UI to a user, where they can choose a rating score and if needed, pick issues they’ve encountered during the call from pre-defined list.
47+
48+
The code snip below shows an example of one-to-one call. After the end of the call, application can show a survey UI and once user choose rating, application should call feature API to submit survey with the input based on the user choices. Show the survey option.
49+
We encourage you to use the default rating scale. However, you have the option to submit a survey with custom rating scale. You can check out the sample application for the sample API usage.
50+
51+
52+
4653
We encourage you to use the default rating scale. However, you have the option to 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 complete API usage. You will need the call object to submit the call survey. You will have the call object when you start or receive a call. The code snip below shows an example of one-to-one call. After the end of the call, show the survey option.
4754

4855

49-
```typescript
50-
const call: Call = callAgent.startCall(['{target participant / callee MRI / number}']);
51-
call.on('stateChanged', callStateChangedHandler);
52-
const callStateChangedHandler = () => {
53-
if (call.state === 'Disconnected') {
54-
console.log('call end reason', call.callEndReason);
55-
// TODO: Show the UI to collect the survey data
56-
}
57-
};
58-
```
56+
5957

6058
When the participant submits the survey, then call the submit survey API with survey data.
6159

@@ -64,12 +62,10 @@ When the participant submits the survey, then call the submit survey API with su
6462
```javascript
6563
call.feature(Features.CallSurvey).submitSurvey({
6664
overallRating: { score: 5 }, // issues are optional
67-
videoRating: { score: 4, issues: ['LowQuality'] },
68-
screenshareRating: { score: 4, issues: ['LargeDelay'] }
6965
}).then(() => console.log('survey submitted successfully'));
7066
```
7167

72-
At least one of the four categories (overallRating, audioRating, videoRating or screenshareRating) is required.
68+
OverallRating is a required category for all surveys.
7369

7470

7571
### Rate call only - with custom scale and issues
@@ -88,7 +84,8 @@ call.feature(Features.CallSurvey).submitSurvey({
8884
}).then(() => console.log('survey submitted successfully'));
8985
```
9086

91-
### Rate audio / video call with sample issue
87+
### Rate overall, audio / video call with sample issue
88+
9289
``` javascript
9390
call.feature(Features.CallSurvey).submitSurvey({
9491
overallRating: { score: 3 },
@@ -106,7 +103,7 @@ call.feature(Features.CallSurvey).submitSurvey({
106103

107104

108105

109-
## Find different types of errors
106+
<!-- ## Find different types of errors
110107
111108
### Failures while submitting survey:
112109
@@ -120,7 +117,7 @@ API will return the error messages when data validation failed or unable to subm
120117
- ${propertyName}: ${rating.score} should be between ${rating.scale?.lowerBound} and ${rating.scale?.upperBound}. ;
121118
- ${propertyName}: ${rating.scale?.lowScoreThreshold} should be between ${rating.scale?.lowerBound} and ${rating.scale?.upperBound}. ;
122119
- ${propertyName} lowerBound: ${rating.scale?.lowerBound} and upperBound: ${rating.scale?.upperBound} should be between 0 and 100. ;
123-
- event discarded [ACS failed to submit survey, due to network or other error]
120+
- event discarded [ACS failed to submit survey, due to network or other error] -->
124121

125122
## All possible values
126123

0 commit comments

Comments
 (0)