Skip to content

Commit d4252d0

Browse files
committed
VAP-3931 Added more transferPlan details and along with twiml notes
1 parent da35944 commit d4252d0

File tree

1 file changed

+74
-30
lines changed

1 file changed

+74
-30
lines changed

fern/call-forwarding.mdx

Lines changed: 74 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Call Forwarding
33
slug: call-forwarding
44
---
55

6-
76
Vapi's call forwarding functionality allows you to redirect calls to different phone numbers based on specific conditions using tools. This guide explains how to set up and use the `transferCall` function for call forwarding.
87

98
## Key Concepts
@@ -53,17 +52,11 @@ The `transferCall` tool includes a list of destinations and corresponding messag
5352
"properties": {
5453
"destination": {
5554
"type": "string",
56-
"enum": [
57-
"+1234567890",
58-
"+0987654321",
59-
"+1122334455"
60-
],
55+
"enum": ["+1234567890", "+0987654321", "+1122334455"],
6156
"description": "The destination to transfer the call to."
6257
}
6358
},
64-
"required": [
65-
"destination"
66-
]
59+
"required": ["destination"]
6760
}
6861
},
6962
"messages": [
@@ -119,7 +112,6 @@ When the assistant needs to forward a call, it uses the `transferCall` function
119112
}
120113
}
121114
}
122-
123115
```
124116

125117
### 3. Customizing Messages
@@ -142,7 +134,6 @@ Customize the messages for each destination to provide clear information to the
142134
}
143135
]
144136
}
145-
146137
```
147138

148139
## Instructing the Assistant
@@ -176,12 +167,13 @@ To implement a warm transfer, add a `transferPlan` object to the `transferCall`
176167

177168
In this mode, Vapi provides a summary of the call to the recipient before transferring.
178169

179-
* **Configuration:**
180-
* Set the `mode` to `"warm-transfer-with-summary"`.
181-
* Define a `summaryPlan` specifying how the summary should be generated.
182-
* Use the `{{transcript}}` variable to include the call transcript.
170+
- **Configuration:**
171+
172+
- Set the `mode` to `"warm-transfer-with-summary"`.
173+
- Define a `summaryPlan` specifying how the summary should be generated.
174+
- Use the `{{transcript}}` variable to include the call transcript.
183175

184-
* **Example:**
176+
- **Example:**
185177

186178
```json
187179
"transferPlan": {
@@ -204,14 +196,15 @@ In this mode, Vapi provides a summary of the call to the recipient before transf
204196

205197
#### 2. Warm Transfer with Message
206198

207-
In this mode, Vapi delivers a custom static message to the recipient before transferring the call.
199+
In this mode, Vapi delivers a custom message to the recipient before transferring the call.
200+
201+
- **Configuration:**
208202

209-
* **Configuration:**
210-
* Set the `mode` to `"warm-transfer-with-message"`.
211-
* Provide the custom message in the `message` property.
212-
* Note that the `{{transcript}}` variable is not available in this mode.
203+
- Set the `mode` to `"warm-transfer-with-message"`.
204+
- Provide the custom message in the `message` property.
205+
- Note that the `{{transcript}}` variable is not available in this mode.
213206

214-
* **Example:**
207+
- **Example:**
215208

216209
```json
217210
"transferPlan": {
@@ -259,17 +252,69 @@ Here is a full example of a `transferCall` payload using the warm transfer with
259252
}
260253
```
261254

262-
#### 3. Warm Transfer with TwiML
255+
#### 3. Warm Transfer with Wait and Say Message
256+
257+
In this mode, Vapi waits for the recipient to speak first and then delivers a custom message to the recipient before transferring the call.
258+
259+
- **Configuration:**
260+
261+
- Set the `mode` to `"warm-transfer-wait-for-operator-to-speak-first-and-then-say-message"`.
262+
- Provide the custom message in the `message` property.
263+
- Note that the `{{transcript}}` variable is not available in this mode.
264+
265+
- **Example:**
266+
267+
```json
268+
"transferPlan": {
269+
"mode": "warm-transfer-wait-for-operator-to-speak-first-and-then-say-message",
270+
"message": "Hey, this call has been forwarded through Vapi."
271+
}
272+
```
273+
274+
#### 4. Warm Transfer with Wait and Say Summary
275+
276+
In this mode, Vapi waits for the recipient to speak first and then delivers a summary of the call to the recipient before transferring the call.
277+
278+
- **Configuration:**
279+
280+
- Set the `mode` to `"warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary"`.
281+
- Define a `summaryPlan` specifying how the summary should be generated.
282+
- Use the `{{transcript}}` variable to include the call transcript.
283+
284+
- **Example:**
285+
286+
```json
287+
"transferPlan": {
288+
"mode": "warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary",
289+
"summaryPlan": {
290+
"enabled": true,
291+
"messages": [
292+
{
293+
"role": "system",
294+
"content": "Please provide a summary of the call."
295+
},
296+
{
297+
"role": "user",
298+
"content": "Here is the transcript:\n\n{{transcript}}\n\n"
299+
}
300+
]
301+
}
302+
}
303+
```
304+
305+
#### 5. Warm Transfer with TwiML
263306

264307
In this mode, Vapi executes TwiML instructions on the destination call leg before connecting the destination number.
265308

266-
* **Configuration:**
267-
* Set the `mode` to `"warm-transfer-with-twiml"`.
268-
* Provide the TwiML instructions in the `twiml` property.
269-
* Supports only `Play`, `Say`, `Gather`, `Hangup`, and `Pause` verbs.
270-
* Maximum TwiML length is 4096 characters.
309+
- **Configuration:**
271310

272-
* **Example:**
311+
- Set the `mode` to `"warm-transfer-with-twiml"`.
312+
- Provide the TwiML instructions in the `twiml` property.
313+
- Supports only `Play`, `Say`, `Gather`, and `Pause` verbs.
314+
- Maximum TwiML length is 4096 characters.
315+
- TwiML must be provided as a single-line string without line breaks or tabs.
316+
317+
- **Example:**
273318

274319
```json
275320
"transferPlan": {
@@ -278,7 +323,6 @@ In this mode, Vapi executes TwiML instructions on the destination call leg befor
278323
}
279324
```
280325

281-
282326
Here is a full example of a `transferCall` payload using the warm transfer with TwiML mode:
283327

284328
```json

0 commit comments

Comments
 (0)