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=1so 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
Links of Activities with Other CRM Entities
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 parameterPROVIDER_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.
Typical use-cases and scenarios
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:
crmWho can perform methods: any user
General Methods and Events
|
Method |
Description |
|
Creates a new activity |
|
|
Updates an activity |
|
|
Returns an activity by ID |
|
|
Returns a list of activities of all types by filter |
|
|
Deletes any type of activity |
|
|
Returns the description of activity fields |
|
|
Returns the description of communication fields |
|
Event |
Triggered |
|
When an activity is created |
|
|
When an activity is updated |
|
|
When an activity is deleted |
Managing Activity Links
|
Method |
Description |
|
Adds a link |
|
|
Returns a list of links |
|
|
Deletes a link |
Custom Activity Types
|
Method |
Description |
|
Registers a custom activity type with a name and icon |
|
|
Retrieves a list of activities |
|
|
Deletes a custom type |
Universal Activity
|
Method |
Description |
|
Creates a universal activity |
|
|
Changes the deadline |
|
|
Changes the description |
Configurable Activity
|
Method |
Description |
|
Adds a new configurable activity to the timeline |
|
|
Updates a configurable activity |
|
|
Retrieves information about an activity by ID |
Badges of Configurable Activity
|
Method |
Description |
|
Creates a badge |
|
|
Returns information about a badge |
|
|
Returns a list of all registered badges |
|
|
Deletes a badge |
Additional Content Blocks
|
Method |
Description |
|
Sets a set of additional content blocks in the activity |
|
|
Retrieves the set of additional content blocks in the activity set by the application |
|
|
Deletes the set of additional content blocks for the activity set by the application |