https://discord.gg/botpress logo
whatsapp integration and "Start Conversation" card
# 🤝help
b
HI guys, i need your help! I´m having a lot of trouble using a template of my Whatsapp Business account that i have integrated with my bot. In this template i´m using 8 variables for my text body, and i´m using to Call-To-Action buttons (the "visit website type") But the problem that i´m facing is that the variables of this buttons (yes, the buttons are dynamic and use varibles at the end of the link) can get put in the "started conversation" card of botpress. If i try to put them in total are 10 variables (8 of text and two of buttons), But when this part is executed it throws an error: {"message":"(#132000) Number of parameters does not match the expected number of params","type":"OAuthException","code":132000,"error_data":{"messaging_product":"whatsapp","details":"body: number of localizable_params (10) does not match the expected number of params (8)"},"fbtrace_id":"Au1RAMCtdnSFCSCguNTWCsx"}. Can someone please tell if it´s possible to use templates of whatsap with Cal-To-Action buttons that have dynamic link? I have tried with static links and they work really fine because i don´t need to send a variable with the JSON in the "start conversation" card, but i need to know if i´m missing something 😭 https://cdn.discordapp.com/attachments/1372373125890703430/1372373126184177745/metaTemplate.png?ex=68268992&is=68253812&hm=5286526a951d5ceadb75ff83104a9fa78895cadc0f48b756d2a40a4c0c635f22& https://cdn.discordapp.com/attachments/1372373125890703430/1372373126473842738/variablesTemplate.png?ex=68268992&is=68253812&hm=d5edb0a67890f6f116a69024bd49792e9da43b1c93f2361123f3e91b5a0cb739& https://cdn.discordapp.com/attachments/1372373125890703430/1372373126708592651/errorWhatsappStartConversation.png?ex=68268992&is=68253812&hm=5c349d7a2d2802260a0d8ca4b48c6c6fbfe2da202efb2eea32f1ecb8999269fc&
p
b
Hello, Leanne. Yes, I have followed the meta docs to create a template message with CTA buttons (the ones with dynamic links) and I have followed the botpress documentation to pass the values as specified. The problem here is that botpress always throws me an error like the one that i shared. In my case I send 10 variables because 8 are used for the text body and 2 are used for the buttons (the error is this one "number of localizable_params (10) does not match the expected number of params (8)"). Can I get some help with this problem please? When I don´t use buttons in my templates it works really fine, but the problem is when i need to use a dynamic link button.
p
Ok I see. Can you explain the use case for the dynamic button better? There might be a way to achieve this without passing them through the template...
b
yeah of course. The problem that we have is that when we use a template with dynamic buttons in whatsapp, at the moment that we try to pass the variables through the "start conversation" card in botpress, it shows the next error "number of localizable_params (10) does not match the expected number of params (8)", in my template I use 8 variables of text and 2 variables for my 2 dynamic buttons, in total I need to send 10 variables, but in the log of botpress it says that the expected variables are only 8. I tried to pass only 8 variables in the "start conversation" card but when I do this the next error shows Error: {"message":"(#131008) Required parameter is missing","type":"OAuthException","code":131008,"error_data":{"messaging_product":"whatsapp","details":"buttons: Button at index 0 of type Url requires a parameter"},"fbtrace_id":"A3T6wzUfFggFzFBN36UVOh2"} Can I please get some help? It´s been really confusing because the documentation of botpress doesn´t say how to send a link to a dynamic button with the "start conversation" card of whatsapp
l
The problem is not totally with Botpress as Botpress does not know your template! The start conversation card will send all values to the body and hence the error message "number of localizable_params (10) does not match the expected number of params (8)" Your template message body will only accept 8 values and not 10, but the card will send all 10 to the body. To solve this you must have used WhatsApp manual configuration so you have access to the META Access Token and use graph API to send the template message using execute code card Additionally add this to feature request the Discord channel to add body variables to the start conversation card
b
So it´s not possible to use the "start conversation" card when I use a template with dynamic buttons in meta?
p
No, not at the moment, unfortunately.
5 Views