Amazon Lex - Suggestion Chips - Lambda

Amazon Lex - Suggestion Chips - Lambda

With Blahboxit's possible to send Suggestion Chips to the virtual assistant's user using Lambda.

Code for Lambda function:
  1. exports.handler =  (event, context, callback) => {
  2.     var bboxResponse = {};
  3.     bboxResponse =  {
  4.   "bbox_suggestions": {
  5.       "options": [
  6.         {
  7.           "title": "Buy"
  8.         },
  9.         {
  10.           "title": "More Info"
  11.         }
  12.       ]
  13.     }
  14.     };
  15.     
  16.     callback(null, {
  17.         "dialogAction": {
  18.             "type": "Close",
  19.             "fulfillmentState": "Fulfilled",
  20.             "message":{
  21.                 "contentType": "CustomPayload",
  22.                 "content": JSON.stringify(bboxResponse)
  23.             }
  24.         }
  25.     });
  26. };

Blahbox interprets the Lambda response and shows it to the user as is shown below:
    • Related Articles

    • Amazon Lex - Suggestion Chips

      With Blahbox, it's possible to send Suggestion Chips (Buttons) to the virtual assistant's user using IBM's Watson Assistant. To make Blahbox display Suggestion Chips, the JSON code below must be pasted in the "Custom ...
    • Integrate Amazon Lex

      This article will help you set up Amazon Lex in Blahbox. To access the Amazon Lex trained bot, you must first of all obtain certain information from the AWS platform Data required: User Credentials Bot name, Alias and Version Region Link ...
    • Amazon Lex - Card - Lambda

      With Blahbox, it's possible to send a Card to the virtual assistant's user using Lambda. Code for Lambda function: exports.handler =  (event, context, callback) => {     callback(null, {         "dialogAction": {             "type": "Close",         ...
    • Amazon Lex - Carousel - Lambda

      With Blahbox, it's possible to send a Carousel to the virtual assistant's user using Lambda. Code for Lambda function: exports.handler =  (event, context, callback) => {     callback(null, {         "dialogAction": {             "type": "Close",     ...
    • Dialogflow - Link Out Suggestion

      A Link Out Suggestion is a type of response that a virtual assistant trained with Dialogflow can send to the user in order to improve the usability experience using a button that links out to a URL. When Blahbox detects a Link Out ...