Documentation

Body - main content area

BodyDto

Main body area for content in timeline entry

Field Type Description Additional
logo LogoDto Entry logoRequired.
blocks ContentBlockDto[] Associative array with objects, describing content blocks.Array must contain at least a single element and not more than 20 elements.

LogoDto

Timeline entry logo.

Field Type Description Additional
code string Logo code Required. List of available codes can be retrieved by the method crm.timeline.logo.list.
action ActionDto Clicking on logo action.

ContentBlockDto

Content blocks for the main body area in timeline entry. By combining these blocks you can flexibly assemble various interfaces.

Block general structure:

{
  "type": Block type,
  "properties": {
    ... some properties, various for each specific block
  }
}

There are several various types of content blocks available:

  • Text (type = text)

    The most simple block that prints a formatted text.

    Block properties:

    Field Type Description Additional
    value textWithTranslation Text to displayRequired.
    multiline bool Process line breaksIf true, the characters \n will be replaced with <br>. False by default.
    title textWithTranslation Title attribute
    bold bool Set text as bold?False by default.
    size string Text sizeCan get values xs, sm, md (the last option is used by default).
    color string Text colorCan get values base_50, base_60, base_70, base_90, green
    scope string Where to display.

    Example:

    {
      "type": "text",
      "properties": {
        "value": "Hello!\nLet's begin.",
        "multiline": true,
        "bold": true,
        "color": "base_90"
      }
    }

    Result:   

  • Long multiline text (type = largeText)

    Block, allows to display long multiline texts that will be automatically collapsed to a preview.

    Field Type Description Additional
    value textWithTranslation Text to be displayedRequired.
    scope string Where to display

    Example:

    {
      "type": "largeText",
      "properties": {
        "value": "Hello!\nLet's begin.\nWe'll continue the work.\nWe are on the way to the goal.\n."
      }
    }

    Result:   

  • Link (type = link)

    Block, displaying the link.

    Field Type Description Additional
    text textWithTranslation Text to be displayed. HTML tags are not supported.Required.
    action ActionDto Link click action.Required.
    bold bool Set text as bold?False by default.
    scope string Where to display

    Example:

    {
      "type": "link",
      "properties": {
        "text": "Open the deal",
        "action": {
          "type": "redirect",
          "uri": "/crm/deal/details/123/"
        },
        "bold": true
      }
    }

    Result:   

  • Block with header (type = withTitle)

    This block allows displaying name-value parameters pair. Any other content block can be used as value.

    Field Type Description Additional
    title textWithTranslation Title textRequired.
    block ContentBlockDto Content block as value. Supports blocks with types as follows: text, link, deadline.Required.
    inline bool Show name or value in a single string.False by default.
    scope string Where to display

    Examples:

    {
      "type": "withTitle",
      "properties": {
        "title": "Title",
        "block": {
          "type": "text",
          "properties": {
            "value": "Some value"
          }
        }
      }
    }

    Result:   

    {
      "type": "withTitle",
      "properties": {
        "title": "Title 2",
        "block": {
          "type": "link",
          "properties": {
            "text": "Open deal",
            "action": {
              "type": "redirect",
              "uri": "/crm/deal/details/123/"
            }
          }
        },
        "inline": true
      }
    }

    Result:   

  • Several content blocks in a single string (type = lineOfBlocks)

    Block allows to display several content blocks with text or link a single string. This allows displaying text with different formatting in a single string, mixed with links.

    Field Type Description Additional
    block ContentBlockDto[] Associative array with content blocks. Supports such blocks as text, link, deadline.Обязательное.
    scope string Where to display

    Example:

    {
      "type": "lineOfBlocks",
      "properties": {
        "blocks": {
          "text": {
            "type": "text",
            "properties": {
              "value": "Some text"
            }
          },
          "link": {
            "type": "link",
            "properties": {
              "text": "link",
              "action": {
                "type": "redirect",
                "uri": "/crm/deal/details/123/"
              }
            }
          },
          "boldText": {
            "type": "text",
            "properties": {
              "value": "highlighted text",
              "bold": true
            }
          }
        }
      }
    }

    Result:   

  • Selecting deadline (type = deadline)

    Block displays current deadline value with a quick update option. Block won't be displayed, if it's added to incoming activity or activity without deadline.

    Field Type Description Additional
    readonly bool Permit to update the deadline.False by default. When user doesn't have access to update an entity with associated activity or if activity has been completed - readonly = true independently from passed settings.
    scope string Where to display

    Example:

    {
      "type": "deadline",
      "properties": {
        "readonly": false
      }
    }
  • Result:   


© «Bitrix24», 2001-2024
Up