You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/calls/assistant-based-warm-transfer.mdx
+70-29Lines changed: 70 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,25 +42,24 @@ The `function.name` property identifies your transfer tool. Use this name when i
42
42
{
43
43
"type": "transferCall",
44
44
"function": {
45
-
"name": "warmTransferAssistant"
45
+
"name": "salesTransferAssistant"
46
46
},
47
47
"destinations": [
48
48
{
49
49
"type": "number",
50
50
"number": "+14155551234",
51
-
"message": "I am forwarding your call to customer support. Please stay on the line.",
52
51
"transferPlan": {
53
52
"mode": "warm-transfer-experimental",
54
53
"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?",
56
55
"maxDurationSeconds": 120,
57
56
"model": {
58
57
"provider": "openai",
59
58
"model": "gpt-4o",
60
59
"messages": [
61
60
{
62
61
"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, calltransferCancel."
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"
64
63
}
65
64
]
66
65
}
@@ -71,7 +70,11 @@ The `function.name` property identifies your transfer tool. Use this name when i
71
70
"messages": [
72
71
{
73
72
"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?"
75
78
}
76
79
]
77
80
}
@@ -134,7 +137,6 @@ The transfer assistant can be configured to handle various operator responses:
134
137
{
135
138
"type": "number",
136
139
"number": "+14155551234",
137
-
"message": "Transferring you to our specialist. Please hold.",
138
140
"transferPlan": {
139
141
"mode": "warm-transfer-experimental",
140
142
"transferAssistant": {
@@ -150,10 +152,6 @@ The transfer assistant can be configured to handle various operator responses:
150
152
}
151
153
]
152
154
}
153
-
},
154
-
"fallbackPlan": {
155
-
"message": "I couldn't reach our specialist. Let me help you directly instead.",
156
-
"endCallEnabled": false
157
155
}
158
156
}
159
157
}
@@ -162,6 +160,11 @@ The transfer assistant can be configured to handle various operator responses:
162
160
{
163
161
"type": "request-start",
164
162
"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
165
168
}
166
169
]
167
170
}
@@ -177,20 +180,15 @@ Configure different transfer assistants for different departments:
"message": "Sorry, none of our account executives are available right now. Our team get back to you later",
192
-
"endCallEnabled": false
193
-
},
194
192
"transferAssistant": {
195
193
"firstMessage": "Hey there, I have a potential customer interested in our enterprise plans. Are you available to pick up the call?",
196
194
"maxDurationSeconds": 60,
@@ -200,7 +198,49 @@ Configure different transfer assistants for different departments:
200
198
"messages": [
201
199
{
202
200
"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."
0 commit comments