Route chat to Department 2, when department 1 is offline
Hey there,
Hoping someone might be able to help me with some javascript code for chat in the web widget.
My customer has departments set up and the pre-fill form visible on chat. This is what they are attempting to achieve:
Basically we want to always have the option to select the department, including the prefill forms regardless of offline/online status. Only in the case where sales team is offline or unavailable then force the routing to the customer service team but still allow the drop down and prefill form details..
I've been playing around with certain parts of the chat javascript api but haven't had much luck with getting this to work.
Is it because chat by design pushed the customer to leave a message (which is created into a ticket) instead of route to a different department?
here's my code from my last test:
<script>
zE(function() {
$zopim(function() {
$zopim.livechat.setOnConnected(function() {
var department_status = $zopim.livechat.departments.getDepartment('Help');
if (department_status.status == 'offline') {
// Route to IT Support Department
$zopim.livechat.departments.setVisitorDepartment('IT_Support');
}
});
});
});
</script>
anyone have any thoughts on this at all?
Best,
Amie
Vous devez vous connecter pour laisser un commentaire.
0 Commentaires