The article content:
- How to make a request to the BI connector using a browser
- How to make a request to the BI connector using Postman
- Testing queries before creating a report
How to make a request to the BI connector using a browser
Use the following link:
https://account_name.bitrix24.com/bitrix/tools/biconnector/pbi.php?token=key_bi-connector&table=crm_deal
- 1. – Specify the account name.
- 2. – To view data from the Microsoft Power BI interface, use
pbi.php
. Typegds.php?data&
for Looker Studio, formerly known as Google Data Studio. - 3. – Enter your token from the Analytics section - BI Analytics - Key Management.
- 4.– Add the entity from which you want to retrieve data. We use
crm_deal
i.e. the list of deals in our example.
After running the request, you will see a list of all the entity fields and data contained in your account. It will help you to understand what fields you have and what information they contain.
How to make a request to the BI connector using Postman
Working with the request in a browser can be inconvenient because of the large amount of data on the screen. We recommend trying the Postman app.
Read more information in the Postman documentation.
To create a request, click Create new collection > Add a request.
Select the Post method, add a request address: https://account_name.bitrix24.com/bitrix/tools/biconnector/pbi.php?table=crm_deal
. Specify the key in the body of the request and click Send.
You can see how fast the request is running and what data it contains.
Testing queries before creating a report
Before you create a report and upload data from leads, deals, and custom fields, we recommend testing queries in Postman.
If you are creating a report on deals for a month, and it may contain a lot of extra data that you do not need in the final report, try adding filters to the query. That way you will increase the data loading speed and the report will run fast.
If you need some dates and fields for a report and the deals should be filtered by creation date, you can use the following request:
"dateRange": { "startDate": "2023-03-22", "endDate": "2023-03-23" }, "configParams": { "timeFilterColumn": "DATE_CREATE" }, "fields": [ { "name": "ID" }, { "name": "DATE_CREATE" }, { "name": "DATE_MODIFY" } ]
- dateRange – specify the time interval in this parameter.
- configParams – type in the
DATE_CREATE
parameter to filter deals by creation date. - fields – specify the required fields. In our example, we use the following fields: deal id, date of creation and date of deal change.
After that, check the results, and correct the requst if necessary.
If you want to limit data sampling to certain rows or columns, you can add the dimentionsFilters
parameter to the request.
"dimensionsFilters": [ [ { "fieldName": "ID", "values": [581, 601], "type": "INCLUDE", "operator": "EQUALS" } ] ]
Read more about dimentionsFilters
and other options in the Looker Studio documentation.
In Looker Studio, filters are configured on the service side of the report, and you do not need to enter them manually. Microsoft Power BI also supports filters and parameters, but you need to add them in the advanced editor.
Read more information in the article: Filter report data by different dates in Microsoft Power BI.