How do I use the Banner directive?

Prerequisites

To render the banner effectively, you should switch to chatbot version - v2 in Bot view template node.

Banner

The banner directive enables an expandable ribbon on the top of the chatbot screen. You can customize the content of the banner based on your business use case.

You can add the banner directive code (sample given below) to the Project side menu > Develop > Chatbot settings > Settings tab.

Sample banner directive code

"directive": [ { "type": "dialog", "title": "<h4>If this is an emergency, please call 911.</h4>", "content": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...", "position": "top", "duration": "36000000000" } ]

Place the above code into the appSettings property as shown in the screenshot below.

Properties used for Banner

Property

Description

Property

Description

"type": "dialog"

The type property should be set “dialog

"title": "<h4>If this is an emergency, please call 911.</h4>"

The Title of the banner ribbon.

"content": "Lorem Ipsum”

The content displayed upon expanding the banner.

"position": "top"

The position of the banner. Takes the values top, bottom, right, left.

For example, if the position is set as “right

"duration": "36000000000"

The number of seconds the banner ribbon stays afloat on the chatbot window. Post this duration, the banner ribbon will be hidden (as shown in the screenshot below).

The banner works for chatbot v1 but the banner ribbon will not be visible.
The whole banner (title and content) will be visible on the chatbot screen as shown below.

Related Articles