Support Center > Knowledge Base> Article: Supplying already known pre-chat fields

Supplying already known pre-chat fields

Article ID: 75518 Email Print
Question
Is it possible to supply and pre-fill on the pre-chat form already known information by our website such as customer name, email, etc?

Answer

You may easily supply pre-chat fields to be pre-filled within the pre-chat window so customer does not have to provide an already known by your website/service information.

Here are the easy steps:

  1. Make sure that every prechat field is linked to a CRM field in Admin panel->Chat system->Customization->Prechat requirements





  2. Include JavaScript object supplying known fields within LiveHelpNow live chat or helpOut tab button code like so:


    var lhnPreChatValues = {"full_name":"John Doe","email":"johndoe@johndoe.com","phone_number":"222-222-2222","website":"www.johndoe.com"};
    



    prefix field keys with a dash if you would like to disable customer's ability to edit the pre-chat field before submission like so:

    var lhnPreChatValues = {"-full_name":"John Doe","-email":"johndoe@johndoe.com","phone_number":"222-222-2222","website":"www.johndoe.com"};

    in the above examples customer will not be able to edit Name and Email fields and only phone number and website.

  3. The fields will now be pre-filled on the pre-chat form:





  4. Here's the list of all available fields for linking within JavaScript array:

    title
    first_name
    last_name
    full_name
    email
    company
    website
    phone_number
    street_address
    city
    state
    zip
    country
    inquiry
    inquiry_type
    custom_identifier_1
    custom_identifier_2
    custom_identifier_3
    custom_identifier_4
    custom_identifier_5
    custom_identifier_6
    custom_identifier_7
    custom_identifier_8
    custom_identifier_9
    custom_identifier_10



    If your website does not use JavaScript snippet for LiveHelpNow live chat button or helpOut tab code, you may also supply prechat values via chat window URL parameters like so:

    ...&pcv=%7b%22full_name%22%3a%22Michael%22%2c%22email%22%3a%22email@email.com%22%7d

    The above is a URL encoded JavaScript Array: {"full_name":"Michael","email":"email@email.com"}


Related articles

Article Details
Views: 5403 Created on: May 24, 2016
Date updated: Jul 27, 2016

Poor Outstanding