Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Directives are powerful ways to control how a client application renders an experience to an endpoint, such as an Echo Show, Google Home Hub, chatbot, Facebook messenger, and an IVR/phone experience, to name just a few.

...

When the client invokes a flow that contains this kind of directivesdirective, the server will send the relevant information to the client and no further communication will happen.

...

Code Block
msg.payload.orbita.directive = 
  [{
     type    : "logout",
     title   : "Session logOut",
     options : {message: "You are logged out"}
  }];
return msg;

Text Break

The Text Break can be used on the chatbot where we need to provide breaks between conversations, like while transferring to a Live Agent.

Code snippet

Code Block
msg.payload.orbita.directive = [{
    type: 'textbreak',
    options: {
        primaryMessage: "Transferring you to a live agent.", //mandatory
        secondaryMessage: "12:45pm", //optional
        tertiaryMessage: "Sharron has entered the chat."  //optional
    }
}];

...

Directives that request information from the client and then render information

...