Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Prerequisites

To render the banner, 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.

Sample app settings code that contains the banner directive

msg.payload = { 
    speechToText: "Native", 
    headerLogo: "",
    micInput: true,
    // mapKey: "AIzaSyAkXLtWzPecEu_kzI03dxQ2T1rJcmB-97E",
    directive:[
        {
            "type":"dialog",
            "title":"<h4>If this is an emergency, please call 911.</h4>",
            "content":`<p>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, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
                // 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, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p><br/>  <p>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, when an unknown printer took a galley of type and scrambled it to make a type specimen book.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, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>`,
            "position":"top",
            "duration":"36000000000" //milliseconds
        }
    ]
};
return msg;

Parameters used for Banner

type

The type property should be set “dialog

title

The Title of the banner ribbon.

content

The content displayed upon expanding the banner.

position

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

duration

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).

Related Articles

  • No labels