Activities in CRM: Overview of Methods

In CRM, activities are used for any tasks related to clients: calls, meetings, document approvals.

Activities are divided into incoming and scheduled:

  • Incoming — activities that come from the client, such as an email, call, or chat. For these activities, it is important to correctly specify the parameter DIRECTION = 1 so that the incoming activities counter in CRM works.

  • Scheduled — activities created by employees, such as tasks or universal activities. They can have a deadline, add links to CRM entities, integrate with the calendar, invite colleagues, and attach files.

Quick navigation: all methods and events

User documentation: activities in CRM, Activity Direction

Activities linked to CRM entities are stored in the timeline of the entity's card. If an activity is linked to multiple entities — for example, an email can be linked to both a deal and a contact — it will be stored in the timelines of all related entities.

Links between activities and CRM entities can be added and removed using the methods from the crm.activity.binding.* group.

System Activities

System activities in CRM are created automatically:

  • A call activity is created by the connected telephony in Bitrix. To finish a call, use the method telephony.externalcall.finish. This method ends the call, creates an activity in the entity's card, and returns the ID of the created activity in the parameter CRM_ACTIVITY_ID.

  • An email activity is created by the email system. When an email from a client arrives at the connected Bitrix24 address, CRM checks if there is a client in the database with the email from the message. Based on the results of the check, an activity will be created in the card of the found entity or a new client, where the activity will appear.

To create, modify, or delete a system activity, use the methods from the crm.activity.* group. When creating a system activity, specify TYPE_ID, for example, for an email activity TYPE_ID = 2. To get values for other types of activities, use the method crm.enum.activitytype.

Custom Activity Types

Applications can register custom activity types: upload a custom icon and specify the type name. For example, you can create your own activity type with an icon and name of your application.

  • To register an activity type — use the methods from the crm.activity.type.* group. When creating a type, you need to specify its code designation in the parameter TYPE_ID.

  • To create an activity with the application type — use the group of system activity methods crm.activity.add. When creating an activity, specify the code designation of the custom type TYPE_ID, registered for the activity type, in the parameter PROVIDER_TYPE_ID.

The methods crm.activity.delete (deletes an activity) and crm.activity.list (retrieves a list of activities) are common for all types of CRM activities.

Universal Activities

Universal activities are a type of activity with extended settings. In the card of a universal activity, you can synchronize the activity with the calendar, choose a meeting location with the client, add colleagues, select a client from a CRM entity, categorize activities by color, and choose a meeting room. Extended settings are available to employees on the Bitrix24 side.

To create a universal activity, use the method crm.activity.todo.add. To change the deadline of the activity — use the method crm.activity.todo.updateDeadline, and to change the description of the activity — crm.activity.todo.updateDescription.

User Documentation

Configurable Activities

Configurable activities are a type of activity that can only be created from an application. For this type, you can customize the appearance of the activity card and its functionality:

To create or modify a configurable activity, use the methods from the crm.activity.configurable.* group.

Widgets

Applications can be embedded into activities. For embedding, special places are used, and there is one available in activities — Context Menu Item of the Activity in the Entity Card CRM_XXX_ACTIVITY_TIMELINE_MENU.

Thanks to the embedding, you can use the application without leaving the entity card. The application will open on the page you specify during the registration of the embedding.

Additional Features

Text notes can be added to activities and deleted. Use the methods from the crm.timeline.note.* group.

Content blocks can be added to activities and deleted. Use the methods from the crm.activity.layout.blocks.*.

Overview of Methods and Events

Scope: crm

Who can perform methods: any user

General Methods and Events

Method

Description

crm.activity.add

Creates a new activity

crm.activity.update

Updates an activity

crm.activity.get

Returns an activity by ID

crm.activity.list

Returns a list of activities of all types by filter

crm.activity.delete

Deletes any type of activity

crm.activity.fields

Returns the description of activity fields

crm.activity.communication.fields

Returns the description of communication fields

Event

Triggered

onCrmActivityAdd

When an activity is created

onCrmActivityUpdate

When an activity is updated

onCrmActivityDelete

When an activity is deleted

Method

Description

crm.activity.binding.add

Adds a link

crm.activity.binding.list

Returns a list of links

crm.activity.binding.delete

Deletes a link

Custom Activity Types

Method

Description

crm.activity.type.add

Registers a custom activity type with a name and icon

crm.activity.type.list

Retrieves a list of activities

crm.activity.type.delete

Deletes a custom type

Universal Activity

Method

Description

crm.activity.todo.add

Creates a universal activity

crm.activity.todo.updateDeadline

Changes the deadline

crm.activity.todo.updateDescription

Changes the description

Configurable Activity

Method

Description

crm.activity.configurable.add

Adds a new configurable activity to the timeline

crm.activity.configurable.update

Updates a configurable activity

crm.activity.configurable.get

Retrieves information about an activity by ID

Badges of Configurable Activity

Method

Description

crm.activity.badge.add

Creates a badge

crm.activity.badge.get

Returns information about a badge

crm.activity.badge.list

Returns a list of all registered badges

crm.activity.badge.delete

Deletes a badge

Additional Content Blocks

Method

Description

crm.activity.layout.blocks.set

Sets a set of additional content blocks in the activity

crm.activity.layout.blocks.get

Retrieves the set of additional content blocks in the activity set by the application

crm.activity.layout.blocks.delete

Deletes the set of additional content blocks for the activity set by the application