ResponseCard
is not part of Slot
or Intent
, that is why we can not add it through PutSlotTypeRequest
or PutIntentRequest
. It is part of the response which your bot is providing.
You can configure a response if a slot is not filled by the user and add a response card to that response.
Below code is the sample code of how to add response card:
"dialogAction": {
"type": "Close",
"fulfillmentState": "Fulfilled or Failed",
"message": {
"contentType": "PlainText or SSML",
"content": "Message to convey to the user. For example, Thanks, your pizza has been ordered."
},
"responseCard": {
"version": integer-value,
"contentType": "application/vnd.amazonaws.card.generic",
"genericAttachments": [
{
"title":"card-title",
"subTitle":"card-sub-title",
"imageUrl":"URL of the image to be shown",
"attachmentLinkUrl":"URL of the attachment to be associated with the card",
"buttons":[
{
"text":"button-text",
"value":"Value sent to server on button click"
}
]
}
]
}
}
For more details about ResponseCard, please check this answer.
Hope it helps.