How do I customize the pre-chat form?

Return to top
Have more questions? Submit a request

2 Comments

  • Sam Oh

    Hi,

    Like contactForm, is it possible to prefill the pre-chat form?

    prechatForm: {
       fields: [
          { id: 'name', prefill: {'*': 'John Doe'}},
          { id: 'email', prefill: {'*': 'JohnDoe@gmail.com'}},
       ]
    }
    1
  • Thomas Verschoren
    Community Moderator

    Hey,

    What you're looking for is the Identify feature of the Zendesk Widget API:

    https://developer.zendesk.com/embeddables/docs/widget/core#identify

    <script type="text/javascript">
      zE('webWidget', 'identify', {
        name: 'Lex Luthor',
        email: 'ceo@lexcorp.com',
        organization: 'LexCorp'
      });
    </script>

    Note:

    Organization is optional and requires an existing organization with that name in Zendesk Support/Chat

    0

Please sign in to leave a comment.

Powered by Zendesk