API Reference
JSON Card
FPT.AI will call API and send message to user.
Declare variable
Json Card configure
https://api.sample.com)
Result of API (for example:Example response
{
"set_attributes": {
"voucher_code": "rpy3AdmumJGQSC6K"
},
"messages": [
{
"type": "text",
"content": {
"text": "Your voucher code is: rpy3AdmumJGQSC6K"
},
"buttons": [
{
"title": "Detail",
"payload": "<Step name>#base64(payload_data)"
},
{
"title": "More info",
"url": "https://sample-url.com.vn/info"
}
]
}
]
}
voucher_code: value will apply to "voucher_code" variable in "Scenario". messages: the list of message will send to user, this can declare in bot.fpt.ai after json_card.
Payload data
{
"set_attributes": {
"<variable name 1>": "<value>",
"<variable name 2>": "<value>"
}
}