Recent searches


No recent searches

Live Chat - Adding ids to iframes



Posted Mar 25, 2022

In the Classic version of zendesk Live Chat you have API method zE('webWidget:on', 'chat:unreadMessages', function(number<int>) {}); which gives possibility to react on receiving new messages. 
We want to switch to a new Live Chat and some of these methods are really needed for us. I am trying to achieve the same behavior with our own hooks, but it is really hard to track appearing iframes as they have only titles as identifiers, which can be translated depending on user locale. 
So my question is, is it possible to add some sort of ids to iframes?

Or there are any other workarounds how to achieve the same behavior as classic chat has? 


3

6

6 comments

image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Artem,
 
Thanks for posting your question to the Community! Unfortunately, there isn't a way to add ids to the iframe. Just to clarify though, when you say new live chat are you referring to Messaging? 
 
Also, if you're able to provide me with a bit more context about what you're trying achieve by tracking appearing iframes, then I may be able to help come up with a solution. Hope to hear back from you soon!
 
Best, 
 
Erica

0


Hi Erica, thank you for your reply

Yes, I refer to Messaging, as we want to start using it, instead of the Classic version.

So for example, in our approach, we want to hide the messaging icon, we will show it when user clicks a special button on our website. After user sends a message, he can close the chat, and messaging icon will disappear again, so we want to track the reply from support, so this icon will appear after user receives a message.

Hope it gives more sense now, and the question is there any way how to handle it? 

Thanks in advance 

1


Her Erica, the messenger API really sucks, just to be honest. There is zero way for us to hide the messenger without using the classic version. Much like Artem, we only want to the messaging icon to display when the user clicks on a help button in our application. However, we need zendesk messenger loaded into the dom so if support follows up on a ticket they get notified. 

0


Looks like the only way to really get around this at the moment is to modify the zIndex which I'm not a fan of but alas!

window.zE('messenger:set', 'zIndex', -9999);

0


Hey, Zendesk!

Is there any chance you can add the ID to the iframe?

0


image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Boris! We do have the iframe id on there already...is there something else that you're looking for?

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post