bitter-cpu-84314
02/06/2024, 6:45 PMfresh-fireman-491
02/06/2024, 8:15 PMfamous-jewelry-85388
02/07/2024, 3:11 PMbitter-cpu-84314
02/08/2024, 6:58 PMfamous-jewelry-85388
02/09/2024, 4:58 PM[{label:'hi',value:'google.com',action:'postback'}]
famous-jewelry-85388
02/09/2024, 4:58 PMfamous-jewelry-85388
02/09/2024, 4:59 PMbitter-cpu-84314
02/09/2024, 8:05 PM${product.options}
,
valueType: 'dynamic'
},
subtitle: {
dynamicValue: ${product.product_name}
,
valueType: 'dynamic'
},
imageUrl: {
dynamicValue: ${product.product_img}
,
valueType: 'dynamic'
},
actions: [
{
action: 'postback',
label: {
dynamicValue: 'Order',
valueType: 'dynamic'
},
value: {
dynamicValue: ${product.product_id},${product.options}
,
valueType: 'dynamic'
}
}
]
}
}
// Create the carousel items
const carouselItems = workflow.product_info.map((product, index) => createCardForProduct(product, index))
// Send the carousel
bp.dm.replyToEvent(event, {
type: 'carousel',
items: carouselItems
})
// Send the quick replies
bp.dm.replyToEvent(event, {
type: 'choice',
text: 'please choose one',
options: [
{ label: 'find another product', value: 'find_prod' },
{ label: 'quit', value: 'quit' }
]
})`fresh-fireman-491
02/09/2024, 8:29 PMfamous-jewelry-85388
02/16/2024, 9:21 PMearly-train-33247
02/20/2024, 2:09 PMfresh-fireman-491
02/20/2024, 4:23 PM