Datasets contain information on invoices, estimates, products, and other items. Each item has multiple datasets that automatically include both standard and custom fields. Use these datasets to create charts and analyze business performance indicators.
In this article, we'll explore datasets for invoices and estimates. Learn how to blend them and how to create charts.
Datasets:
Examples:
Datasets
To start analyzing data on a dashboard, select a dataset and create a chart based on it.
Invoices — crm_dynamic_items_31: This dataset provides information about invoices such as amounts, statuses, deadlines, and responsible employees. You can find out each invoice's stage, who created it, and which client is linked to it.
Invoices — crm_dynamic_items_31
Field | Description | Data type |
---|---|---|
ID | Invoice ID | Number |
XML_ID | External invoice ID | String |
TITLE | Invoice name | String |
CREATED_BY_ID | ID of the user who created the invoice | Number |
CREATED_BY_NAME | Name of the user who created the invoice | String |
CREATED_BY | ID and name of the user who created the invoice | String |
UPDATED_BY_ID | ID of the user who last modified the invoice | Number |
UPDATED_BY_NAME | Name of the user who last modified the invoice | String |
UPDATED_BY | ID and name of the user who last modified the invoice | String |
MOVED_BY_ID | ID of the user who changed the stage | Number |
MOVED_BY_NAME | Name of the user who changed the stage | String |
MOVED_BY | ID and name of the user who changed the stage | String |
CREATED_TIME | Creation date and time | Date |
UPDATED_TIME | Change date and time | Date |
MOVED_TIME | Stage change date and time | Date |
CATEGORY_ID | Pipeline ID | Number |
CATEGORY_NAME | Pipeline name | String |
CATEGORY | Pipeline name and ID | String |
OPENED | Shows whether the invoice is available to all employees ("Y") or not ("N") | String |
STAGE_ID | Stage ID | String |
STAGE_NAME | Stage name | String |
STAGE | Stage name and ID | String |
PREVIOUS_STAGE_ID | Previous stage ID | String |
BEGINDATE | Start date and time | Date |
CLOSEDATE | End date and time | Date |
COMPANY_ID | Company ID | Number |
COMPANY_NAME | Company name | String |
COMPANY | Company name and ID | String |
CONTACT_ID | Contact ID | Number |
CONTACT_NAME | Contact name | String |
CONTACT | Contact name and ID | String |
OPPORTUNITY | Expected amount | Number |
IS_MANUAL_OPPORTUNITY | Shows whether the expected amount was entered manually ("Y") or not ("N") | String |
TAX_VALUE | Tax | Number |
CURRENCY_ID | Invoice currency ID | String |
OPPORTUNITY_ACCOUNT | Amount in reporting currency | Number |
TAX_VALUE_ACCOUNT | Tax in reporting currency | Number |
ACCOUNT_CURRENCY_ID | Reporting currency ID | String |
MYCOMPANY | My company name and ID | String |
MYCOMPANY_ID | My company ID | Number |
MYCOMPANY_NAME | My company name | String |
SOURCE_ID | Source ID | String |
SOURCE_NAME | Source name | String |
SOURCE | Source name and ID | String |
SOURCE_DESCRIPTION | Source description | String |
ASSIGNED_BY_ID | Responsible person's ID | Number |
ASSIGNED_BY_NAME | Responsible person's name | String |
ASSIGNED_BY | Responsible person's ID and name | String |
WEBFORM_ID | Source CRM form ID | Number |
Estimates — crm_quote: This dataset contains data about estimates, including amounts, statuses, deadlines, and responsible employees. It includes information about companies, deals, and contacts linked to the estimate. Use this data to track the status of estimates and analyze their progress through stages.
Estimates — crm_quote
Field | Description | Data type |
---|---|---|
ID | Estimate ID | Number |
DATE_CREATE | Estimate creation date and time | Date |
DATE_MODIFY | Estimate change date and time | Date |
CREATED_BY_ID | ID of the user who created the estimate | Number |
CREATED_BY_NAME | Name of the user who created the estimate | String |
CREATED_BY | ID and name f the user who created the estimate | String |
MODIFY_BY_ID | ID of the user who last modified the estimate | Number |
MODIFIED_BY_NAME | Name of the user who last modified the estimate | String |
MODIFIED_BY | ID and name of the user who last modified the estimate | String |
ASSIGNED_BY_ID | Responsible person ID | Number |
ASSIGNED_BY_NAME | Responsible person name | String |
ASSIGNED_BY_ID | Responsible person ID and name | String |
ASSIGNED_BY_DEPARTMENT | Responsible person's department | String |
OPENED | Shows whether the item is available to everyone ("Y") or not ("N") | String |
LEAD_ID | Lead ID | Number |
DEAL_ID | Deal ID | Number |
COMPANY_ID | Company ID | Number |
COMPANY_NAME | Company name | String |
COMPANY | Company ID and name | String |
CONTACT_ID | Contact ID | Number |
CONTACT_NAME | Contact name | String |
CONTACT | Contact ID and name | String |
PERSON_TYPE_ID | Payer type ID | Number |
MYCOMPANY_ID | Estimate issued by company ID | Number |
MYCOMPANY_NAME | Estimate issued by company name | String |
MYCOMPANY | Estimate issued by company ID and name | String |
TITLE | Estimate name | String |
STATUS_ID | Status ID | String |
STATUS_NAME | Status name | String |
STATUS | Status | String |
CLOSED | Shows whether the estimate is closed ("Y") or not ("N") | String |
OPPORTUNITY | Expected amount | Number |
TAX_VALUE | Tax | Number |
CURRENCY_ID | Currency | String |
OPPORTUNITY_ACCOUNT | Amount in reporting currency | Number |
TAX_VALUE_ACCOUNT | Tax in reporting currency | Number |
ACCOUNT_CURRENCY_ID | Reporting currency | String |
COMMENTS | Comments | String |
BEGINDATE | Date estimate opened | Date and time |
CLOSEDATE | Date estimate closed | Date and time |
QUOTE_NUMBER | Estimate number | String |
CONTENT | Estimate text | String |
TERMS | Conditions | String |
LOCATION_ID | Location | Number |
UTM_SOURCE | Ad source, UTM_SOURCE in the estimate form | String |
UTM_MEDIUM | Ad medium, UTM_MEDIUM in the estimate form | String |
UTM_CAMPAIGN | Ad campaign, UTM_CAMPAIGN in the estimate form | String |
UTM_CONTENT | Ad content, UTM_CONTENT in the estimate form | String |
UTM_TERM | Ad term, UTM_TERM in the estimate form | String |
Estimate: products — crm_quote_product_row: This dataset includes information about products in estimates, including names, prices, discounts, taxes, and quantities. The data helps analyze what estimates include and track changes in product prices and quantities.
Estimate: products — crm_quote_product_row
Field | Description | Data type |
---|---|---|
ID | Product ID | Number |
QUOTE_ID | Estimate ID | Number |
QUOTE_DATE_CREATE | Estimate creation date and time | Date |
QUOTE_CLOSEDATE | Estimate closure date and time | Date |
PRODUCT | Product name and ID | String |
PRODUCT_ID | Product ID | Number |
PRODUCT_NAME | Product name | String |
PRICE | Product price | Number |
PRICE_EXCLUSIVE | Discounted price without tax | Number |
PRICE_NETTO | Price without discount or tax | Number |
PRICE_BRUTTO | Price with tax, but without discount | Number |
QUANTITY | Product quantity | Number |
DISCOUNT_TYPE | Discount name and ID | String |
DISCOUNT_TYPE_ID | Discount ID | Number |
DISCOUNT_TYPE_NAME | Discount name | String |
DISCOUNT_RATE | Discount percentage value | Number |
DISCOUNT_SUM | Discount amount | Number |
TAX_RATE | Tax percentage rate | Number |
TAX_INCLUDED | Shows whether tax is included in price ("Y") or not ("N") | String |
CUSTOMIZED | Shows whether the product was modified manually ("Y") or not ("N") | String |
MEASURE | Unit of measurement ID and name | String |
MEASURE_CODE | Unit of measurement ID | Number |
MEASURE_NAME | Unit of measurement name | String |
SORT | Sorting order | Number |
PARENT | Product section | String |
SUPERPARENT | Parent product section | String |
SUPERSUPERPARENT | Parent of parent product section | String |
How to create a chart
Use datasets to create charts and track the number and stages of estimates. The charts will show the dynamics of working with estimates and their distribution among responsible employees.
Go to the BI Builder and follow these steps:
- Open the Charts tab.
- Click + Chart.
- Select the dataset from the list. If you don't see the one you need, click Add a dataset to create a new one.
How to create a dataset - Choose a format for showing the data: big number, table, line chart, or others.
- Click Create new chart.
How to blend datasets
Combine data on estimates and products to see which products are included in each estimate.
Go to the BI Builder and do the following:
- Go to SQL > SQL Lab.
- Select the bitrix24 scheme.
- Enter the SQL query and click Run.
The new set includes information from the fields that you specified in the SQL query. You can save it as a dataset to create a chart for the dashboard.
Create a chart based on a virtual dataset
If you're blending datasets for the first time, refer to the sample query.
Example of an SQL query
Here's an SQL query to extract data from two datasets: estimates (crm_quote) and products in estimates (crm_quote_product_row). The query will show data about the responsible employee, estimate names, product quantities, and prices. Replace the employee's name with the desired one before running the query.
SELECT crm_quote.ID AS "Estimate ID", crm_quote.TITLE AS "Estimate name", crm_quote.ASSIGNED_BY_NAME AS "Responsible person", crm_quote_product_row.PRODUCT_NAME AS "Product name", crm_quote_product_row.QUANTITY AS "Quantity", crm_quote_product_row.PRICE AS "Price" FROM crm_quote LEFT JOIN crm_quote_product_row ON crm_quote.ID = crm_quote_product_row.QUOTE_ID WHERE crm_quote.ASSIGNED_BY_NAME = 'Justin Testard';
SELECT: Chooses which data to extract. For example, the SELECT crm_quote.ID AS "Estimate ID"
part does the following:
- Selects the estimate
ID
from thecrm_quote
dataset - Assigns it the name
Estimate ID
- Displays the result in a separate column
FROM: Specifies the main table for the query, such as the crm_quote
table containing information about estimates.
LEFT JOIN: Connects the crm_quote
table to crm_quote_product_row
. The query connects estimates to products added to the estimate forms.
WHERE: Filters the query results to display only a specific employee's estimates. The condition WHERE crm_quote.ASSIGNED_BY_NAME = 'Justin Testard';
shows estimates this employee is responsible for. To view estimates of all employees, remove the WHERE condition.
In brief
-
Datasets contain information on invoices, estimates, products, and other items.
-
Each item has multiple datasets that automatically include both standard and custom fields.
-
There are three datasets for invoices, estimates, and products in estimates: invoices (crm_dynamic_items_31), estimates (crm_quote), and products in estimates (crm_quote_product_row).
-
Use datasets to create charts and analyze metrics such as the number of created estimates, work dynamics, and distribution among responsible employees.
-
Blend datasets to see which products are included in estimates and track their changes. To do this, write an SQL query, save the result as a dataset, and create a chart.