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",
- "fulfillmentState": "Fulfilled",
- "message":{
- "contentType": "PlainText",
- "content": "Dogs"
- },
- "responseCard": {
- "contentType": "application/vnd.amazonaws.card.generic",
- "genericAttachments": [
- {
- "attachmentLinkUrl": "https://www.blahbox.net/4steps",
- "buttons": [
- {
- "text": "Dog 1",
- "value": "Dog 1"
- }
- ],
- "title": "Dog 1",
- "subTitle": "This is the best dog",
- "imageUrl": "https://estaticos.muyinteresante.es/media/cache/760x570_thumb/uploads/images/article/5c3871215bafe83b078adbe3/perro.jpg"
- },
- {
- "attachmentLinkUrl": "https://www.blahbox.net/4steps",
- "buttons": [
- {
- "text": "Dog 2",
- "value": "Dog 2"
- }
- ],
- "title": "Dog 2",
- "subTitle": "Real Friend!!",
- "imageUrl": "https://fotografias.lasexta.com/clipping/cmsimages01/2017/02/07/364CAAAC-A60E-43BB-8FED-05AA0B8F3AF9/58.jpg"
- }
- ],
- "version": "1"
- }
- }
- });
- };
More Information about Carousels on Amazon Lex:
Blahbox interprets the Lambda response and shows it to the user as is shown below:
Related Articles
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 - Carousel
A Carousel is a type of response that a virtual assistant trained with Amazon Lex can send to the user in order to improve the usability experience using images as a Carousel. Click here for more information. ...
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", ...
Dialogflow - Carousel Card
A Carousel Card 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 images as a Carousel. Click here for more information. ...
Amazon Lex - List - Lambda
With Blahbox, it's possible to send a List to the virtual assistant's user using Lambda. Code for Lambda function: exports.handler = (event, context, callback) => { var bboxResponse = {}; bboxResponse = { "bbox_list": { ...