Skip to main content

$analytics.setAutomationStatus

This method sets the dialog automation status. A session can be considered automated, for example, if the user’s request was resolved without agent assistance.

tip
You can find dialog automation statistics in the Project overview section.

Syntax​

The method accepts a Boolean value (true or false) as an argument.

$analytics.setAutomationStatus(false)
caution
Only the last status will be recorded if the method is called more than once in one session.

How to use​

In the example script below, the bot sets a status for a non-automated dialog in a text channel:

state: TransferToAgent
intent!: /TransferToAgent
a: I’m connecting you with an agent.
script:
$response.replies = $response.replies || [];
$response.replies.push({
"type": "switch",
"firstMessage": $jsapi.chatHistory(),
"closeChatPhrases": ["/closeChat", "Close dialog"]
});
$analytics.setAutomationStatus(false);