top_en
Main page

Bitrix24Care

Live chat identification of authorized users

Rating:
We have recently released a new option for Bitrix24 live chat users - the system will automatically asks your website visitor's for email, name & phone number via 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 to identified 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.


<sc ript 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
    };
  }
</sc ript>


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 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