
Announcements
Hi Team,
Can you please help me on How to Pull the Dynamics 365 Business Central Customer records based on the Phone Number or Order Number by Using Power Virtual Agents and Power Automate Flows
Hi @RKG,
You could call a flow from within your Power Virtual Agent topic. In that flow you could use the phone number as a filter query in the Find Records (V3) action of the Business Central connector.
Below is an example setup.
1. The Power Automate flow
In the Customer output variable the following expression is used to check if any customer records are found:
if(empty(outputs('Find_records_(V3)')?['body/value']), 'No customer found', concat(outputs('Find_records_(V3)')?['body/value'][0]['number'], ' - ', outputs('Find_records_(V3)')?['body/value'][0]['displayName']))
2. An example of a topic where the user is asked to enter a phone number.
When it has found a match I am returning the number and the displayname of the first record found back to the bot. When no result is found the text 'No customer found' is sent back to the bot.