Answer the question
In order to leave comments, you need to log in
How to send a username in an online chat from Bitrix 24?
On the site I connected the js code of the online chat from Bitrix 24.
The user can be authorized on my site, I know his nickname, name, email.
How to "throw" his name in the Bitrix 24 chat?
Answer the question
In order to leave comments, you need to log in
It is possible to pass user data to the widget and Evgeny Shelenkov wrote about this (author)
2. For third-party systems (for example, your billing), you can use Javascript code, which also needs to be placed on the page where the widget is connected.
<script type="text/javascript"> window.BxLiveChatInit = function() { return { 'user': { 'hash': 'a588e1a88baf2013940b0b33b1eefc2d', // уникальный uid ползователя, замена авторизации 'name': 'Виктор', 'lastName': 'Иванов', 'avatar': 'http://shelenkov.com/images/avatar-ivanov.jpg', 'email': '[email protected]', }, 'firstMessage': "Виктор Иванов ([email protected]) [br]"+ "Код клиента: 12234[br]"+ "Сайт: "+location.hostname+"[br]"+ "Страница: [url="+location.href+"]"+(document.title || location.href)+"[/url]" // любой текст для оператора ол чатика }; } </script>
Pay attention to hash - this is a special field, a replacement for authorization.
It must be unique within your Bitrix24, so that there are no intersections.
For example: md5(USER_ID+_website_address_ + _secret_code_)
This code must both identify the user and not be picked up from the street.
The firstMessage field is optional, you don't have to configure it, then the link of the page from which the client started the call will be sent to the operator.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question