Advanced Actions

Assigning Chat to a specific agent or based on rules

Using this action, you can specify the Assignee of the chat based on your business logic. To use this node, you need to follow these steps
  1. 1.
    Add a Dynamic Node in your playbook at the stage we want to initiate the assignment.
  2. 2.
    Add the code that creates an Action Node using the code

To assign directly to a specified agent

1
return {
2
actions: [
3
{
4
"type": "ASSIGN_AGENT",
5
"assignment_type": "DIRECT",
6
"assignee": <id of the agent>
7
}
8
]
9
}
10
Copied!
As of now, we do not have agent ids visible in front end. So, you can request the list of agent ids from our support by writing to [email protected]

To assign the chat based on a rule - assign only to Online Agents

1
return {
2
actions: [
3
{
4
"type": "ASSIGN_AGENT",
5
"assignment_type": "RULE_BASED",
6
"assign_rule": {
7
"agent_type": [
8
"Owner",
9
"Admin",
10
"Member"
11
],
12
"status": "ONLINE"
13
},
14
"reassign_attempt" : 2,
15
"reassign_delay" : 120
16
}
17
]
18
}
Copied!
If the action could not find any agent matching the rule, the chat remains unassigned.

Assign Agent Action Node Schema

Field Name
Field Type
Description
Required
type
String
Fixed value - ASSIGN_AGENT
Yes
assignment_type
String
One of the two values DIRECT - directly assigning chat to a specified agent RULE_BASED - assigning chat based on rules
Yes
assignee
String
The id of the agent to whom the chat has to be assigned
When assignment_type = DIRECT
assign_rule
JSON Object
Contains the rule to assign the agent
When assignment_type = RULE_BASED
  • agent_type
Array of String
Type of agent role to which the chat has to be assigned.
Possible values - Owner, Admin, Member
At least one value is required when assignment_type = RULE_BASED
  • status
String
To specify if only online agents are to be assigned or offline agents can be assigned chats too.
Possible values - DEFAULT, ONLINE, OFFLINE
DEFAULT means assign irrespective of their online status
Optional.
Default value = DEFAULT
reassign_attempt
Number
Number of re-attempts after the first assign attempt fails. This only happens in rule based assignment when no agent is found as per the rule
Optional.
Default value = 0
reassign_delay
Number
Delay in secons between each re-assign attempt.
Optional.
Default value = 60
Last modified 9mo ago
Copy link