Skip to main content

Webim (Custom Channel API): working with actions

For the Webim channel, it is possible to add actions to the bot response.

actions are specified if any action is required other than/instead of sending response messages.

Types of actions

"type":ParametersDescription
"redirect_to_operator""operator_id"Transfer to a specific bot.
In the "operator_id" field the agent ID is set, type string.
"redirect_to_department""department_key"Transfer to a specific Department.
The "department_key" field specifies the id-number of the department, type string.
"close_chat""category"Add a category when the chat is closing.
In the "category" field the category is set, type string.
"close_chat""sub_category"Add a subcategory when the chat is closing.
In the "sub_category" field the category is set, type string.

How to use

script:
$response.actions = [{
type:"close_chat",
operatorId:"123"
},
{
type:"redirect_to_department",
departmentKey:"123"
}];