Documentation

Application Embedding

Developer of applications for Bitrix24 Marketplace can access a simple mechanism of embedding an application into Bitrix24 interface. This section provides reference information on embedding methods and locations.

Embedded applications, unavailable to a user, will not be displayed in lists, menu items or other locations where applications can be visible. Exception - embedding via the type of custom user field. However, authorization will not be passed to the frame and the developer of an app should take this into account.

The following locations are available for embedding:

  • CRM scope
  • Telephony scope
  • Intranet scope
  • Landing scope
  • Workgroups Scope
  • Task
  • Calendar
  • Contact_Center
  • Arbitrary Location
  • CRM scope
    Code Leads
    CRM_LEAD_LIST_MENU List menu for Leads
    CRM_LEAD_DETAIL_TAB Upper menu item in the Lead details tab
    CRM_LEAD_DETAIL_ACTIVITY Lead activity menu item
    Code Deals
    CRM_DEAL_LIST_MENU Deals list menu
    CRM_DEAL_DETAIL_TAB Upper menu item in the Deals details
    CRM_DEAL_DETAIL_ACTIVITY Deal activity menu item
    Code Contacts
    CRM_CONTACT_LIST_MENU Contact list menu
    CRM_CONTACT_DETAIL_TAB Upper menu item in the Contact details
    CRM_CONTACT_DETAIL_ACTIVITY Contact activity menu item
    Code Companies
    CRM_COMPANY_LIST_MENU Company list menu
    CRM_COMPANY_DETAIL_TAB Upper menu item in the Company details
    CRM_COMPANY_DETAIL_ACTIVITY Company activity menu item
    Code Invoices
    CRM_INVOICE_LIST_MENU Invoices list menu
    Code Quotes
    CRM_QUOTE_LIST_MENU Quotes list context menu
    Code Activities
    CRM_ACTIVITY_LIST_MENU Activities list context menu
    Code CRM Analytics
    CRM_ANALYTICS_MENU CRM Analytics menu
    Code Requisites
    CRM_REQUISITE_EDIT_FORM Allows creating custom requisite search service, instead of standard one.
    scope intranet
    Code Knowledge Base embedding
    CRM
    CRM_FUNNELS_TOOLBAR Button in the Sales Funnel dropdown menu
    CRM_ANALYTICS_TOOLBAR Option in cogwheel dropdown menu of CRM Analytics
    CRM_*_LIST_TOOLBAR Option in Automation Rules dropdown menu. Available objects: DEAL, LEAD, CONTACT, COMPANY, INVOICE, QUOTE.
    CRM_*_DETAIL_TOOLBAR Button at the upper section of CRM details. You must pass current object ID in placement_options. Available objects: DEAL, LEAD, CONTACT, COMPANY, INVOICE, QUOTE
    CRM_*_ACTIVITY_TIMELINE_MENU Button in the object context menu (Only for objects DEAL, LEAD). You must pass current object ID in placement_options.
    CRM_*_DOCUMENTGENERATOR_BUTTON Button in documents. You must pass current object ID in placement_options. Available objects: DEAL, LEAD, CONTACT, COMPANY, INVOICE, QUOTE
    CRM_*_ROBOT_DESIGNER_TOOLBAR Option in cogwheel dropdown menu with automation rules (Only for objects DEAL, LEAD).
    Tasks
    TASK_USER_LIST_TOOLBAR Option in Automation Rules dropdown menu. You must pass user ID in placement_options.
    TASK_GROUP_LIST_TOOLBAR Option in Automation Rules dropdown menu. You must pass workgroup ID in placement_options.
    TASK_ROBOT_DESIGNER_TOOLBAR Option in cogwheel dropdown menu with automation rule.
    Workgroups
    SONET_GROUP_ROBOT_DESIGNER_TOOLBAR Option in Automation Rules dropdown menu in workgroup. You must pass current workgroup ID in placement_options.
    SONET_GROUP_TOOLBAR Option in Automation Rules dropdown menu inside workgroup. You must pass current workgroup ID in placement_options идентификатор текущей группы.
    User profile
    USER_PROFILE_MENU Option with dropdown selection in the upper Bitrix24 account main menu. You must pass current user ID in placement_options.
    USER_PROFILE_TOOLBAR Option in dropdown menu inside user profile. You must pass current user ID in placement_options.
    Telephony scope
    Code Call Card
    CALL_CARD Call ID screen
    Landing Scope
    Code Settings
    LANDING_SETTINGS Settings menu (for Landing Page / Site)
    Code Edit
    LANDING_BLOCK Edit option for any block.
    Workgroups scope
    Code Settings
    SONET_GROUP_DETAIL_TAB Workgroup detail tab.
    scope task
    Code Settings
    TASK_LIST_CONTEXT_MENU Task list context menu.
    TASK_VIEW_TAB New tab when viewing task
    TASK_VIEW_SIDEBAR New side bar when viewing task
    TASK_VIEW_TOP_PANEL Top panel when viewing task
    Calendar scope
    Code Settings
    CALENDAR_GRIDVIEW List of calendar grid views
    Contact_Center scope
    Code Settings
    CONTACT_CENTER Square tile in the list of Contact Center.
    Arbitrary location
    Code Settings
    REST_APP_URI Each application on any Bitrix24 account is permitted to register only one embedding via placement.bind in any arbitrary location (Instant Messenger, Activity Stream and etc.).

    This embedding does not have an UI button that user can use to manually open the app. The app can send a link, leading to its embedding to any location (Instant Messenger, Activity Stream and etc.). To use this embedding option, the link must have the format /marketplace/view/#APP_CODE#/, where #APP_CODE# - your app code.

    The embedding can receive any number of parameters in the "get" key params, for example: /marketplace/view/#APP_CODE#/?params[test]=y. In this case, PLACEMENT_OPTIONS is as follows:

     [
    'test' = 'y'
    ]
    Example: using BBCode to insert this link into a chat:
    [url=/marketplace/view/'.$myApp['CODE'].'/?params[test]=y]uri[/url]

    <?
    $placement = 'REST_APP_URI';
    $url = 'https://example.com/placement.php';
    CRest::call(
      'placement.bind',
      [
          'PLACEMENT' => $placement,
          'HANDLER' => $url
      ]
    );
    ?>

    The example above registers an embedding location on your portal. It can be registered only once on the portal for this PLACEMENT, and it becomes available for calling. You can place your embedding in your application:

    <a href="/marketplace/view/<?=$myApp['CODE']?>/">uri</a>

    And place it in an Activity Stream post:

    <?
        CRest::call('log.blogpost.add',
            [
                'POST_TITLE' => 'Post Title',
                'POST_MESSAGE' => 'use this [url=/marketplace/view/'.$myApp['CODE'].'/?params[test]=y]uri[/url]',
                'DEST' => [ 'EN' ]
            ]);
    ?>

    Send it via bot to chat for a user via the method:

    <?
    CRest::call(
        'imbot.message.add',
        [
            'DIALOG_ID' => 1,
            'MESSAGE' => 'use this [url=/marketplace/view/'.$myApp['CODE'].'/?params[test]=y]uri[/url]',
    
        ]
    );
    ?>

    The link can be embedded in any text field which supports BBCode or inside your other embedding locations as a standard link. The GET parameter params can be used to modify the displayed parameters in the embedding. You can use this option in any various scenarios by passing any number of parameters into GET key params, for example: ?params[test]=yy.



    User Comments

    User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

    The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
    © «Bitrix Inc.», 2001-2020, «Bitrix Inc.», 2020