Universal CRM Methods: Overview of Methods and Events

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

The methods crm.item.* manage CRM objects: leads, deals, contacts, companies, invoices, estimates, and SPA elements.

A unified interface simplifies working with different objects. Instead of separate commands for each object, use universal methods with the type identifier entityTypeId.

Quick navigation: all methods and events

User documentation: CRM implementation steps

Getting Started

  1. Determine the CRM object type entityTypeId. The complete table is available in the CRM object types reference, and the smart process identifier can be found using the crm.type.list method. The main values for system types are:

    Object Type

    entityTypeId

    Lead

    1

    Deal

    2

    Contact

    3

    Company

    4

    Estimate

    7

    Requisite

    8

    Order

    14

    Invoice (new)

    31

    Smart Process

    from 128

    The crm.item.* methods do not work with old-type invoices entityTypeId = 5 and return the ENTITY_TYPE_NOT_SUPPORTED error for them. Use entityTypeId = 31 for invoices.

  2. Retrieve the list of available fields for this type using the crm.item.fields method.

  3. Create a new item using the crm.item.add method or get a list of existing items using the crm.item.list method.

  4. Obtain data for a specific item using the crm.item.get method.

  5. Modify an item using the crm.item.update method or delete it using the crm.item.delete method.

Relationships of Universal Methods with Other Objects

CRM Object Type. The type is set by the entityTypeId parameter. It defines the structure of fields and the logic of the method.

CRM Object. A specific record is identified by the pair entityTypeId and id. This combination is used in the main methods crm.item.*.

Requisites. Link company and contact requisites using the crm.requisite.link.* methods.

Parent Relationships. Items are linked to each other through the parentId and parentEntityTypeId fields:

  • fields returns information about parent fields
  • get provides values of parent fields
  • list filters, sorts, and adds parent field values to the selection
  • add and update support changing the values of these fields

Field Naming Conventions

In the database, fields are stored in UPPER_CASE format, while in REST, names are used in camelCase.

Example: ASSIGNED_BY_ID becomes assignedById.

For custom fields, the conversion is more complex because the original names often contain numbers and underscores. CRM uses two conversion methods.

Regular conversion. Applied when only digits or only letters follow UF_CRM_ and the object number. Underscores between numeric blocks are preserved, while others are removed.

Example: UF_CRM_10_5186744711 becomes ufCrm10_5186744711, and UF_CRM_10_DIGIT becomes ufCrm10Digit.

Simplified conversion. Applied when letters and numbers are mixed in the name. For such a name, regular conversion is irreversible: from the result ufCrm10Digit10, it is impossible to determine whether the original field was UF_CRM_10_DIGIT10 or UF_CRM_10_DIGIT_10.

To keep the conversion reversible, CRM replaces only the prefix: UF_CRM_ becomes ufCrm_, and the rest of the name is preserved unchanged. For example, UF_CRM_10_DIGIT10 becomes ufCrm_10_DIGIT10.

CRM also checks for matches separately. If the converted name is already taken by another field of the object, the field is returned in its original UPPER_CASE form.

UPPER_CASE

camelCase

Conversion Method

UF_CRM_3_DIGIT

ufCrm3Digit

regular

UF_CRM_3_1747309727

ufCrm3_1747309727

regular

UF_CRM_3_DIGIT10

ufCrm_3_DIGIT10

simplified

UF_CRM_3_DIGIT_10

ufCrm_3_DIGIT_10

simplified

UF_CRM_1747309879

ufCrm_1747309879

simplified

Starting from version CRM 25.0.0, the crm.item.* methods support the useOriginalUfNames parameter, which controls the format of custom field names in requests and responses:

  • Y — original names of custom fields, e.g., UF_CRM_2_1639669411830
  • N — names of custom fields in camelCase, e.g., ufCrm2_1639669411830

By default, N is used. If you do not want to deal with the conversion rules, pass useOriginalUfNames = Y and work with the original field names.

Use Cases

Overview of Methods and Events

Scope: crm

Who can perform methods: depending on the method

Method

Description

crm.item.add

Creates a CRM item

crm.item.update

Modifies fields of a CRM item

crm.item.get

Returns data of a CRM item by identifier

crm.item.list

Returns a list of CRM items

crm.item.delete

Deletes a CRM item

crm.item.fields

Returns the description of fields of a CRM item

Event

Triggered

onCrmDynamicItemAdd

After adding a smart process item

onCrmDynamicItemUpdate

After updating a smart process item

onCrmDynamicItemDelete

After deleting a smart process item

These events are delivered for items of all smart processes. How to subscribe to the events of a single smart process is described in the Smart Process Element Events section.

Continue Learning