Content Block of Configurable Deal

Content blocks ContentBlockDto are the foundation of the content area of the timeline record. By combining these blocks, various interfaces can be flexibly assembled.

This structure is used when creating configurable deals and when enriching timeline records with content blocks.

General Structure of the Block:

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

Types of Content Blocks:

Text

The simplest block type = text, which displays some formatted text.

Parameters

Required parameters are marked with *

Field

Description

value*
textWithTranslation

Text to be displayed

multiline
boolean

Line break handling. If true, \n characters will be replaced with <br>. Default is false

title
textWithTranslation

Title attribute

bold
boolean

Bold text. Default is false

size
string

Text size. Can take values xs, sm, md (default is md)

color
string

Text color. Can take values base_50, base_60, base_70, base_90

scope
string

Visibility scope, for example web

Example

{
            "icon": {
                "code": "info"
            },
            "header": {
                "title": "Information Message"
            },
            "body": {
                "logo": {
                    "code": "notification"
                },
                "blocks": {
                    "text": {
                        "type": "text",
                        "properties": {
                            "value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
                        }
                    }
                }
            }
        }
        

Text

Long Multiline Text

The block type = largeText allows displaying long multiline texts that will automatically collapse to a preview.

Parameters

Required parameters are marked with *

Field

Description

value*
textWithTranslation

Text to be displayed

scope
string

Visibility scope, for example web

Example

Long text collapsed under "Show more".

{
            "icon": {
                "code": "info"
            },
            "header": {
                "title": "Information Message"
            },
            "body": {
                "logo": {
                    "code": "notification"
                },
                "blocks": {
                    "text": {
                        "type": "largeText",
                        "properties": {
                            "value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
                        }
                    }
                }
            }
        }
        

Long Text

The block type = link displays a link.

Parameters

Required parameters are marked with *

Field

Description

text*
textWithTranslation

Text to be displayed. HTML tags are not supported

action*
ActionDto

Action upon clicking the link

bold
boolean

Bold text. Default is false

scope
string

Visibility scope, for example web

Example

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

Block with Title

The block type = withTitle displays a title-value pair. Another content block can be used as the value.

Parameters

Required parameters are marked with *

Field

Description

title*
textWithTranslation

Title text

block*
ContentBlockDto

Content block that serves as the value. Blocks of types text, link, deadline are supported

inline
boolean

Display title and value in one line. Default is false

scope
string

Visibility scope, for example web

Examples

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

Multiple Content Blocks in One Line

The block type = lineOfBlocks displays several content blocks of type text or link in one line. This allows displaying text with different formatting mixed with links in a single line.

Parameters

Required parameters are marked with *

Field

Description

blocks*
ContentBlockDto[]

Associative array of content blocks. Blocks of types text, link, deadline are supported

scope
string

Visibility scope, for example web

Examples

{
            "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": "bold text",
                            "bold": true
                        }
                    }
                }
            }
        }
        

Deadline Selection

The block type = deadline displays the current deadline value with the ability to quickly change it. The block will not be shown if added to an incoming deal or a deal without a deadline.

Parameters

Required parameters are marked with *

Field

Description

readonly
boolean

Permission to change the deadline. Default is false. If the user does not have access to modify the entity to which the deal relates, or if the deal is completed, then readonly = true regardless of the settings provided

scope
string

Visibility scope, for example web

Examples

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

Continue Learning