Blahbox Support Center
            Knowledge Base Blahbox Rich Messaging Amazon Lex

            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:
            Updated: 09 Dec 2019 05:40 AM
            Helpful?  
            Help us to make this article better
            0 0