Views: 1380
Last Modified: 27.04.2023
Application for sidebar
Embedding code: IM_SIDEBAR
You can create applications that add additional scenarios for chat. For example, for separate drive for chat or a knowledge base.
Parameters
Parameter |
Required |
Description |
iconName |
Yes |
Icon class name in the format Font Awesome (for example, fa-cloud). |
context |
No |
Chat type to embed the app (ALL by default). Supports the multiple selection via ; of the following values:
- USER – all user chats, excluding bots;
- CHAT – all group chats, except lines and crm;
- LINES – chat type lines (open channels);
- CRM – only chats created within CRM;
- ALL – all chats.
|
role |
No |
Application is available for this user role (USER by default). Supports the following values:
- USER – application is available for all users;
- ADMIN – application is available only for Bitrix24 administrators.
|
color |
No |
Color. Available values: RED, GREEN, MINT, LIGHT_BLUE, DARK_BLUE, PURPLE, AQUA, PINK, LIME, BROWN, AZURE, KHAKI, SAND, ORANGE, MARENGO, GRAY, GRAPHITE.
|
extranet |
No |
Application is available for extranet users (N by default). Supports the following values:
- N – application is unavailable for extranet users;
- Y – application is available for extranet users.
|
|
This embedding has a current opening context, passed via current chat's dialogId.
const context = BX24.placement.info().options;
Application will simulate the sidebar operational scenario (opens slider, repeating the sidebar details layer).
Call example:
CRest::call(
'placement.bind',
[
'PLACEMENT' => 'IM_SIDEBAR',
'HANDLER' => 'https://example.com/apps/immarket/handlers/sidebar.php',
'LANG_ALL' => [
'ru' => [
'TITLE' => 'Application for sidebar',
],
],
'OPTIONS' => [
'iconName' => 'fa-bug',
'context' => 'USER;LINES',
'role' => 'ADMIN',
'color' => 'AQUA',
'extranet' => 'N',
]
]
);