Skip to main content

Notifications

Calling Actions from Copilot Studio
Unanswered

How to parse incoming phone number

Posted on by

Hi,

 

I have an Omnichannel SMS Workstream configured with a PVA bot.  I am able to trigger the bot topics with a text message to a particular phone number, which is great.  I am trying to discern if the PVA bot can grab the incoming phone number and pass it to a Power Automate Flow to filter a table in our Dataverse.

 

When I review the session logs in the PVA analytics area for my bot, I can see my phone number is captured in the ChatTranscript column (I've blocked it out in red):

 

2023-03-31_13h42_31.png

 

I think that payload is getting passed from Dynamics/Omnichannel though, so I'm not sure how to grab the "PrimaryDisplayValue" key.  Thanks in advance.

Categories:
  • Varun8492 Profile Picture
    Varun8492 22 on at
    Re: How to parse incoming phone number

    Yes, it is possible to grab the incoming phone number from an Omnichannel SMS Workstream and pass it to a Power Automate Flow to filter a table in Dataverse.

    To achieve this, you can use Power Automate to create a flow that triggers when a new SMS message is received by your Omnichannel Workstream. The flow can then extract the phone number from the message and use it to filter a table in Dataverse.

    Here are the high-level steps you can follow to accomplish this:

    1. In Power Automate, create a new flow with the "When a new message arrives in a channel" trigger.

    2. Select the "Omnichannel for Customer Service" connector and choose your SMS Workstream.

    3. In the trigger, you can access the incoming phone number by using the expression triggerOutputs()?['body/senderPhoneNumber'].

    4. Use this expression in a "Get rows" action for your Dataverse table to filter the rows based on the incoming phone number. You can use the Filter Query option and build a query that filters the table based on the phone number.

    5. Once you have the filtered data, you can perform any desired actions with it, such as sending an email, updating a record, or sending a message back to the SMS sender.

    I hope this helps! Please hit like 🙂

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,006

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics