Context Menu Item for the Deal in the CRM Element Card CRM_XXX_ACTIVITY_TIMELINE_MENU, CRM_DYNAMIC_XXX_ACTIVITY_TIMELINE_MENU

Scope: crm

You can add your context menu item for the deal in the CRM object cards: leads, deals, estimates, new invoices, custom object types.

Widget as a context menu item for the deal in the lead

The specific widget placement code is specified in the PLACEMENT parameter of the placement.bind method.

The widget will not be displayed in the interface until the application installation is complete. Check the application installation

Where the Widget is Embedded

Widget Code

Location

CRM_LEAD_ACTIVITY_TIMELINE_MENU

Context menu item for the deal in the lead

CRM_DEAL_ACTIVITY_TIMELINE_MENU

Context menu item for the deal in the deal

CRM_QUOTE_ACTIVITY_TIMELINE_MENU

Context menu item for the deal in the estimate

CRM_SMART_INVOICE_ACTIVITY_TIMELINE_MENU

Context menu item for the deal in the new invoices

CRM_DYNAMIC_XXX_ACTIVITY_TIMELINE_MENU

Context menu item for the deal in custom CRM object types. Instead of XXX, specify the numeric identifier of the specific custom object type. For example, CRM_DYNAMIC_183_LIST_MENU

What the Handler Receives

Data is transmitted as a POST request


        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => e6a18a6abe41ba3bd944897d8dc5186d
            [AUTH_ID] => 45d4a06600631fcd00005a4b00000001f0f10767246d86a580fae119d2a2601665eb33
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 3553c86600631fcd00005a4b00000001f0f1074bdbcddd7232d3413e2b9ff1ee91dc96
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_LEAD_ACTIVITY_TIMELINE_MENU
            [PLACEMENT_OPTIONS] => {"ENTITY_ID":"6591","TYPE_ID":"1","TYPE_CATEGORY_ID":"6","ASSOCIATED_ENTITY_ID":"1523","ASSOCIATED_ENTITY_TYPE_ID":"6","TIMELINE_ITEM_ID":"29937"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => 71cc8c707a630542d5e2cf7435bf88c4
            [AUTH_ID] => 87d4a06600631fcd00005a4b00000001f0f10758d4aabbf27967a9af747de646c5447c
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 7753c86600631fcd00005a4b00000001f0f1078ec2dd6e94d5dc8f1aebf6524a86ee78
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_DEAL_ACTIVITY_TIMELINE_MENU
            [PLACEMENT_OPTIONS] => {"ENTITY_ID":"3463","ASSOCIATED_ENTITY_ID":"1517","ASSOCIATED_ENTITY_TYPE_ID":"6"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => a63d2f88ffd62d6a300aaea7bf5ebf32
            [AUTH_ID] => 757ba26600631fcd00005a4b00000001f0f107b07473a33f9378bf912d602ecb056119
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 65fac96600631fcd00005a4b00000001f0f10726b77ceb5a0aaa50e143b1086fa03324
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_QUOTE_ACTIVITY_TIMELINE_MENU
            [PLACEMENT_OPTIONS] => {"ENTITY_ID":"5","ASSOCIATED_ENTITY_ID":"1529","ASSOCIATED_ENTITY_TYPE_ID":"6"}
        }
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => a2032d292bcc91a22022db330433a933
            [AUTH_ID] => ee2ad0670076a4b8006f518000000001201c07383646b2116914be86aecd467ade5a3e
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => dea9f7670076a4b8006f518000000001201c07e183b89e2613ce88ba7c56f8f80f19d9
            [member_id] => e8857f161a1a8288f312b6cc6ad67995
            [status] => L
            [PLACEMENT] => CRM_SMART_INVOICE_ACTIVITY_TIMELINE_MENU
            [PLACEMENT_OPTIONS] => {"ENTITY_ID":"32","ASSOCIATED_ENTITY_ID":"238","ASSOCIATED_ENTITY_TYPE_ID":"6"}
        }
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => d659900f7e966c5d135d349b7b7f3c0d
            [AUTH_ID] => 4a7ba26600631fcd00005a4b00000001f0f1071e1f009645e93bf550bc02ac4f8fdcf6
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 3afac96600631fcd00005a4b00000001f0f107adfab4bb11ae71eaf061319f2b4b2f87
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_DYNAMIC_183_ACTIVITY_TIMELINE_MENU
            [PLACEMENT_OPTIONS] => {"ENTITY_ID":"3","ASSOCIATED_ENTITY_ID":"1527","ASSOCIATED_ENTITY_TYPE_ID":"6"}
        }
        
        

Required parameters are marked with *

Parameter
type

Description

DOMAIN*
string

The Bitrix24 address where the widget handler was invoked

PROTOCOL*
string

Secure or non-secure HTTP protocol:

  • 0 - HTTP
  • 1 - HTTPS

LANG*
string

The user interface language of Bitrix24 that invoked the widget. You can localize the interface language in your widget based on this value

APP_SID
string

String identifier of the application that registered the widget handler

AUTH_ID
string

Authorization token OAuth 2 issued for the user who invoked the widget. Can be used for REST API calls on behalf of this user

AUTH_EXPIRES
integer

Time in seconds after which the authorization token will become invalid

REFRESH_ID
string

Refresh token OAuth 2 issued for the user who invoked the widget. Can be used to refresh the authorization token on behalf of this user

member_id*
string

Unique string identifier of Bitrix24 where the widget handler was invoked.

status
string

Type of application that registered the handler for this widget. Accepts values:

PLACEMENT*
string

Code for the widget embedding location. You can use the same handler URL for all your widgets. The value that Bitrix24 will report in the PLACEMENT parameter will help determine from which specific widget embedding location your handler was invoked in each case

PLACEMENT_OPTIONS
string

Additional data in the form of a JSON string that defines the context of the widget execution. For example, this could be an array containing the numeric identifier of the CRM entity in the detail form where the widget handler was invoked, etc. The PLACEMENT_OPTIONS parameter, along with the PLACEMENT parameter, allows you to accurately determine for which specific widget embedding location and object the widget handler was invoked.

PLACEMENT_OPTIONS

The value of PLACEMENT_OPTIONS is a JSON string containing an array of one or more keys.

Required parameters are marked with *

Parameter

Description

ENTITY_ID*
string

Identifier of the CRM object for which the widget was opened.

Can be used to retrieve additional information using the corresponding methods:

In the case of embedding the widget in a custom type object, the type identifier can be obtained from the value of the PLACEMENT parameter. In the example above, it is 183

ASSOCIATED_ENTITY_ID*
string

Identifier of the CRM deal for which the widget was opened.

Can be used to retrieve additional information using the method crm.activity.get

ASSOCIATED_ENTITY_TYPE_ID*
string

Identifier of the deal entity type (Activity)

TYPE_ID*
string

Identifier of the event type

TYPE_CATEGORY_ID*
string

Identifier of the timeline record type

TIMELINE_ITEM_ID*
string

Identifier of the timeline record

Continue Exploring