Documentation

Top-level object and Icon

LayoutDto

Top-level object for timeline entry.

Field Type Description Additional
icon IconDto Icon to the left side of entryRequired
header HeaderDto Entry headerRequired
body BodyDto Main entry content areaRequired
footer FooterDto Entry footer with action block

Example:

{
  "icon": {
    "code": "call-completed"
  },
  "header": {
    "title": "Inbound call",
    "tags": {
      "status2": {
        "type": "warning",
        "title": "not decrypted"
      }
    }
  },
  "body": {
    "logo": {
      "code": "call-incoming",
      "action": {
        "type": "redirect",
        "uri": "/crm/deal/details/123/"
      }
    },
    "blocks": {
      "client": {
        "type": "withTitle",
        "properties": {
          "title": "Customer",
          "inline": true,
          "block": {
            "type": "text",
            "properties": {
              "value": "LLC Winning"
            }
          }
        }
      },
      "responsible": {
        "type": "lineOfBlocks",
        "properties": {
          "blocks": {
            "client": {
              "type": "link",
              "properties": {
                "text": "John Smith",
                "bold": true,
                "action": {
                  "type": "redirect",
                  "uri": "/crm/lead/details/789/"
                }
              }
            },
            "phone": {
              "type": "text",
              "properties": {
                "value": "+7 9230 23523 0432"
              }
            }
          }
        }
      }
    }
  },
  "footer": {
    "buttons": {
      "startCall": {
        "title": "About the customer",
        "action": {
          "type": "openRestApp",
          "actionParams": {
            "clientId": 456
          }
        },
        "type": "primary"
      }
    },
    "menu": {
		"showPostponeItem": "false",
		"items": {
			"confirm": {
				"title": "Confirm request",
				"action": {
					"type": "restEvent",
					"id": "confirm",
					"animationType": "loader"
				}
			},
			"decline": {
				"title": "Decline request",
				"action": {
					"type": "restEvent",
					"id": "decline",
					"animationType": "loader"
				}
			}
		}
	}
  }
}

IconDto

Timeline entry icon

Field Type Description Additional
code string Icon code Required. List of available codes can be fetched by the method crm.timeline.icon.list


© «Bitrix24», 2001-2024