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.
When you try to call the show API (
zE('webWidget', 'show');) from the browser console, does the widget still not appear?