Can I hide the department field on the pre-chat form?

Return to top

15 Comments

  • Chinh Phan

    Hi,

    I read both these urls:
    https://support.zendesk.com/hc/en-us/articles/115010352968
    https://support.zendesk.com/hc/en-us/articles/360022184994?page=1#comment_360004897033

    But it's still not work on my end.

    Code:
    var _urlConfig = {
    'en-us': {
    departments: {
    enabled: ['']
    },
    locale: 'en-us'
    },
    '__default': {
    departments: {
    enabled: ['']
    },
    locale: 'en-us'
    };

    I also try to update enabled: [''] to enabled: [] or remove enable field. But it's not work at all.

    0
  • Thomas (internalnote.com)
    Community Moderator

    The way to accomplish this is to define one default department in both the selected and enabled field:



    0
  • Chinh Phan

    I tried.

    The button is not say "Chat" any more. It says "Help"

    0
  • Thomas (internalnote.com)
    Community Moderator

    确保你提到的部门in the settings has

    1. Actually exists and is named identically in your Chat settings
    2. Has agents are available and online

    0
  • Chinh Phan

    Awesome, It hided.

    Many thanks

    0
  • Davide Gerevini cc

    Hi there

    We have two separate widgets each managed by a specific department (lets say Sales and Support).

    Following the guidelines above I was able to hide the department field on the pre-chat form of both widgets and set departments selection

    Problem is that now the widgets show the offline form (with its welcome message) only when all the agents are offline.

    For example If some of Sales agents are online and all Support agents are offline, both widgets show the pre-chat module and on the Support widget it sends an email once compiled instead of starting the chat (as expected but no explanation in the form). I would rather expect that the widget whose agents are offline would show the offline form.

    Moreover if I also add a script to load a custom badge image on one of the two widgets (the other one uses the image specified in the Chat setup)

    前面的设置似乎被忽略,博士op down menu for choosing the department appears again.

    Any help will be appreciated, thank you!

    0
  • Adrian Joseph Magboo
    Zendesk Employee

    Hi Davide,

    Good day! It looks like you've assigned a department to each of your widgets and you would like to set the widget status depending on the status of the department assigned.

    If this is the case, you can use the API script mentioned hereCan I configure the Web Widget to present Chat on my webpage only when a specific department is online?

    I hope this helps.

    Regards,

    Adrian

    0
  • Davide Gerevini cc

    Hey Adrian

    This worked beautifully, thank you! I totally missed that script.

    Thanks again,

    Davide

    0
  • Jon Gallez

    Are there plans to have the widget remember or automatically collect data from existing users?

    0
  • Dane
    Zendesk Engineering
    Hi Jon,

    Authenticated users have all the data of the their current profiles. This can automatically be done if your Help Center will require users to sign in.

    Another option is to useEnabling authenticated visitors in the Chat widget.
    0
  • Steven Hampson

    Hi, I used the above code and it worked fine on our Help Center. However, we are using a link to Chat on our website, instead of the widget, and department still shows when clicking the link.

    I urgently need to get this hidden. How can I update it so that it will no show department from the link either please. The link we are using is:

    https://static.zdassets.com/web_widget/latest/liveChat.html?v=10#key=subdomain.zendesk.com

    Thanks,

    Steven.

    0
  • Thomas (internalnote.com)
    Community Moderator

    Hey, you have no control over the webpage where this code loads, so you can’t use the custom widget code there.
    Best practice is embedding the widget code on your website directly in the head or footer.

    0
  • Steven Hampson

    Thomas (internalnote.com)Thanks for clarifying!

    0
  • Kayoko HAYASHI

    Hi, I try to filter the departments in widgets.

    But department is not shown if both the selected and enabled propety set.
    When function sets either fields, department is shown.

    The following code does not work:

    "hr" is shown in department but default value is "---":

    0
  • 詹姆斯·G
    Hello Kayoko,

    Yes, this is expected behavior. When there's only one option for a department and it is already selected, then the chat department field becomes hidden since the visitors won't be able to interact with it. Also, the department is automatically set in this kind of configuration so in your case, the chat department "hr" is automatically set.
    0

Pleasesign into leave a comment.

Powered by Zendesk