Context Menu Item in the CRM_XXX_LIST_MENU, CRM_DYNAMIC_XXX_LIST_MENU

Scope: crm

You can add your item to the context menu of CRM objects: leads, contacts, companies, deals, old invoices, estimates, new invoices, custom entity types.

Widget as a context menu item in Deal

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_LIST_MENU

Context menu item for lead

CRM_CONTACT_LIST_MENU

Context menu item for contact

CRM_COMPANY_LIST_MENU

Context menu item for company

CRM_DEAL_LIST_MENU

Context menu item for deal

CRM_INVOICE_LIST_MENU

Context menu item for old invoice

CRM_SMART_INVOICE_LIST_MENU

Context menu item for new invoice

CRM_QUOTE_LIST_MENU

Context menu item for estimate

CRM_ACTIVITY_LIST_MENU

Context menu item for activity

CRM_DYNAMIC_XXX_LIST_MENU

Context menu item for custom CRM entity type. Instead of XXX, specify the numeric identifier of the specific custom entity 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] => 37430843b6a2ce62aea9be09c34d9e6d
            [AUTH_ID] => 39e69f6600631fcd00005a4b00000001f0f10738741fe7296291110a2e9788a33216cf
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 2965c76600631fcd00005a4b00000001f0f107cdf3226bebc47f89d1b0f15608e44b14
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_LEAD_LIST_MENU
            [PLACEMENT_OPTIONS] => {"ID":"6591"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => a50589d05446337105e25d637db82f43
            [AUTH_ID] => 69e69f6600631fcd00005a4b00000001f0f107b9e6d35725003c1524f001562c374275
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 5965c76600631fcd00005a4b00000001f0f107fb7f5a0542d97a9f3a31c73bbfde48e2
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_DEAL_LIST_MENU
            [PLACEMENT_OPTIONS] => {"ID":"3473"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => fcd06d800f545d3b6937cdf58cf17ac2
            [AUTH_ID] => 68e99f6600631fcd00005a4b00000001f0f107343b8243b5a1ad4f168fc8a8d05c182f
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 5868c76600631fcd00005a4b00000001f0f107b05367c5e576376b33d68414e1b04f18
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_CONTACT_LIST_MENU
            [PLACEMENT_OPTIONS] => {"ID":"13037"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => b61394bd23467de46689899d065e8a0f
            [AUTH_ID] => 9ce99f6600631fcd00005a4b00000001f0f1073d433234d6fbee7d770aac0b3ba5e23f
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 8c68c76600631fcd00005a4b00000001f0f107704816219d9d7a765a4038ae79f9a3db
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_COMPANY_LIST_MENU
            [PLACEMENT_OPTIONS] => {"ID":"2946"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => c1228e789d5052287ceb321fe7b3377a
            [AUTH_ID] => d3e99f6600631fcd00005a4b00000001f0f1079f90c8cd4e3f2726ab8ea7a40888c844
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => c368c76600631fcd00005a4b00000001f0f107d077746104d8e477278da715f3ea28cf
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_QUOTE_LIST_MENU
            [PLACEMENT_OPTIONS] => {"ID":"5"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => a2734d8a3ee69cc513b26555bc43f44c
            [AUTH_ID] => fce99f6600631fcd00005a4b00000001f0f10757595d9831ca4f9591c8b5190a12d385
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => ec68c76600631fcd00005a4b00000001f0f107e37ac66ed69aaa16cbc75c7a650e61ef
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_INVOICE_LIST_MENU
            [PLACEMENT_OPTIONS] => {"ID":"12"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => adada92053b22a4de3895402a01693cf
            [AUTH_ID] => 69c7ca670076a4b8006f518000000001201c0720c9c9d78077b5f2c5530f64b061c8a1
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 5946f2670076a4b8006f518000000001201c07709da4b12d3c7e82e120a20e547b638f
            [member_id] => e8857f161a1a8288f312b6cc6ad67995
            [status] => L
            [PLACEMENT] => CRM_SMART_INVOICE_LIST_MENU
            [PLACEMENT_OPTIONS] => {"ID":"32"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => a29cf633b74509437b3873a57d138f10
            [AUTH_ID] => 30ea9f6600631fcd00005a4b00000001f0f107450fd57122ecc7d9e58f894b3fb2c57f
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 2069c76600631fcd00005a4b00000001f0f107bd1492748f20b4a006e2a35f9f7c0b6d
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_ACTIVITY_LIST_MENU
            [PLACEMENT_OPTIONS] => {"ID":"1465"}
        )
        
        

        Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => ef961a45216cf6944d118ebd2a44c119
            [AUTH_ID] => 5cea9f6600631fcd00005a4b00000001f0f107d2ceb3f7eaaaa5cee8960f2572ab96e4
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 4c69c76600631fcd00005a4b00000001f0f107e7da55ee918fcdeef4bfa02243184591
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => CRM_DYNAMIC_183_LIST_MENU
        )
        
        

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

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 — 183

Continue Exploring