How to get user's phone number from Conversations ...
# 🤝help
f
Hello guys, recently I've been developing my a Chatbot over Botpress for my business which I recently deployed over WhatsApp but now I'm facing a problem with users coming with a query for which I have to revert back to them but, I'm not able to see their phone numbers but only their names in Conversation area in Botpress dashboard. Is there any way to solve this?
r
If tou inspect the network, you’ll see in the conversation tags the phone number of the user
To inspect the network and check the result of an API request made by the Botpress frontend in Chrome, follow these steps:Open your Botpress dashboard in Chrome.Right-click anywhere on the page and select “Inspect” or press Ctrl+Shift+I (Windows) or Cmd+Option+I (Mac) to open the Developer Tools.Click on the “Network” tab in the Developer Tools.Make sure the recording (red circle) button is enabled to start capturing the network traffic.Perform the action in Botpress that triggers the API request you want to inspect.Look through the list of network requests that appear. You can filter by XHR to narrow down to the API requests.Click on the request you are interested in to view more details.In the details pane, you can see various tabs like Headers, Preview, Response, etc. The “Response” tab shows the actual data returned from the API.You can use this information to debug or understand the data exchange between the Botpress frontend and its backend services.
f
That is really, helpful thanks a lot!!! But, is their any straight way or a way through which a non techie person can navigate through the dashboard of Botpress or Meta Suite to figure out the phone numbers of the clients? Because I need to handover the bot to someone who's non techie and need a UI interface to do this thing.
r
@full-horse-97274 we're going to improve the conversations panel over time There's another dashboard right here that allows you to see the conversations and the tags: https://inbox.botpress.sh/ You will need to generate a personal access token to use this
Please note this is not an officially supported Botpress product, it's been built by our awesome community member @early-train-33247
e
Thanks Sly! 🦾 That's right @full-horse-97274, the easiest way to see the phone number of a user in a conversation is through the Custom Inbox at the moment. You can reply directly in there as well, without needing to open WhatsApp. You can also read the number in the Studio with the variable
{{event.tags.conversation['whatsapp:userPhone']}}
which stores it with the country code. It's possible to print it at any moment!
f
Woah! This thing totally worked out!!! Thanks a lot!!! Botpress documentation must mention and highlight this thing as well.
As now I have implemented this, all the users are showing up with same name as "Chatbot User". Is it possible that their actual name or number appear here only? https://cdn.discordapp.com/attachments/1226271692297338911/1226807258390986793/rn_image_picker_lib_temp_074f1a4a-ba67-4335-b517-3e3a20ceb70e.jpg?ex=66261c4b&is=6613a74b&hm=a33626e4950849b19d47597645640ee76b0a105007a49b56bd0ba3c3b06da602&
e
That’s a possible improvement for the tool! Its code it’s available at https://github.com/botpress/inbox, you can create issues and make pull requests there
f
Sure, thanks!!!
e
I remember there was a tech constraint to have the names in the list - the app had to load every conversation info in order to get the tags, but if you are just browsing through the conversations, it would make several requests with no need.
If you create an issue in the repository I could try to come up with a solution! 😉
f
Ok, sure, thanks 😉
Is there any way to use this Variable {{event.tags....}} to fetch the number and send this number as a data field in Google sheets?
e
the number is already available in the variable, you can use it at any moment in a WhatsApp conversation
create a code card with the label "save user phone to google sheets api", the code will be generated
then just updated it if necessary
f
Hey @Guilhermy @rich-battery-69172 , can I use
{{event.tags.conversation['whatsapp:userPhone']}}
to store user phone number into a workflow variable?
Hey @Guilhermy @rich-battery-69172 , can I use
{{event.tags.conversation['whatsapp:userPhone']}}
to store user phone number into a workflow variable?
5 Views