JS API - Add Method to Detect Current Department

Respondida

8 Comentários

  • Ramin Shokrizadeh
    Ações de comentário Permalink

    Hi there Zac,

    Thanks for sharing the use case and being very descriptive on your use case. Unfortunately, we are not planning on expanding the JS APIs for the remainder of the year as we are focusing the team's energy on other initiatives. But if that changes, we will let you know here. 

    Thanks,

    Ramin

    0
  • Ramin Shokrizadeh
    Ações de comentário Permalink

    Forgot to mention that the Web SDK (for Premium customers to build a custom widget) has the API to get the visitor's default department: https://api.zopim.com/web-sdk/#zchat-getvisitordefaultdepartment

    0
  • Zac
    Ações de comentário Permalink

    Thank you Ramin!

    0
  • Diego Hernandez
    Ações de comentário Permalink

    Hello, any updates on this topic?
    Our team has fully moved to the zE Chat API: https://developer.zendesk.com/embeddables/docs/widget/chat

    And we are still missing a function which allows to get the department that user has currently selected / where he is currently chatting.

    Similar methods from the API are:

    • get chat:department --> but this one requires that you pass a department as string in order to get its status
    • get chat:departments --> but this one only returns an array of all existing departments and their status

    We need a way to find out which is the currently selected department so we can update the info on the Web Widget via

     zE('webWidget', 'updateSettings', function()});

    thanks,

     

    Diego

    0
  • Ramin Shokrizadeh
    Ações de comentário Permalink

    Hi Diego,

    We have no immediate plans to offer a Javascript to get the current department of the visitor.

    Can you elaborate on why you need this API and what you are trying to achieve with it?

    Thanks,

    Ramin

     

    0
  • Diego Hernandez
    Ações de comentário Permalink

    Hi Ramin,

    And thanks for the swift reply!

    What we are trying to achieve is the following:

    We have set up 2 departments in the Widget Dashboard and visitors to our website who might require being served in either of these departments all start the Widget (Launcher) on the same URL of our website.

    Then the user gets presented with a prechat form where they select one of the two available departments from the drop-down.

    What we want to achieve is to update the settings of the widget (Title, Concierge, auto-message sent) according to the department the user has selected in the prechat form

    The pseudcode would be to set a "getCurrentDepartment" method (the one we are missing) within the on:connected callback which loads at each pageload and update the settings (zE('webWidget', 'updateSettings'..) accordingly.

    Any ideas on how this could be achieved?

    Thanks!

    Diego

    0
  • Patrick Bosmans
    Ações de comentário Permalink

    Hello Diego,

    Unfortunately, this is not currently possible as there is no API to get the selected department.

     

    0
  • Ramin Shokrizadeh
    Ações de comentário Permalink

    Hi Diego,

    Thanks for sharing your use case and what you are trying to achieve. Most customers (especially when the business does not want to surface the department categorisation to the website visitors) who want to do what you are asking for do it via logic/selection within their website and not within the widget itself.

    So your visitor would select their department/category selection from a form on your website/HC and then the next step would apply the changes/pre-fill information on the widget using the currently available Javascript APIs.

    The same experience applies to custom ticket forms in the Web Widget, they won't change dynamically within the widget and usually are set via the JS API once a certain decision or action has been made on the host website.

    -Ramin

     

    0

Por favor, entrar para comentar.

Powered by Zendesk