How to trigger a chat after the user clicks on the widget

Answered

2 Comments

  • Ramin Shokrizadeh
    Comment actions Permalink

    Hi Harvey,

    Although there is no native trigger condition to do what you want, you should be able to use a combination of two Javascript APIs to achieve what you want.

    First, you will want to use the https://api.zopim.com/files/meshim/widget/controllers/liveChatAPI/Window-js.html#$zopim.livechat.window.onShow callback URL to detect when the window is open. From there, you will want to add a tag using https://api.zopim.com/files/meshim/widget/controllers/LiveChatAPI-js.html#addTags.

    From there, you just create a trigger that fires based on the tag being present and just ensure that it is set to fire only once per visitor. 

    -Ramin

     

    0
  • Mohamed
    Comment actions Permalink

    Hello,

     

    So I've tried to apply the trick you recommended but the problem is that the tags wouldnt be added until the conversation is initiated (got this info from the zendesk support team). But even if they are added on the window show event before any messages are sent, the trigger is run when the widget is loaded ; meanwhile the tags are added when the widget is clicked so the tag condition would be never satisfied! Is there any way around this?

    Thanks a lot.

     

    -- Mohamed

    0

Please sign in to leave a comment.

Powered by Zendesk