Every transfer assistant has two built-in tools that are always present and cannot be removed:
- transferSuccessful — merges the customer and operator calls, removes the transfer assistant, and connects the two parties directly. Called when the operator agrees to accept the call.
- transferCancel — disconnects from the operator and returns the customer to the original assistant, optionally playing a fallback message. Called when the operator declines, voicemail is detected, or the transfer otherwise can't complete.
You can attach custom messages to either tool using three message types: request-start (spoken when the tool call begins), request-complete (spoken or played once it finishes), and request-failed (spoken if it errors). Example:
"tools": [
{
"type": "transferSuccessful",
"function": {
"name": "transferSuccessful",
"description": "Confirm the transfer when operator accepts"
},
"messages": [
{
"type": "request-start",
"content": "Great! I'll connect you to the customer now."
},
{
"type": "request-complete",
"content": "https://assets.sulus.ai/chime.mp3"
}
]
},
{
"type": "transferCancel",
"function": {
"name": "transferCancel",
"description": "Cancel the transfer if operator declines or is unavailable"
},
"messages": [
{
"type": "request-complete",
"content": "I'll let the customer know."
}
]
}
]