Bitrix24: direct connection
You will create a connection to a demo Bitrix24 data source and get familiar with the dashboard and charts built by Bitrix24 based on DataLens. You will also learn to work with datasets, charts, and dashboards.
To visualize and explore data, set up DataLens and follow the steps below:
- Create a connection to Bitrix24.
- Review the dashboard and charts.
- Review the dataset. Create your dataset and chart.
Getting started
To get started with DataLens:
- Log in
to your Yandex account. If you do not have an account, create one. - Open the DataLens home page
. - Click Open DataLens.
- Confirm that you have read the Terms of use
and click Log in.
-
Log in
to your Yandex account. -
Open the DataLens home page
. -
Click Open DataLens.
-
Select one of the options:
-
If you already have an organization, select it from the drop-down menu in the Organizations tab and click DataLens.
Note
To activate a DataLens instance, the user must have the
admin
orowner
role. For more information about roles, see Access management in Yandex Cloud Organization. -
If you have a cloud but no organization, click Add new DataLens. In the window that opens, enter your organization's name and description and click Create organization and DataLens. For more information about working with organizations, see Getting started with organizations.
-
If you have any technical questions about the service, contact Yandex Cloud support
Step 1. Create a connection to Bitrix24
-
Go to DataLens
. -
In the left-hand panel, select
Connections and click Create connection. -
Select the Bitrix24
connection type.Selecting a connection type
-
To connect to a demo data source, specify:
- Portal:
gds.office.bitrix.ru
. - Token:
wJZIFjdYtbLRtfewYcnq71oSFyEgxlbQ
.
When connecting to a working Bitrix24 data source, specify:
- Portal: URL of your Bitrix24 portal in
test.bitrix24.ru
format. - Token: Get a secret key in Bitrix24 by selecting CRM → Analytics → BI analytics in the Yandex DataLens tab. For more information, see this guide
.
Leave the Automatically create a dashboard, charts, and a dataset on the connection option enabled.
- Portal:
-
Check the connection and click Create connection.
Creating a Bitrix24 connection
-
Enter a name for the connection, e.g.,
Bitrix24
, and click Create.Once the connection is created, the Bitrix24 folder will open the demo Bitrix24 dashboard and nested Leads and Deals folders with datasets and charts inside.
Step 2. Review the dashboard
In the Bitrix24 folder, open the Bitrix24 dashboard.
The dashboard is interactive, there you can:
- Set up a variety of filters.
- Sort rows in tables.
- Switch between charts.
- Drill down into charts.
You can see a copy of the main dashboard. Feel free to edit the dashboard as you see fit. For example, in the Leads tab, you can change the Dynamics in the number of leads by creation date chart and add it to the dashboard:
-
Click
in the top-right corner of the chart and select Edit.Editing a chart
-
Select a different chart type: Column chart.
Selecting a chart type
-
Drag the Source field to the Colors section.
The chart shows the number of generated leads across channels by month.
-
Save the chart as a new object:
-
Click
in the top-right corner and select Save as.Tip
To replace the source chart with the edited one on the dashboard, click Save in the top-right corner.
-
Enter
Number of leads by channel
as the new chart name and click Save.
-
-
Add the chart to the dashboard:
- Return to the tab with the dashboard and click Edit at the top of the page.
- Click Add and select Chart.
- In the Chart field, click Select.
- Select the Number of leads by channel chart. This will automatically fill in the Name field.
- Click Add. The widget will be displayed on the dashboard.
- Set up the size and position of widgets on the dashboard.
- Click Save to save your changes to the dashboard.
Step 3. Review the connection and dataset. Create your dataset and chart
-
Review the contents of the Bitrix24 folder. To do this, go back to the Bitrix24 folder: click
and select Bitrix24 in the navigation bar.Apart from the dashboard, the folder contains two nested folders with:
: Charts that visualize information as graphs and tables. : Dataset that describes a data model used to generate reports by lead.
-
Go to the Leads folder and open the Leads dataset.
The Fields tab displays a list of fields from the table selected in the source. Pay attention to the following columns:
- Name: Field name.
- Type: Field data type.
- Field source: Field in the source table or a formula for calculations (marked with the
icon). - Aggregation: Data aggregation function if it is applied to the field.
Viewing the Fields tab
The Source tab shows the following:
- Connection the dataset is based on.
- List of tables available in the source.
- Workspace for the tables selected as the source of dataset fields.
- Preview area for information from the selected tables.
Viewing the Sources tab
-
Go to the Deal folder and open the Deal dataset. Review the contents of the Fields and Sources tabs.
Create your dataset
To use the Bitrix24 connection data, you can create a custom dataset based on it.
-
Select Datasets in the navigation panel on the left.
-
Click Create dataset at the top right.
-
Go to the Sources tab.
-
Under Connections, click
Add and select the previously created Bitrix24 connection. -
Drag the crm_activity table to the workspace. Wait for the data to load.
Choosing a table
-
Go to the Fields tab.
-
Create a record count field named
ID_COUNT
:-
Duplicate the
ID
field: hover over the row with the field, click at the end of the row, and select Duplicate.Duplicating a table field
-
Rename the
ID (1)
duplicate field toID_COUNT
: click the row name, delete the current name, and enter the new one. -
In the Aggregation column, select Count for the
ID_COUNT
field. As a result, the field will become a measure and change its color to blue.
Note
You can add and rename fields, create calculated fields, and add descriptions to them.
-
-
In the top-right corner, click Save.
-
Enter
Activity
as the dataset name and click Create.
Create a new chart
To visualize interaction by type, create a column chart.
-
When the dataset is saved, click Create chart in the top-right corner.
-
Select the Bar chart visualization type.
-
Add the types of customer contacts on the chart. To do this, drag the
TYPE_NAME
field from Dimensions to the X section. -
Add the number of interactions of each type to the chart. To do this, drag the
ID_COUNT
field from Measures to the Y section. -
Save the chart:
- Click
in the top-right corner and select Save. - Enter
Number of interactions by type
as the new chart's name and click Save.
- Click
Add a chart to your dashboard
Add the chart to your dashboard:
- In the Bitrix24 folder, open the Bitrix24 dashboard or create a new one.
- At the top of the page, click Edit.
- Click Add and select Chart.
- Choose the Number of interactions by type chart. This will automatically fill in the Name field.
- Click Add. The widget will be displayed on the dashboard.
- Set up the size and position of widgets on the dashboard.
- Click Save to save your changes to the dashboard.