top_en
Main page

Bitrix24Care

Live chat identification of authorized users

Rating:
In Bitrix24 live chat, the system will automatically ask your website visitors for an email, name & phone number via a special contact form. But if you have own authorization system on your website, it may not be necessary to ask your clients to provide their email & name once again.

Here is how you can make Bitrix24 live chat identify clients authorized on your website: you can use Javascript code, which you have to place on the same page where Bitrix24 live chat is connected.


<script type="text/javascript">
  window.BxLiveChatInit = function()
  {
    return {
        'user': {
            'hash': 'a588e1a88baf2013940b0b33b1eefc2d', // user unique ID 
            'name': 'Ann', 
            'lastName': 'Young',
            'avatar': 'http://images.com/images/avatar.jpg',
            'email': 'young@mail.com',
        },
        'firstMessage': "Ann Young (young@mail.com) [br]"+
                        "Client code: 12234[br]"+
                        "Website: "+location.hostname+"[br]"+
                        "Page: [url="+location.href+"]"+(document.title || location.href)+"[/url]" // a 
message text that will be shown to the live chat responsible user
    };
  }
</script>

Please pay attention to hash - special field that will replace authorization. It should be a unique code for your Bitrix24. For example: md5(USER_ID+_website_address_ + _secret_code_).
This code should be unique (identify user) and secure (simple codes can be hacked).

A firstMessage field is not mandatory. You can skip it, in this case, live chat responsible user will receive website page URL - form where your client has started the conversation.

This helped Thanks :) This didn't help Sorry :(
Could you please tell us why:
It's not what I'm looking for
It's too complicated

Did not find an answer to your question?

Send your question to the Bitrix24Care team
Access to technical support specialists requires commercial plan subscription and is not available to free account users. Free accounts are limited to self-support resources such as product manuals, helpdesk articles, video tutorials, and free webinars. Technical assistance, training, setup, customization and other value added services can also be purchased directly from local Bitrix24 partners