Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions fern/call-forwarding.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ In this mode, Vapi dials the destination number and places the caller on hold (w
- Provide a `message` to be spoken to the operator when they answer.
- Optionally define a `summaryPlan` that will take precedence over the message if enabled.
- Configure a `fallbackPlan` with a message and whether to end the call if transfer fails.
- Optionally provide a `holdAudioUrl` to play custom hold music to the customer during the transfer.
- Configure `voicemailDetectionType` to customize how human voice detection is performed (only applies when the provider is Google or OpenAI):
- `"audio"` (default): Supports a wide range of machine detection including beep detection and other audio cues
- `"transcript"`: Uses transcript-based detection with the lowest latency and faster transfer processing times
Expand All @@ -397,6 +398,7 @@ In this mode, Vapi dials the destination number and places the caller on hold (w
"transferPlan": {
"mode": "warm-transfer-experimental",
"message": "Transferring a customer to you.",
"holdAudioUrl": "https://api.twilio.com/cowbell.mp3",
"voicemailDetectionType": "transcript",
"fallbackPlan": {
"message": "Could not transfer your call, goodbye.",
Expand Down Expand Up @@ -436,6 +438,7 @@ Here is a full example of a `transferCall` payload using the experimental warm t
"transferPlan": {
"mode": "warm-transfer-experimental",
"message": "Transferring a customer to you.",
"holdAudioUrl": "https://assets.example.com/music.mp3",
"voicemailDetectionType": "audio",
"fallbackPlan": {
"message": "Could not transfer your call, goodbye.",
Expand Down Expand Up @@ -465,6 +468,7 @@ Here is a full example of a `transferCall` payload using the experimental warm t
**Notes:**

- In all warm transfer modes, the `{{transcript}}` variable contains the full transcript of the call and can be used within the `summaryPlan`.
- 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.
- The `voicemailDetectionType` parameter allows you to optimize the detection method based on your needs:
- Use `"transcript"` for the fastest transfer processing with lowest latency
- Use `"audio"` (default) for comprehensive machine detection including beep detection and other audio cues
Expand Down
12 changes: 12 additions & 0 deletions fern/chat/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,18 @@ We'll create a customer support chat for "TechFlow", a software company that wan
- Server webhook events (status updates, end-of-call reports, etc.) are not supported
</Note>

## Webhook Support

<Note>
The chat API supports the following webhook events through server messaging:
- **`chat.created`** - Triggered when a new chat conversation is initiated
- **`chat.deleted`** - Triggered when a chat conversation is deleted

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.

These webhooks are useful for tracking conversation analytics, maintaining conversation history in your own database, and triggering follow-up actions.
</Note>

## Next Steps

Take your chat bot to the next level:
Expand Down
20 changes: 20 additions & 0 deletions fern/chat/session-management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ Create a persistent session that groups multiple chats.
</Step>
</Steps>

<Note>
- Sessions expire automatically after 24 hours by default. After expiration, you'll need to create a new session to continue conversations.
- 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.
</Note>

Here's a TypeScript implementation of the session manager:

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

---

## Webhook Support

<Note>
Sessions support the following webhook events through server messaging:
- **`session.created`** - Triggered when a new session is created
- **`session.updated`** - Triggered when a session is updated
- **`session.deleted`** - Triggered when a session is deleted

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.

These webhooks are useful for tracking session lifecycle, managing session state in your own database, and triggering workflows based on session changes.
</Note>

---

## Next Steps

* **[Streaming responses](/chat/streaming)** - Add real-time responses to session-managed chats
Expand Down
2 changes: 2 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -963,3 +963,5 @@ redirects:
destination: /workflows/examples/lead-qualification
- source: /fern/api-reference
destination: /api-reference/calls/list
- source: /documentation/chat/chat
destination: /api-reference/chats
Loading