$aimychat
The $aimychat
service allows you to interact with the Aimychat customer engagement platform.
$aimychat.findOperatorGroupByMainOperator
This method allows you to check in which group a specific agent is assigned as the default agent.
Syntax
The method accepts an agent login as a string argument.
- ECMAScript 5
- ECMAScript 6
$aimychat.findOperatorGroupByMainOperator("agent-login@example.com");
In the ECMAScript 6 runtime, the method is asynchronous:
await $aimychat.findOperatorGroupByMainOperator("agent-login@example.com");
The method returns an object with two properties:
Property | Type | Description |
---|---|---|
id | Number | Group ID. |
name | String | Group name. |
If the specified agent is the default agent in one of the groups,
the method will return the group name and its ID.
Otherwise, the method returns null
.