API function to send message to visitor

Answered

17 Comments

  • James Peterson
    Comment actions Permalink

    Hi Zoltan,

    Have you considered using something like tags?  You could set them with the JS API and then have the triggers fire based on the tags that are set.

    James Peterson

    0
  • Rupert R
    Comment actions Permalink

    The fact that this isn't available already is frankly ridiculous. 

    0
  • James Peterson
    Comment actions Permalink

    Hi Rupert,

    Could you provide a bit more detail about what your workflow is and how you would like to use this proposed functionality?  Unfortunately reading that something being unavailable is ridiculous is not very helpful for understanding why you feel that way.  There might even already exist a method to accomplish your goals, so I'd like to hear more about the problem you are trying to solve.

    0
  • Rupert R
    Comment actions Permalink

    Hi James, 

    I'd like an equivalent to the trigger functionality to send a message to users when certain conditions are met. As Zoltan has said - just the opposite of the "Say" API function, putting words in the mouth of a user is occasionally useful but being able to send messages to users with more control than by using triggers would be helpful. 

    0
  • James Peterson
    Comment actions Permalink

    Hi Rupert,

    Thank you for taking the time to elaborate.  I'd like to get a bit more detail if possible.  What situations do you find in which you would need to send messages to the visitor as an agent? 

    0
  • Patrick
    Comment actions Permalink

    Hey James,

    I'd dig that feature, too. It would allow for us to determine the points at which auto-messages are triggered instead of having to rely on building triggers for everything.

    Say someone logs in to our site and haven't checked out a new feature. We could send them a message inviting them to check out the new feature.

    Even something as simple as the following would be ideal: 

    $zopim.livechat.sendMessage({
      "from": "Patrick",
      "message": "Hey there! Check out XXXXXXX"
    });

    It would put less burden on your end to maintain logic for the triggers and create a much more flexible and valuable tool. As a developer, I'd be super stoked to have that feature. Like, insanely stoked.

    Pleeeeeease... I would honestly send y'all a thank you card.

    2
  • Michael Stone
    Comment actions Permalink

    +1,000,000 on Patrick's message. I would also send many thank you cards.

    0
  • Yunen Yeo
    Comment actions Permalink

    Hi there,

    I understand that this API is highly requested, however the reason why it hasn't been implemented yet is because of security purpose. There is no way right now for the JS API to authenticate the user sending the JS API, and it would not be right for anyone to spoof an agent to send a message via the JS API. We are currently thinking of how to build an authenticate system with our JS API, but it is not planned for the next 3-6 months. 

    Thank you all for your understanding.

    0
  • Mauro Garcia Dutra
    Comment actions Permalink

    Hello Yunen,

    You are completely right, security is a must and authenticating requests made thru JS API must be done. 

    But I also need the same exact $zopim.livechat.sendMessage() function as described by Patrick. So allow me to suggest to either passing in "username":"password" or "token":"session_id" parameter to this call. Now the responsibility of keeping this JS data safe on our websites falls on us. Since JS is the least secure environment, perhaps we can make a quick ajax call to our server and there make a call to Zopim REST API which would return an temporary token for the given chat session, then we would have a very brief time window to make our $zopim.livechat.sendMessage() call before the token expired. I know it sounds like a contortion, but it would solve the authentication issue. Getting a token is better than trying to hide Zopim username and password in JS on the client side.

    Thank you,

    Mauro

    https://developer.zendesk.com/rest_api/docs/zopim/introduction

    0
  • Junaid Mansoor
    Comment actions Permalink

    Hello Yunen,

     

     

    There is another way, to implement this, is don't put this on clientside api instead, give option to white list IPs and only a server with whitelist IP can send this message from server side request with client name or email address or any other client identifier 

     

     

    it's highly recommended change. Believe me, if you will bring this change you can bring a big change in industry...

     

    i remember, some body told me this is possible with olark, but again with trigger

    0
  • Yunen Yeo
    Comment actions Permalink

    Hi all,

    Thank you very much for giving your feedback and helping us understand why this request is so important to you. Right now, I am not able to promise you that we will work on this, but we will discuss within the team, and should we have any updates, we will update this thread.

     

    0
  • Abhay Verma
    Comment actions Permalink

    Hey Yunen,

    Any update on the request for functionality to send a message to users??

    0
  • Yunen Yeo
    Comment actions Permalink

    Hi Abhay,

    Unfortunately no. We have no plans for this right now. I know this is a much requested for feature, but in order to do it right (security concern), we need to build a proper framework for this, and right now this is not currently on our roadmap.

    You can still make use of our triggers to send message to users. One way is to set a tag on a user that you would want to send a message, then set up a trigger to read that tag and sends the message.

    0
  • Fabio
    Comment actions Permalink

    Hey @Yunen,

    I totally get the security concern.

    I saw that @James wrote that is possible using tags already. I checked and there doesn't seem to be a trigger for when a tag is added. Am I missing something here? Any plans to add more triggers btw ? :)

     

    Cheers,

    Fabio.

    0
  • Yunen Yeo
    Comment actions Permalink

    Hey Fabio,

    You can check visitor tag as a condition to fire a trigger:

    I'm afraid no plans at the moment to add more triggers :(

    0
  • Fabio
    Comment actions Permalink

    Hey Yunen,

     

    thank you very much for your reply! Yeah, I was a bit confused with Visitor tag and chat tag... I thought I would not be able to get the tag from the visitor. It works, but it needs a trick

    But yeah... that works, but it needs a trick actually because the actual trigger is for "message sent" not tag added. So I'm adding the tag and sending an empty message myself via JS API to make sure it gets triggered.

    Is there a way to register for updates or beta releases? :)

    0
  • Yunen Yeo
    Comment actions Permalink

    Hi Fabio,

    You can subscribe to our Announcements here: https://chat.zendesk.com/hc/en-us/sections/202978957-Announcements

    Just click on the follow button on the right :)

    0

Please sign in to leave a comment.

Powered by Zendesk