Skip to content

Commit e41042c

Browse files
chore: end of call report
1 parent 5636e2d commit e41042c

File tree

1 file changed

+46
-18
lines changed

1 file changed

+46
-18
lines changed

fern/security-and-privacy/recording-consent-plan.mdx

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -106,45 +106,73 @@ Add the recording consent plan to your assistant's `compliancePlan`:
106106
}
107107
```
108108

109-
## Call Response Structure
109+
## End-of-Call Report Structure
110110

111-
When you add a recording consent plan to your assistant, the call response will include a `compliance` field with recording consent information. Here's what the response looks like:
111+
When you add a recording consent plan to your assistant, the compliance data will be included in the end-of-call-report webhook. Here's what the compliance section looks like in the webhook payload:
112112

113-
### Successful Consent Response
113+
### Successful Consent Webhook
114114

115115
```json
116116
{
117-
// ... Other call fields
118-
"compliance": {
119-
"recordingConsent": {
120-
"type": "verbal",
121-
"grantedAt": "2024-01-15T10:30:00Z"
122-
}
117+
"message": {
118+
"type": "end-of-call-report",
119+
"analysis": {
120+
/* call analysis data */
121+
},
122+
"artifact": {
123+
/* call artifacts */
124+
},
125+
"startedAt": "2024-01-15T10:25:00Z",
126+
"endedAt": "2024-01-15T10:35:00Z",
127+
"endedReason": "assistantEndedCall",
128+
"cost": 0.15,
129+
"compliance": {
130+
"recordingConsent": {
131+
"type": "verbal",
132+
"grantedAt": "2024-01-15T10:30:00Z"
133+
}
134+
},
135+
"transcript": "/* call transcript */",
136+
"recordingUrl": "https://...",
137+
"stereoRecordingUrl": "https://..."
123138
}
124139
}
125140
```
126141

127-
### No Consent Response
142+
### No Consent Webhook
128143

129144
```json
130145
{
131-
"// ... Other call fields
132-
"compliance": {
133-
"recordingConsent": {
134-
"type": "verbal"
135-
}
146+
"message": {
147+
"type": "end-of-call-report",
148+
"analysis": {
149+
/* call analysis data */
150+
},
151+
"artifact": {
152+
/* call artifacts */
153+
},
154+
"startedAt": "2024-01-15T10:25:00Z",
155+
"endedAt": "2024-01-15T10:30:00Z",
156+
"endedReason": "assistantEndedCall",
157+
"cost": 0.1,
158+
"compliance": {
159+
"recordingConsent": {
160+
"type": "verbal"
161+
}
162+
},
163+
"transcript": "/* call transcript */"
136164
}
137165
}
138166
```
139167

140-
**Key points about the response structure:**
168+
**Key points about the webhook structure:**
141169

142-
- **`recordingConsent` field**: Always present when a consent plan is configured
170+
- **`recordingConsent` field**: Always present in the `compliance` object when a consent plan is configured
143171
- **`type`**: Shows which consent type was used (`"verbal"` or `"stay-on-line"`)
144172
- **`grantedAt`**: Only set when the user explicitly grants permission
145173
- **Missing `grantedAt`**: Indicates the user declined consent or hung up before granting permission
146174

147-
This structure allows you to easily determine whether recording consent was granted and audit compliance decisions for each call.
175+
This webhook structure allows you to easily determine whether recording consent was granted and audit compliance decisions for each call. The compliance data is sent as part of the end-of-call-report webhook, which includes all call details, analysis, and compliance information.
148176

149177
## Implementation
150178

0 commit comments

Comments
 (0)