
Announcements
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):
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.
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:
In Power Automate, create a new flow with the "When a new message arrives in a channel" trigger.
Select the "Omnichannel for Customer Service" connector and choose your SMS Workstream.
In the trigger, you can access the incoming phone number by using the expression triggerOutputs()?['body/senderPhoneNumber'].
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.
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 🙂