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",
- "fulfillmentState": "Fulfilled",
- "message":{
- "contentType": "PlainText",
- "content": "Shoes"
- },
- "responseCard": {
- "contentType": "application/vnd.amazonaws.card.generic",
- "genericAttachments": [
- {
- "attachmentLinkUrl": "https://www.blahbox.net/",
- "buttons": [
- {
- "text": "Buy",
- "value": "I want to buy it"
- },
- {
- "text": "More Info",
- "value": "More Info"
- }
- ],
- "imageUrl": "https://d3u67r7pp2lrq5.cloudfront.net/product_photos/29451960/2_original.jpg",
- "subTitle": "Nice Black Shoes",
- "title": "Men Shoes"
- }
- ],
- "version": "1"
- },
- }
- });
- };
More Information about Cards 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 - 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", ...
Amazon Lex - Card
A Card 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. Click here for more information. When Blahbox detects a Card, it interprets and ...
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": { ...
Amazon Lex - Suggestion Chips - Lambda
With Blahbox, it's possible to send Suggestion Chips to the virtual assistant's user using Lambda. Code for Lambda function: exports.handler = (event, context, callback) => { var bboxResponse = {}; bboxResponse = { "bbox_suggestions": { ...