TransferToOperator
The TransferToOperator
action allows your bot to switch the dialog to an agent from a customer engagement platform.
This can be helpful when the bot cannot solve the customer request without human aid.
Before using this tag, you need to connect one of the available customer engagement platforms to your project.
tip
If you want to switch the dialog to an agent using JavaScript code snippets rather than action tags,
use replies with the
switch
type in $response.replies
instead.Parameters
All parameters of this tag are optional.
Parameter | Type | Description |
---|---|---|
titleOfCloseButton | String | The title of the button to switch the dialog back to the bot. By selecting this button, the customer can stop communicating with an agent and return to the bot. |
messageBeforeTransfer | String | The message the customer will see before the dialog switches to an agent. It should notify the customer that an agent is going to speak to them. If you intend to use HTML markup in the message, omit this parameter and use messageBeforeTransferHtml only. |
messageBeforeTransferHtml | String | The message the customer will see before the dialog switches to an agent, with HTML markup. If you don’t intend to use HTML markup, omit this parameter and use messageBeforeTransfer only. |
prechatAttributes | Object | Information about the customer that should be transferred to an agent. Use the following format for the value:
This parameter is only used for the customer engagement platforms: Tovie Agent. info In Tovie Agent, you can send links to an agent using the Value field:
|
ignoreOffline | Boolean | Indicates if the customer will wait for a free agent. This parameter determines further actions if there is no agent available on switching the dialog: • true — the messageForWaitingOperator or messageForWaitingOperatorHtml parameter value will be shown. • false — the dialog will switch to the state specified in the noOperatorsOnlineState parameter. |
messageForWaitingOperator | String | The text that will be sent to the customer when waiting for a free agent. If you intend to use HTML markup in the message, omit this parameter and use messageForWaitingOperatorHtml instead. |
messageForWaitingOperatorHtml | String | The text that will be sent to the customer when waiting for a free agent, with HTML markup. If you don’t intend to use HTML markup, omit this parameter and use messageForWaitingOperator only. |
sendMessageHistoryAmount | Number | The number of customer messages that will be sent to an agent. Specify this parameter only if you have set the sendMessagesToOperator parameter to true . |
sendMessagesToOperator | Boolean | Indicates if the customer message history should be sent to an agent. |
noOperatorsOnlineState | String | The state the dialog will switch to if there are no free agents on switching the dialog. |
dialogCompletedState | String | The state the dialog will switch to when the dialog with an agent is over. The dialog can be finished by: • The customer, using the dialog finish button (the titleOfCloseButton parameter); • An agent, if this feature is supported by the customer engagement platform. |
actions | Array of objects | Buttons that will be displayed along with the request. Use the following format for the value:
|
htmlEnabled | Boolean | Indicates if HTML markup is used in the messages shown to the customer when switching the dialog to an agent and before waiting for a free one. This parameter determines the parameters whose values will be shown to the customer: • true — the messageBeforeTransferHtml and messageForWaitingOperatorHtml parameter values will be shown. • false — the messageBeforeTransfer and messageForWaitingOperator parameter values will be shown. |
destination | String | The ID of the agent group the dialog will be routed to. This parameter is only used by Tovie Agent and Operator API. |
How to use
state: Switch
intent!: /Switch to agent
TransferToOperator:
titleOfCloseButton = Switch back to the bot
messageBeforeTransfer = You will be switched to an agent.
ignoreOffline = false
messageForWaitingOperator = Hold on. I’m connecting you to one of our agents.
noOperatorsOnlineState = /Switch/Error
dialogCompletedState = /AnythingElse
sendMessageHistoryAmount = 5
sendMessagesToOperator = true
state: Error
a: Unfortunately, all our agents are busy at the moment. We’ll be sure to get back to you soon.
go!: /AnythingElse
state: AnythingElse
a: Is there anything else I can help you with?