How do I customize the pre-chat form?

Return to top

10 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 (internalnote.com)
    Community Moderator
    Zendesk Luminary

    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
  • Benedikt Badke

    Does the Zendesk Chatbot offer the possibility that a customer must select if he is a new customer or an existing client?

    0
  • Dainne Lucena
    Zendesk Customer Care

    Hi Benedikt Badke

     

    For the Classic Chat Widget, natively it's not possible since that would entail adding another field in the pre-chat form. It can be done by using the Chat SDK though. 

    0
  • Jarrod Greer

    At the bottom of every one of our webpages we have a unique session based identifier that is generated and displayed for the customer. It serves multiple purposes but the biggest thing it does for the company is help us identify orders that generated because of contact with our customer service team instead of being able to go straight to checkout without ever talking to anyone so that we can correctly attribute sales to various online marketing campaigns. Can we have a custom value submitted for chats and support tickets with or without the customer being aware? See the attached photo's. 

    0
  • Thomas (internalnote.com)
    Community Moderator
    Zendesk Luminary

    Hey,
    You can prefill custom fields in the Classic Web Widget via the following code, where 123456 is the ID of your Connect ID field. Note that the customer will see this value.

    <script type="text/javascript">
    zESettings = {webWidget: {
    contactForm: {
    fields: [
    { id: 2142225,
    prefill
    : { '*': 'My custom field text' }
    }
    ]
    }
    }};

    If you want it invisible, you'll need to use the Tag feature:

    <script type="text/javascript">
    window.zESettings = {
        "webWidget": {
            "contactForm": {
                "tags": [
                    "Connect ID"
                ]
            }
        }
    }
    </script>

     

    0
  • Lynn Voie

    Is there a way to change the order within the departments field? I would like to move "other question" to the bottom though it seems to only sort A->Z.

    0
  • Usman Saeed

    Can we add custom field to Pre-chat Form?

    2
  • Lisa Setford

    Great Question, we would also like to add a custom fields to the pre-chat form. For example, customers Post Code or prompt customer to provide a URL to product/item. 

    2
  • Arianne Batiles
    Zendesk Customer Care

    Hi Usman Saeed and Lisa Setford,

    While it's not natively possible to add fields in the pre-chat form, you may consider building a custom widget. 

    Web Widget (Classic), Chat-only Web Widget (Classic), and Legacy Chat widget  come with a standard pre-chat form that allows minor customization. The Web SDK can be used to add additional fields to the pre-chat form and render the values of these fields using a custom-built chat app.

    Please note that the Web SDK is no longer undergoing further development since September of 2021. If you're looking for a more versatile solution with added functionalities, switch to messaging and take advantage of Sunshine Conversations

    0

Please sign in to leave a comment.

Powered by Zendesk