Skip to content

Commit 631cfae

Browse files
authored
Updated the assistant based warn transfer docs (#618)
1 parent 6fa9692 commit 631cfae

File tree

1 file changed

+70
-29
lines changed

1 file changed

+70
-29
lines changed

fern/calls/assistant-based-warm-transfer.mdx

Lines changed: 70 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,24 @@ The `function.name` property identifies your transfer tool. Use this name when i
4242
{
4343
"type": "transferCall",
4444
"function": {
45-
"name": "warmTransferAssistant"
45+
"name": "salesTransferAssistant"
4646
},
4747
"destinations": [
4848
{
4949
"type": "number",
5050
"number": "+14155551234",
51-
"message": "I am forwarding your call to customer support. Please stay on the line.",
5251
"transferPlan": {
5352
"mode": "warm-transfer-experimental",
5453
"transferAssistant": {
55-
"firstMessage": "Hi, I have a customer waiting. Are you available to take this call?",
54+
"firstMessage": "Hello, I have a customer on the line. Are you available to take this call?",
5655
"maxDurationSeconds": 120,
5756
"model": {
5857
"provider": "openai",
5958
"model": "gpt-4o",
6059
"messages": [
6160
{
6261
"role": "system",
63-
"content": "You are handling a warm transfer. Check if the operator is available. If yes, call transferSuccessful. If no answer or voicemail detected, call transferCancel."
62+
"content": "You are a transfer assistant designed to facilitate call transfers between a customer and an operator. Your core responsibility is to talk to the operator and manage the transfer process efficiently. \n\n## Core Responsibility \n - Facilitate the transfer process by using transferSuccessful or transferCancel tools. Engage briefly with the operator as needed and then facilitate the transfer by calling the corresponding transfer tool. \n ## When to Respond\n- Answer questions about the transfer process or provide summaries when specifically asked by the operator\n- Respond to direct questions about the current transfer situation\n\\n ## Transfer Tools\n- Use transferSuccessful when the operator agrees to accept the call\n- Use transferCancel when the transfer cannot be completed\n\n- Only call the tool when you addressed all the operators questions"
6463
}
6564
]
6665
}
@@ -71,7 +70,11 @@ The `function.name` property identifies your transfer tool. Use this name when i
7170
"messages": [
7271
{
7372
"type": "request-start",
74-
"content": "I am forwarding your call to customer support. Please stay on the line."
73+
"content": "I'll transfer you to our sales team. Please hold for a moment."
74+
},
75+
{
76+
"type": "request-failed",
77+
"content": "I apologize, but I'm having trouble connecting your call. Is there anything else I can help you with?"
7578
}
7679
]
7780
}
@@ -134,7 +137,6 @@ The transfer assistant can be configured to handle various operator responses:
134137
{
135138
"type": "number",
136139
"number": "+14155551234",
137-
"message": "Transferring you to our specialist. Please hold.",
138140
"transferPlan": {
139141
"mode": "warm-transfer-experimental",
140142
"transferAssistant": {
@@ -150,10 +152,6 @@ The transfer assistant can be configured to handle various operator responses:
150152
}
151153
]
152154
}
153-
},
154-
"fallbackPlan": {
155-
"message": "I couldn't reach our specialist. Let me help you directly instead.",
156-
"endCallEnabled": false
157155
}
158156
}
159157
}
@@ -162,6 +160,11 @@ The transfer assistant can be configured to handle various operator responses:
162160
{
163161
"type": "request-start",
164162
"content": "Transferring you to our specialist. Please hold."
163+
},
164+
{
165+
"type": "request-failed",
166+
"content": "I couldn't reach our specialist. Please try again later.",
167+
"endCallAfterSpokenEnabled": true
165168
}
166169
]
167170
}
@@ -177,20 +180,15 @@ Configure different transfer assistants for different departments:
177180
{
178181
"type": "transferCall",
179182
"function": {
180-
"name": "warmTransferAssistant"
183+
"name": "departmentTransferAssistant"
181184
},
182185
"destinations": [
183186
{
184187
"type": "number",
185188
"number": "+1234567890",
186-
"description": "Sales Department",
189+
"description": "Sales team transfer line",
187190
"transferPlan": {
188191
"mode": "warm-transfer-experimental",
189-
"holdAudioUrl": "https://assets.example.com/hold-music.mp3",
190-
"fallbackPlan": {
191-
"message": "Sorry, none of our account executives are available right now. Our team get back to you later",
192-
"endCallEnabled": false
193-
},
194192
"transferAssistant": {
195193
"firstMessage": "Hey there, I have a potential customer interested in our enterprise plans. Are you available to pick up the call?",
196194
"maxDurationSeconds": 60,
@@ -200,7 +198,49 @@ Configure different transfer assistants for different departments:
200198
"messages": [
201199
{
202200
"role": "system",
203-
"content": "You are a transfer assistant designed to facilitate call transfers between a customer and an operator. Your core responsibility is to talk to the operator and manage the transfer process efficiently. \n\n## Core Responsibility \n - Facilitate the transfer process by using transferSuccessful or transferCancel tools. Engage briefly with the operator as needed and then facilitate the transfer by calling the corresponding transfer tool. \n ## When to Respond\n- Answer questions about the transfer process or provide summaries when specifically asked by the operator\n- Respond to direct questions about the current transfer situation\n\\n ## Transfer Tools\n- Use transferSuccessful when the operator agrees to accept the call\n- Use transferCancel when the transfer cannot be completed\n\n Rule: Only call the tool when you addressed all the operators questions"
201+
"content": "You are a transfer assistant designed to facilitate call transfers between a customer and an operator. Your core responsibility is to talk to the operator and manage the transfer process efficiently. \n\n## Core Responsibility \n - Facilitate the transfer process by using transferSuccessful or transferCancel tools. Engage briefly with the operator as needed and then facilitate the transfer by calling the corresponding transfer tool. \n ## When to Respond\n- Answer questions about the transfer process or provide summaries when specifically asked by the operator\n- Respond to direct questions about the current transfer situation\n\\n ## Transfer Tools\n- Use transferSuccessful when the operator agrees to accept the call\n- Use transferCancel when the transfer cannot be completed\n\n- Only call the tool when you addressed all the operators questions"
202+
}
203+
],
204+
"tools": [
205+
{
206+
"type": "transferSuccessful", // built-in tool
207+
"function": {
208+
"name": "transferSuccessful",
209+
"description": "Confirm the transfer when operator accepts"
210+
},
211+
"messages": [
212+
{
213+
"type": "request-start",
214+
"content": "Great! I'll connect you to the customer now. One moment please."
215+
},
216+
{
217+
"type": "request-complete",
218+
"content": "https://desert-horse-9859.twil.io/assets/call_complete_chime.mp3"
219+
}
220+
]
221+
},
222+
{
223+
"type": "transferCancel", // built-in tool
224+
"function": {
225+
"name": "transferCancel",
226+
"description": "Cancel the transfer if operator declines or is unavailable"
227+
},
228+
"messages": [
229+
{
230+
"type": "request-complete",
231+
"content": "I'll let the customer know about it."
232+
}
233+
]
234+
},
235+
{
236+
"type": "function", // custom tool
237+
"function": {
238+
"name": "getCustomerInfo",
239+
"description": "Get detailed customer information"
240+
},
241+
"server": {
242+
"url": "https://vapi-webhook-listener-five.vercel.app/customer"
243+
}
204244
}
205245
]
206246
}
@@ -210,22 +250,15 @@ Configure different transfer assistants for different departments:
210250
{
211251
"type": "number",
212252
"number": "+0987654321",
213-
"description": "Technical Support",
253+
"description": "Technical Support team transfer line",
214254
"transferPlan": {
215255
"mode": "warm-transfer-experimental",
216-
"holdAudioUrl": "https://assets.example.com/hold-music.mp3",
217256
"transferAssistant": {
218257
"firstMessage": "Hey there, I have a customer experiencing issues with API integration. Can you help?",
219258
"maxDurationSeconds": 90,
220259
"model": {
221260
"provider": "openai",
222-
"model": "gpt-4o",
223-
"messages": [
224-
{
225-
"role": "system",
226-
"content": "Transfer to tech support. Explain the technical issue the customer is experiencing."
227-
}
228-
]
261+
"model": "gpt-4o"
229262
}
230263
}
231264
}
@@ -234,7 +267,15 @@ Configure different transfer assistants for different departments:
234267
"messages": [
235268
{
236269
"type": "request-start",
237-
"content": "I am forwarding your call to enterprise team. Please stay on the line."
270+
"content": "I'll transfer you to our team. Please hold for a moment."
271+
},
272+
{
273+
"type": "request-complete",
274+
"content": "https://desert-horse-9859.twil.io/assets/soothing-sound.mp3" // played as hold music on the customer's side of the call
275+
},
276+
{
277+
"type": "request-failed",
278+
"content": "Sorry, none of our account executives are available right now. Our team get back to you later."
238279
}
239280
]
240281
}
@@ -270,7 +311,7 @@ Configure your transfer assistant to:
270311
- Requires `warm-transfer-experimental` mode
271312
- Only works with Twilio phone numbers
272313
- Calls are limited by `maxDurationSeconds` to prevent indefinite duration
273-
- Built-in tools (`transferSuccessful`, `transferCancel`) are predefined and cannot be modified
314+
- Built-in tools (`transferSuccessful`, `transferCancel`) are predefined and cannot be removed
274315
- The transfer assistant has access to the previous conversation context
275316
</Info>
276317

0 commit comments

Comments
 (0)