The clients API will be providing the value and we will be required to bind it to an image and share it to the customer.
Please suggest how can we achieve the same? Example screenshot attached.
@Subhrajit_Gupta Iām not familiar with app platform.
Do these node formats remain the same across both app.ym and cloud.ym?
Hi @UdayaSudesh,
What do you mean by dynamically generating image?
Are you getting https image from API?
app.whatsapp.sendQuickReplies({
title: 'Do you wish to receive updates from yellow.ai on WhatsApp?',
image: 'https://cdn.yellowmessenger.com/pJr5TMMzaC3M1604657265596.png',
options: [
{ title: 'Yes', text: 'Yes' },
{ title: 'No', text: 'No' },
],
});
or
app.whatsapp.sendCards(
[{
title: 'OPTIN Confirmation', image: imageUrl, text: `Do you wish to receive updates from yellow.ai on WhatsApp?`,
actions: [
{
title: 'Yes',
text: 'Yes'
}
]
}
]
for texts
You can use WA QuickReply for a single image yes/no prompt or use
sendImage() for multiple in a loop images before the final
app.whatsapp.sendQuickReplies({
title: 'Do you wish to receive updates from yellow.ai on WhatsApp?',
options: [
{ title: 'Yes', text: 'Yes' },
{ title: 'No', text: 'No' },
],
});
Quick reply prompt without image.
The choice is yours.
For multiple images, the delivery of the images might not be sequential.
@gautham Hey, my bad. Missed that he asked for app. Taken down the prev post.
If you could refer the screenshot in the question, the image (the red one with the piggy bank) will be shared by the customer. In the flow, we are expected to make an API call, that will give us the balance (not the image, only as a string). We have to append the value into the image on our end and send it to the user.
Hi @UdayaSudesh,
app.sendImage('image.url', { mime: 'image/jpg', caption: `Name: ${steps.cg_detail.name}\nAge: ${steps.cg_detail.age}\nGender: ${steps.cg_detail.gender}\nMobile: ${steps.cg_detail.phone}\nVerified: ${steps.cg_detail.verified}`})
The caption will have the API details and image url will be the cdn file.
After sending this Image you will configure the yes/no prompt.