Skip to content

Commit 2ce6a46

Browse files
committed
Update chat/session docs
- Added chat/session webhook note in chat and session page. - Added a redirect for chat to handle google search results - Added holdmusic url in warm transfer docs
1 parent 92c771e commit 2ce6a46

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

fern/call-forwarding.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ In this mode, Vapi dials the destination number and places the caller on hold (w
386386
- Provide a `message` to be spoken to the operator when they answer.
387387
- Optionally define a `summaryPlan` that will take precedence over the message if enabled.
388388
- Configure a `fallbackPlan` with a message and whether to end the call if transfer fails.
389+
- Optionally provide a `holdAudioUrl` to play custom hold music to the customer during the transfer.
389390
- Configure `voicemailDetectionType` to customize how human voice detection is performed (only applies when the provider is Google or OpenAI):
390391
- `"audio"` (default): Supports a wide range of machine detection including beep detection and other audio cues
391392
- `"transcript"`: Uses transcript-based detection with the lowest latency and faster transfer processing times
@@ -397,6 +398,7 @@ In this mode, Vapi dials the destination number and places the caller on hold (w
397398
"transferPlan": {
398399
"mode": "warm-transfer-experimental",
399400
"message": "Transferring a customer to you.",
401+
"holdAudioUrl": "https://api.twilio.com/cowbell.mp3",
400402
"voicemailDetectionType": "transcript",
401403
"fallbackPlan": {
402404
"message": "Could not transfer your call, goodbye.",
@@ -436,6 +438,7 @@ Here is a full example of a `transferCall` payload using the experimental warm t
436438
"transferPlan": {
437439
"mode": "warm-transfer-experimental",
438440
"message": "Transferring a customer to you.",
441+
"holdAudioUrl": "https://assets.example.com/music.mp3",
439442
"voicemailDetectionType": "audio",
440443
"fallbackPlan": {
441444
"message": "Could not transfer your call, goodbye.",
@@ -465,6 +468,7 @@ Here is a full example of a `transferCall` payload using the experimental warm t
465468
**Notes:**
466469

467470
- In all warm transfer modes, the `{{transcript}}` variable contains the full transcript of the call and can be used within the `summaryPlan`.
471+
- The `holdAudioUrl` property (available only in `warm-transfer-experimental` mode) allows you to specify a custom MP3 file URL that will be played to the customer while they are on hold during the transfer. If not provided, the default hold audio will be used.
468472
- The `voicemailDetectionType` parameter allows you to optimize the detection method based on your needs:
469473
- Use `"transcript"` for the fastest transfer processing with lowest latency
470474
- Use `"audio"` (default) for comprehensive machine detection including beep detection and other audio cues

fern/chat/quickstart.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,18 @@ We'll create a customer support chat for "TechFlow", a software company that wan
318318
- Server webhook events (status updates, end-of-call reports, etc.) are not supported
319319
</Note>
320320

321+
## Webhook Support
322+
323+
<Note>
324+
The chat API supports the following webhook events through server messaging:
325+
- **`chat.created`** - Triggered when a new chat conversation is initiated
326+
- **`chat.deleted`** - Triggered when a chat conversation is deleted
327+
328+
To receive these webhooks, go to your Assistant page in the Dashboard and navigate to "Server Messaging" and select the events you want to receive.
329+
330+
These webhooks are useful for tracking conversation analytics, maintaining conversation history in your own database, and triggering follow-up actions.
331+
</Note>
332+
321333
## Next Steps
322334

323335
Take your chat bot to the next level:

fern/chat/session-management.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ Create a persistent session that groups multiple chats.
132132
</Step>
133133
</Steps>
134134

135+
<Note>
136+
- Sessions expire automatically after 24 hours by default. After expiration, you'll need to create a new session to continue conversations.
137+
- Web chat widget and SMS conversations automatically manage session creation and expiration. You don't need to manually create or manage sessions when using these channels.
138+
</Note>
139+
135140
Here's a TypeScript implementation of the session manager:
136141

137142
```typescript title="session-manager.ts"
@@ -234,6 +239,21 @@ await sendToAssistant("billing_agent", "Can you help with this?");
234239

235240
---
236241

242+
## Webhook Support
243+
244+
<Note>
245+
Sessions support the following webhook events through server messaging:
246+
- **`session.created`** - Triggered when a new session is created
247+
- **`session.updated`** - Triggered when a session is updated
248+
- **`session.deleted`** - Triggered when a session is deleted
249+
250+
To receive these webhooks, go to your Assistant page in the Dashboard and navigate to "Server Messaging" and select the events you want to receive.
251+
252+
These webhooks are useful for tracking session lifecycle, managing session state in your own database, and triggering workflows based on session changes.
253+
</Note>
254+
255+
---
256+
237257
## Next Steps
238258

239259
* **[Streaming responses](/chat/streaming)** - Add real-time responses to session-managed chats

fern/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,3 +963,5 @@ redirects:
963963
destination: /workflows/examples/lead-qualification
964964
- source: /fern/api-reference
965965
destination: /api-reference/calls/list
966+
- source: /documentation/chat/chat
967+
destination: /api-reference/chats

0 commit comments

Comments
 (0)