Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

Get the user's phone number from WhatsApp

Like (0) ShareShare
ReportReport
Posted on 5 Jun 2023 12:09:22 by 109

Hi everyone,

I have this PVA bot integrated with WhatsApp through Dynamics 365 and Twilio. I need to get the user's phone number so I don't have to ask for it on every new interaction with the bot. Is there a way to get it without explicitly asking?

 

I can see that omnichannel has the phone number and I know it is somehow linked to the corresponding conversation but I can't figure out how to get this info.

Pochoide_0-1685966700852.png

 

Thanks in advance,

Gabriel Quiroga

Categories:
  • Verified answer
    Pochoide Profile Picture
    109 on 12 Jul 2023 at 13:11:38
    Re: Get the user's phone number from WhatsApp

    Well, I found a way also for the Classic PVA version, using the Dataverse table "msdyn_ocliveworkitem" and filtering it with the "msdyn_conversationId" variable. The problem with this method is that it can't be done in the development environment, it has to be done in the production environment, where both the table and the variable are.

  • Pochoide Profile Picture
    109 on 16 Jun 2023 at 11:22:47
    Re: Get the user's phone number from WhatsApp

    Thanks @pkorasapati , this worked with the new PVA version, but for a few reasons I can't update this bot yet. Is there any variable like that one in the old one?

  • pkorasapati Profile Picture
    16 on 16 Jun 2023 at 06:25:11
    Re: Get the user's phone number from WhatsApp

    Please try this one . We just cracked it today - Activty.From.Name

    pkorasapati_0-1686896681853.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - General

Overall leaderboard