Bitrix24 Helpdesk

Bitrix24 has a new interface. The images in the articles might differ from the current account design. We will update them soon.

BI Builder datasets: Workflows

Datasets contain information on workflows, SPA, employees, 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 workflows, 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.

Workflow assignments — bizproc_task: Provides information on workflow assignments, such as their names, types, statuses, and execution times. Use it in charts to track assignment completion.

Workflow assignments — bizproc_task

Field Description Type
ID Unique key Number
CODE_ID Assignment type ID String
CODE_NAME Assignment type name String
CODE Assignment type String
WORKFLOW_ID Workflow ID and parent workflow ID String
NAME Assignment name String
CREATED_DATE Date and time assignment was created Date
MODIFIED Date and time assignment was modified Date
DURATION Workflow execution time in seconds Number
APPROVE_TYPE Assignment approval type ID String
APPROVE_TYPE_NAME Assignment approval type name String
STATUS_ID Status ID Number
STATUS_NAME Assignment status name String
STATUS Assignment status ID and name String
USER_ID Assignment participant ID Number
USER_NAME Assignment participant name String
USER Assignment participant ID and name String

Workflow — bizproc_workflow_state: Includes information on active workflows, such as their statuses, execution times, and details about the users who started or edited them. Use it in charts to track start times and workflow progress.

Workflow — bizproc_workflow_state

Field Description Type
ID Unique key String
STARTED_BY_ID ID of the user who started the workflow Number
STARTED_BY_NAME Name of the user who started the workflow String
STARTED_BY ID and name of the user who started the workflow String
STARTED Start date and time Date
COMPLETED Completion status, "Y" - completed, "N" - running String
DOCUMENT_ID Workflow element ID String
DURATION Workflow execution time in seconds Number
START_DURATION Time spent on getting the workflow to start Number
WORKFLOW_TEMPLATE_ID Template ID Number
WORKFLOW_TEMPLATE_NAME Template name String
MODULE_ID Module ID String
MODULE_ID_NAME Module name String
ENTITY_ID Entity type ID String
ENTITY_ID_NAME Entity type name String
MODIFIED_BY_ID ID of the user who last updated the template Number
MODIFIED_BY_NAME Name of the user who last updated the template String
MODIFIED_BY ID and name of the user who last updated the template String

Workflow templates — bizproc_workflow_template: Contains information about workflow templates, including their names, statuses, types, last modified dates, and details about the users who created them. You can use this data in charts to identify which templates are used most often in your company.

Workflow templates — bizproc_workflow_template

Field Description Type
ID Unique ID of the workflow template Number
WORKFLOW_TEMPLATE Workflow template ID and name String
MODULE_ID ID of the Bitrix24 module associated with the workflow template String
ENTITY Name of the entity where the workflow template is used String
DOCUMENT_TYPE Type of the workflow element the template is linked to String
DOCUMENT_STATUS Current status of the workflow template String
NAME Workflow template name String
MODIFIED Date and time when the workflow template was last modified Date
IS_MODIFIED Shows whether the template has been modified ("Y") or not ("N") String
USER_ID ID of the user who created the workflow template Number
USER_NAME Name of the user who created the workflow template String
USER ID and name of the user who created the workflow template String
SYSTEM_CODE System code that identifies whether the template is a system template or created by an app String
IS_SYSTEM Shows whether the template is a standard (system) template ("Y") or not ("N") String
ACTIVE Shows whether the template is currently active ("Y") or not ("N") String
TYPE Type of the workflow template, showing whether the template is a workflow or an automation rule String

How to create a chart

Use datasets to create charts and track workflow execution. The charts can show active workflows and their stages.

Go to the BI Builder and follow these steps:

  1. Open the Charts tab.
  2. Click + Chart.
  3. 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
  4. Choose a format for showing the data: big number, table, line chart, or others.
  5. Click Create new chart.

How to blend datasets

Combine datasets to include information about pending workflow assignments and their stages in the report.

Go to the BI Builder and do the following:

  1. Go to SQL > SQL Lab.
  2. Select the bitrix24 scheme.
  3. 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: workflow assignments (bizproc_task) and workflow (bizproc_workflow_state). You can copy it and see how it works. The query selects pending workflow assignments and shows their IDs, names, statuses, and participant names.

SELECT
    bizproc_task.ID AS "Assignment ID",
    bizproc_task.NAME AS "Assignment name",
    bizproc_task.USER_NAME AS "Assignment participant name",
    bizproc_task.STATUS_NAME AS "Assignment status",
    bizproc_workflow_state.STARTED AS "Workflow start date and time",
    bizproc_workflow_state.STARTED_BY_NAME AS "User who started the workflow"
FROM
    bizproc_task
LEFT JOIN
    bizproc_workflow_state 
    ON bizproc_task.WORKFLOW_ID = bizproc_workflow_state.ID
WHERE
    bizproc_workflow_state.COMPLETED = 'N';

SELECT: Chooses which data to extract. For example, the SELECT bizproc_task.ID AS "Assignment ID" part does the following:

  • Selects the assignment ID from the bizproc_task dataset
  • Assigns it the name Assignment ID
  • Displays the result in a separate column

FROM: Specifies the main table for the query, such as the bizproc_task table containing information about workflow assignments.

LEFT JOIN: Connects the bizproc_task and bizproc_workflow_state tables to combine their data. It links assignments to the workflows that created them. Use LEFT JOIN to display all assignments, even if there's no data on active workflows.

WHERE: Filters the query results to show only active workflows. The condition bizproc_workflow_state.COMPLETED = 'N' ensures that only active workflows are shown. To include completed workflows, remove this condition.


In brief

  • Datasets contain information on workflows, SPA, employees, and other items.

  • Each item has multiple datasets that automatically include both standard and custom fields.

  • There are three datasets for workflows: workflow assignments (bizproc_task), workflow (bizproc_workflow_state), and workflow templates (bizproc_workflow_template).

  • Use these datasets to create charts and analyze business performance indicators. For example, include data on completed workflow assignments and approval times.

  • Blend datasets to combine data on pending assignments and workflow progress. To do this, write an SQL query, save the result as a dataset, and create a chart.

Was this information helpful?
Integration specialist assistance
That's not what I'm looking for
Complicated and incomprehensible text
The information is outdated
It's too short. I need more information
I don't like the way this tool works
Get your Bitrix24 set up by local professionals
FIND BITRIX24 PARTNER NEAR ME
implementation_helper_man
Go to Bitrix24
Don't have an account? Create for free
Related articles
BI Builder datasets: Tasks and projects BI Builder: Fix CSV file import errors BI Builder datasets: Leads BI Builder datasets: Employees, company structure, and calls BI Builder datasets: e-Signature and e‑Signature for HR BI Builder datasets: Invoices and estimates BI Builder datasets: Call assessment Configure data formats and types for CSV file import BI Builder datasets: Companies and contacts BI Builder: Create a dataset from a CSV file