Select chat department
AnsweredWe are trying to select the default chat department but it is only working when we pass the department name and not the department ID. We prefer no rely on IDs in case department names change in the future.
This is working:
window.zESettings = {
webWidget: {
chat: {
departments: {
enabled: [''],
select: 'Honduras - B2C'
}
},
helpCenter: {
searchPlaceholder: {'*': '¿En qué podemos ayudarte?'}
},
launcher: {
label: {'*': 'Ayuda'},
chatLabel: {'*': 'Ayuda'}
},
contactForm: {
title: { '*': 'Contáctanos' },
tags: ['url_hn','hn','widget_hn','widget_b2c','widget_hn_b2c']
},
contactOptions: {
enabled: true,
contactButton: { '*': 'Contactanos' },
chatLabelOnline: { '*': 'Chateá en vivo' },
chatLabelOffline: { '*': 'Chat no disponible' },
contactFormLabel: { '*': 'Escríbenos un correo' }
}
}
};
This is not working:
window.zESettings = {
webWidget: {
chat: {
departments: {
enabled: [''],
select: 1817723461
}
},
helpCenter: {
searchPlaceholder: {'*': '¿En qué podemos ayudarte?'}
},
launcher: {
label: {'*': 'Ayuda'},
chatLabel: {'*': 'Ayuda'}
},
contactForm: {
title: { '*': 'Contáctanos' },
tags: ['url_hn','hn','widget_hn','widget_b2c','widget_hn_b2c']
},
contactOptions: {
enabled: true,
contactButton: { '*': 'Contactanos' },
chatLabelOnline: { '*': 'Chateá en vivo' },
chatLabelOffline: { '*': 'Chat no disponible' },
contactFormLabel: { '*': 'Escríbenos un correo' }
}
}
};
In the 2nd one, chat arrives without a department.
Jorge
-
Hi Jorge,
Thanks for sharing this defect in the new experience, it is a bug. The developers have been notified and will work on the fix in the coming weeks.
Will update the thread when the fix is released.
Thanks,
Ramin -
Any updates on this?
-
Additionally, just to confirm, are these the correct lines for the following:
- We don't want to show the department drop-down in the widget (don't want our users to select or see the field)
- We want to select the department from the script
chat: {
departments: {
enabled: [''],
select: 'Honduras - B2C'
}For some reason, it is not working. The department is not selected, and the department field is displayed with all departments as possible options for selection.
-
Hi Jorge,
The fix to support department IDs got released two days ago. Let me know if it isn't working for you.
The code would look something like this: https://pastebin.com/Ut749Q1p
If you are calling it in console after the widget has loaded, ensure you are using the updateSettings API: https://developer.zendesk.com/embeddables/docs/widget/core#updatesettings
-Ramin
-
Thank you Ramin,
Can you please take a look at:
https://tigocare.zendesk.com/hc/es/community/topics
Two issues we are seeing:
(1) It didn't work with enabled: [''], but it did work with enabled: [0]. Which one is the supported one?
(2) Help center title code didn't apply. Are we coding it correctly?
Thanks!
-
Hi Jorge,
Script should look like this for the Chat specific changes you want: https://pastebin.com/rrXvvgib
If you need more assistance using the JS APIs, please email chat@zendesk.com
-Ramin
-
This code seems to work for me.
But I have further questions:
1. When as an admin i'm in status "INVISIBLE" I receive the notification of the chats... > No other user online...
2. I'm unable to select a default "FORM" even if in my code I explicitly ask for it:
contactForm: {
ticketForms: [{ id: 360001322560, title: false }]
}Complete code:
<script type="text/javascript">
zE('webWidget', 'setLocale', 'nl-nl');
window.zESettings = {
webWidget: {
color: <!-- WORKING OK -->
{
theme: '#CCFFE5'
},
chat: <!-- Seems to work -->
{
departments: {
select: ['nlnl']
},},
contactForm: <!-- WORKING OK -->
{
ticketForms: [{ id: 360001322560, title: false }]
}
}
};
</script> -
Hey Francois,
I'm going to bring this into a ticket so our Customer Care team can look into this with you.
You'll receive an email shortly stating your ticket has been created.
Cheers!
Please sign in to leave a comment.
8 Comments