Skip to main content

How to setup round robin/automatic chats assignment workflow?

This article describes how to setup auto assignment workflow in Live Helper Chat. Auto assignment works two ways out of the box.

  • Live auto assignment - means chats are auto assignment on chat sync event in visitor widget. This allows auto assignment work even if there is no cronjob running. Disadvantage is it does not respect FIFO order if you have a lot of chats.
  • Using workflow cronjob - this is a recommended way of having auto assignment setup. You should also disable live auto assignment in that case. Using cronjob chats will be assigned in FIFO order.

Introduction

In department you can find auto assignment settings.

Attributes definition

Maximum number of active chats user can have at a time, 0 - unlimited

You can set how many actives chats user can have at a time.

If this variable is not set we would assign chat to user if

  • Either operator does not have max chats limit OR and his active chats is less than

If this variable is set we would assign chat to user if

  • Either operator does not have max chats limit set AND active chats ir less than defined maximum number of chats in department.
  • OR
  • Either he has limit set and number of chats is less than number of active chats he has now

Maximum number of department active chats, 0 - unlimited

Auto assignment workflow would be executed only if department is having less active chats than defined amount. If this limit is reached, new chats will not be assigned to any operator.

Automatically assign chat to another operator if operator did not accepted chat in seconds, 0 - disabled

If you set 10 means operator would have 10 seconds to accept a chat before chat is assigned to another operator.

tip
  • Back office is checking for a new chats every 10 seconds by default. You should decrease that time to 3 or 4 seconds in. chat configuration
  • Chat is assigned to operator even if operator is in invisible mode. Operator participating in auto assignment workflow should be online and in visible mode. If invisbile operator opens a chat nothing will happen and chat will be assigned to another operator!

Minimum delay between chat assignment to operator

Then we assign chat to one operator we can give some delay before another chat can be assigned to the same operator.

Exclude inactive chats

Pending and active chats which visitors has closed chats explicitly or visitors being redirected to survey will be excluded

Assign chat to lowest number of chats having operator

We will try to assign chat first to operator who has the lowest number of chats

Try to assign chats first to the same language speaking operators

Operator in their accounts can choose what languages they are speaking. So it's possible to try first to assign chats to same language speaking operators.

Check for presence of variable && Resume auto assign if chat remains pending for n seconds

  • additional_data.<variable>
  • chat_variable.<variable>

Using this functionality we can allow to participate in auto assignment chats which have custom variables only. By defining time we do these checks only if chat is not older than defined amount of time.

tip

This functionality should be used only by advanced users which want to do some fancy things 😄

Resume auto assign if chat remains pending for n seconds will keep looking for additional chat variables until chat is in the pending queue less than defined amount of time. In other words keep looking for chat variables for that amount of time before continuing default auto assignment workflow.

Assign chat by operator priority

Once everything is set up. It will assign chats first to agents with higher assignment priority.

In user account once you are assigning operator to department you can set his assignment priority. Once you activate this option in department

$sort = 'last_accepted ASC'; // Sort by default by last accepted chat
if (should I sort by `lowest number of chats having operator`) {
$sort = 'active_chats ASC, last_accepted ASC';
}

if (should I sort by agent assignment priority) {
$sort = 'assign_priority DESC, '.$sort;
}

Assignment priority can be set in user account per department or department group.

Prioritized assignment workflow

First you have to active it by checking Activate prioritized assignment

Next besides all below conditions you can also sort agents by Assign chat by operator priority also

Department settings

  • Minimum agent assignment priority - if you set this value other than 0 we will select operators only whois priority is higher or equal to defined number >=
  • Minimum chat priority for it being processed with prioritized assignment workflow - if you set value other than zero we will check that chat priority is > greater. If this condition is not met chat will not be processed by by prioritized assigned workflow.
  • Maximum chat priority for it being processed with prioritized assignment workflow - if you set value other than zero we will check that chat priority is < less. If this condition is not met chat will not be processed by by prioritized assigned workflow.

User settings

Assignment priority can be set in user account per department or department group.

User in his account has Min and Max chat priority for chat being assigned by my assign priority

  • Min chat priority - chats only with equal or higher priority will be assigned to that agent.
  • Max chat priority - chats only with equal or less priority will be assigned to that agent.
$appendSQLPriority .= ' AND (chat_max_priority = 0 OR chat_max_priority >= ' . (int)$chat->priority .') AND (chat_min_priority = 0 OR chat_min_priority <= ' . (int)$chat->priority .')';

Workflow cronjob influence

If you want auto assignment workflow to work independently of what visitor does (still on site or not) you have to be running workflow cronjob. I suggest in that scenario run cronjob every 5 seconds.

Disable live auto assignment

Usually auto assignment happens when visitor is waiting untill someone accepts a chat. If you are running workflow cronjob it makes sense uncheck this as cronjob will do this part. This also will make visitor UI feel faster.

Disable live auto assign option can be found here

System configuration -> Live help configuration -> Chat configuration -> Misc

How to deny the operator to open all pending chats?

By default operator can open all pending chats. Not only assigned to him. If you are using auto assignment workflow and do not want to allow an operator to open all pending chats just remove this permission.

'chat','open_all'

How to deny the operator to open all chats?

If you remove this permission operator will be able to open chats only where he is an owner.

'lhchat','allowopenremotechat'

How automatically open assigned chat for an operator?

  • You have to in user account check Automatically accept assigned chats
  • Operator has to have enabled Pending chats list enabled or My pending and active chats list enabled

How to show pending chats order from oldest to newest?

You can change pending chats order in chat configuration

How prioritise a chat to be assigned first if chat is waiting more than X amount of time?

This is usefull in case you are having long queue and chat's wait time becomes very long. As an example if chat is waiting more than 10 minutes you want it to be assigned first.

Navigate to

System configuration -> Chat configuration > Misc

Enter value for this field Chats waiting in pending queue more than n seconds should be auto-assigned first. Time in seconds'

Sample

To user explicitly has to be assigned department. It's not enough just check all departments. Within each department have to be checked department.

Department adjustment

You have in department "Auto assignment" secion enable automatic chats transfer.

Users adjustment

By default users sees all pending department chats. To disable that and show only to him assigned pending chats you have to

  • Edit user and in "Pending chats" tab, uncheck "User can see all pending chats, not only assigned to him"
  • By default operators do not have permission to choose what pending chats they can see. You can grant permission to choose them personally what list he want's to see. Assigned to operators role permission
  • "lhuser" => "allowtochoosependingmode" | "Users, groups management" => "Allow user to choose what pending chats he can see, only assigned to him or all."
  • User has to be online for chat being assigned to him
  • If you want that assigned chat would be opened automatically for user. User in his account has have checked "Chats" => "Automatically accept assigned chats"
    • If user does not see Chats tab in his account you have to give operators role this permission Module - (lhuser) Function - (allowtochoosependingmode)
  • Also in "Visible lists" worh checking "My pending and active chats list enabled" so user would see new widget where only to him assigned active and pending chats would be presented. For user to be able to change what he sees he has to have this permission
    • Module - ('lhuser'), Function - ('change_visibility_list')

Chat acceptance workflow

  • click_notification - notification was clicked
  • click - widget was clicked or chat list
  • opened_chats - chat was loaded because it was opened before
  • alert_open - alert was shown and operator opened a chat
  • transfer_open_background - transferred chat was opened in background mode
  • transfer_open - transferred chat was opened
  • auto_accept - chat was auto opened because auto accept is turned on
  • auto_accept_transfer - transferred chat was auto opened because auto accept is turned on
  • view_clicked - chat in the view was clicked
  • support_chat - opened from support_chats list
  • start_chat_by_id - chat was started by startChatByID function
  • channel_message_open - opened by received channel message
  • channel_message_reload - opened by received channel channel message
  • popup_open - chat was opened from popup