Can someone help me to create Whatsapp phone numbe...
# 🤝help
c
My customer has a client list table, and he wants: 1. only the registered client to able communicate and reach data table without to check auth every-time - just by the phone number. 2. if the phone number is not in the client list table - ask if he want to join...
f
Hey there, You could create a table in Botpress, that stores all of the registered clients phone numbers. Then you would search this table with the find records card or via code to see if the users phone number is listed in the table. To get the phone number of the user you can read the following variable: {{ event.tags.conversation['whatsapp:userPhone'] }}. This number also contains the country code and has no spaces, dashes or signs.
I don't have a WhatsApp integration setup, but I can create a template that would outline the structure for this, if you want
c
Thank that help, but where to put {{ event.tags.conversation['whatsapp:userPhone'] }} ? in the Records Filter?
f
I would say so yea
c
which of them :)?
f
You should use it in the Find Records table
It will only work, when you are testing it via WhatsApp
It won't work in the Emulator, as there is no phone number for the user.
c
of course, but I get error when I added {{ event.tags.conversation['whatsapp:userPhone'] }} to the Records Filter
f
That is because it doesn't exist in the emulator
Have you tested it via WhatsApp
c
oh yes your right, thank a lot, btw how to get the name that match to the number instead of the number?
f
The name of the user you are chatting with?
On WhatsApp?
c
yes if the name is in the table list
I want to say: Hi {name} and not Hi {phone number} but the whatsapp phone number match to name
f
I am not sure if you can get the user name. You can ask the user for their name, and then add the users name, in the table, in the same row, as their phone number.
Maybe a @User can confirm this, or enlighten us on how to do it
m
I think if its set up right, it should get all the information about the person if its logged right. ie if you get their number or name it should be able to populate the rest, so I think if try using the name it should already be attached to the number?
i
hi, is possible to have a template of the bot? i try to do something similiar but i don't say anything of coding
12 Views