Búsquedas recientes
No hay búsquedas recientes
Open widget programmatically
Publicado 10 feb 2023
The use case is to programmatically open the Zendesk widget on certain actions in our dashboard, and prefill the customer's information.
I'm using a React library(https://github.com/B3nnyL/react-zendesk) as a wrapper over the Zendesk web widget API.
I'm trying to programmatically open the widget, using the wrapper as
ZendeskAPI("webWidget", "show");
This internally calls the Zendesk API aszE('webWidget', 'show');
But, the widget doesn't display. I'm also trying to use the prefill function like below, which also doesn't work.
zE('webWidget', 'prefill', {
name: {
value: 'isamu',
readOnly: true // optional
},
email: {
value: 'isamu@voltron.com',
readOnly: true // optional
},
phone: {
value: '61431909749',
readOnly: true // optional
}
});
I have confirmed that the Zendesk script has loaded and the widget also appears on the page. Only these programmatic triggers aren't working.
0
3
3 comentarios
Christopher Kennedy
0
Anbarasi U
I tried this earlier and it didn't work. But on the other hand, I went through the docs again, and found I need to use `zE('webWidget', 'open');` instead to pop open the chat window. This seems to be working. Thanks for your reply.
0
Christopher Kennedy
When you try to call the show API (
zE('webWidget', 'show');
) from the browser console, does the widget still not appear?0
Iniciar sesión para dejar un comentario.