Open widget programmatically



2023년 2월 10일에 게시됨

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 as
zE('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

}

});
 
Is there any additional configuration to be enabled from our account?
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개

No problem!

0


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


Hi Anbarasi,
 
When you try to call the show API (zE('webWidget', 'show');) from the browser console, does the widget still not appear?

0


댓글을 남기려면 로그인하세요.

원하는 정보를 못 찾으셨나요?

새 게시물