api.chat.setOperatorGroup
This method requires a premium plan that supports the Groups feature.
Lock the visitor to a specific group of operators. All messages from the
visitor will now go to that group of operators instead of all operators.
-
options.groupthe Group ID that you want to lock to (see the operator configuration page to find the Group ID)
Examples
When the visitor clicks the "Talk to our Sales Team" button, lock to the Sales Group specifically.
document.getElementById('talk-to-sales').onclick = function() {
olark('api.chat.setOperatorGroup', {group: 'abcdef123456789'});
olark('api.box.expand');
}
This example assumes that the Sales Group ID is 'abcdef123456789'.
Discussion
Feel free to propose good uses for this method, or even drop us some suggestions for improvement! You can also join our mailing list to collaborate with other developers and get updates from us.