Smart Processes: Overview of Methods

A smart process is a versatile CRM object that can be customized to meet the needs of a company. For each smart process, Bitrix24 creates a separate section in the CRM. In this section, you can configure funnels and stages, Automation rules, fields, and connections with other Bitrix24 objects.

Quick navigation: all methods and events

User documentation: Smart Processes in CRM

Working with a Smart Process

  1. Create and configure the smart process — methods crm.type.*.
  2. Set up funnels and stages — crm.category.* for funnels and crm.status.* for stages.
  3. Add custom fields — userfieldconfig.*.
  4. Configure the item detail form — crm.item.details.configuration.*.
  5. Create the first items within the smart process — crm.item.*.

The smart process can be transferred from the CRM section to the Automation section via digital workplaces.

Connections with Other Objects

CRM Objects. A smart process can be linked to leads, deals, and other CRM objects. The linked object will be accessible through the field parentId{ID}, where {ID} is the numeric identifier of the CRM object.

Client. A field in the smart process detail form that consists of the associated company and contacts. There is one company in the field; change the linked company through the companyId field. There can be multiple contacts in the "Client" field. Interaction with contacts is conducted through the contactIds field — pass an array of contact IDs into the field. Enable the field with the option isClientEnabled in the method crm.type.add or crm.type.update.

Your Company Details. Specify your company ID in the mycompanyId field so that its details are automatically used in documents. You can obtain your company ID using the method crm.item.list for the company object with a filter on the isMyCompany field. Enable the field with the option isMycompanyEnabled in the method crm.type.add or crm.type.update.

Products. To add, modify, or delete product items in the smart process, use the methods crm.item.productrow.*. Enable the products tab and the "Amount and Currency" field with the option isLinkWithProductsEnabled in the method crm.type.add or crm.type.update.

Users. The smart process is linked to users by numeric identifiers in the fields:

  • createdBy — who created it,
  • updatedBy — who updated it,
  • movedBy — who changed the stage,
  • assignedById — responsible for the item,
  • observers — observers. Enable the field with the option isObserversEnabled in the method crm.type.add or crm.type.update.

You can obtain the identifier and data of a user using the method user.get.

Documents. To create a document from a template, upload a new template for the smart process, or configure the numbering for documents, use the methods crm.documentgenerator.*. Enable document handling in the smart process with the option isDocumentsEnabled in the method crm.type.add or crm.type.update.

Tasks. Smart process items can be linked to tasks. To work with tasks, use the methods tasks.task.*. To make the linking option available, enable and configure the option isUseInUserfieldEnabled in the method crm.type.add or crm.type.update.

Calendar Events. Smart process items can be linked to calendar events. To work with the calendar, use the methods calendar.event.*. To make the linking option available, enable and configure the option isUseInUserfieldEnabled in the method crm.type.add or crm.type.update.

Smart Process Item Detail Form

The main workspace in the smart process is the "General" tab of the detail form. It consists of two parts:

  • the left part, which contains fields with information. If the system fields are insufficient, you can create your own custom fields. Fields allow you to store information in various data formats: string, number, link, address, and others. To create, modify, retrieve, or delete custom fields in the smart process, use the group of methods userfieldconfig.*.

  • the right part, which contains the smart process timeline. In it, you can create, edit, filter, and delete CRM activities — a group of methods crm.activity.*, and timeline records — a group of methods crm.timeline.*.

You can manage the parameters of the smart process detail form through the group of methods crm.item.details.configuration.*.

Widgets

You can embed an application into the smart process detail form. Thanks to embedding, you can use the application without leaving the item detail form.

There are two embedding scenarios:

Smart Process Embedding Locations

Replace XXX with the numeric identifier of a specific smart process, for example CRM_DYNAMIC_183_DOCUMENTGENERATOR_BUTTON.

Smart Process Identifiers

Each smart process has four types of identifiers. Use the identifiers to apply a method to a specific smart process.

  1. Numeric identifier of type 130. Obtain it using the method crm.enum.ownertype ID or crm.type.list entityTypeId.

  2. Symbolic code of type DYNAMIC_130crm.enum.ownertype SYMBOL_CODE.

  3. Short symbolic code of type T82crm.enum.ownertype SYMBOL_CODE_SHORT.

  4. Custom field object type CRM_13crm.type.list. Substitute the id from the method result into the formula CRM_ + {ID}.

Overview of Methods and Events

Scope: crm

Who can execute the method: depending on the method

Smart Processes

Method

Description

crm.type.add

Creates a new smart process

crm.type.update

Updates the smart process

crm.type.get

Returns the smart process by id

crm.type.getByEntityTypeId

Returns the smart process by entityTypeId

crm.type.list

Returns a list of smart processes

crm.type.delete

Deletes the smart process

crm.type.fields

Returns the fields of the smart process

Event

Triggered

onCrmTypeAdd

When a smart process is created

onCrmTypeUpdate

When a smart process is updated

onCrmTypeDelete

When a smart process is deleted

Items

The CRM object identifier entityTypeIdnumeric identifier type, for example 128.

Method

Description

crm.item.add

Creates a new item

crm.item.update

Updates the item

crm.item.get

Returns the item by Id

crm.item.list

Returns a list of items by filter

crm.item.delete

Deletes the item

crm.item.fields

Returns the fields of the item

Event

Triggered

onCrmDynamicItemAdd

When a smart process item is created

onCrmDynamicItemDelete

When a smart process item is deleted

onCrmDynamicItemUpdate

When a smart process item is modified

Funnels

The CRM object identifier entityTypeIdnumeric identifier type, for example 128.

Method

Description

crm.category.add

Creates a new funnel

crm.category.update

Updates the funnel

crm.category.get

Returns the funnel by Id

crm.category.list

Returns a list of funnels

crm.category.delete

Deletes the funnel

crm.category.fields

Returns the fields of the funnel

Custom Fields

The CRM object identifier entityIdcustom field object type, for example CRM_1.

Method

Description

userfieldconfig.add

Creates a custom field

userfieldconfig.update

Modifies field settings

userfieldconfig.get

Returns custom field settings by identifier

userfieldconfig.getTypes

Returns the set of available custom field types for the module

userfieldconfig.list

Returns a list of custom field settings

userfieldconfig.delete

Deletes a custom field

Managing Detail Form Settings

The CRM object identifier entityTypeIdnumeric identifier type, for example 128.

Method

Description

crm.item.details.configuration.forceCommonScopeForAll

Sets a common detail form for all users

crm.item.details.configuration.get

Retrieves the parameters of item detail forms

crm.item.details.configuration.reset

Resets the parameters of item detail forms

crm.item.details.configuration.set

Sets the parameters of item detail forms

Product Items

The CRM object identifier ownerTypeshort symbolic code type, for example T80.

Method

Description

crm.item.productrow.add

Adds a product item

crm.item.productrow.update

Updates a product item

crm.item.productrow.get

Retrieves information about a product item by id

crm.item.productrow.set

Links a product item to a CRM object

crm.item.productrow.list

Retrieves a list of product items

crm.item.productrow.getAvailableForPayment

Retrieves a list of unpaid products

crm.item.productrow.delete

Deletes a product item

crm.item.productrow.fields

Retrieves a list of product item fields