Dynamics 365 Sales is a customer relationship management (CRM) software solution that is part of the Dynamics 365 suite of business applications. It is designed to help sales teams manage their relationships with customers and prospects and streamline sales processes. With Dynamics 365 Sales, salespeople can access customer data and interactions from a single platform, track sales activities and opportunities, automate tasks, and collaborate with other team members and departments.
Dynamics 365 can be used by Microsoft Power Automate to automate almost anything within Dynamics 365. Dynamics 365 and Power Automate together, make a great combination for further enhancement of your sales process.
In this example we will teach you how to use Power Automate to send a message to your sales staff via Microsoft Teams when a price change has been detected in a Dynamics 365 Pricelist.
Step 1: Create new Power Automate Flow
Go to https://make.powerautomate.com/ and click on “Create”, and select “Automated Flow”
Step 2: Enter Flow name and select Dataverse
Give the flow a name, and search for “dataverse” and select “When a row is added, modified or deleted”
Step 3: Configure Trigger that will start up our Flow
On the next screen we will configure the trigger. We will configure the Change Type to “modified” to ensure that the trigger only runs when a price list has been modified.
Table name: Price List Items (as we want to target Price List Changes in this case)
Scope: Organization (We want this flow to run for the entire dataverse organization, not just our user scope)
Step 4: Get details of product thas has been modified in the price list
First we need to get the record of the Product that had a price change. We will add a new action to our flow and search for “dataverse” and select “get a row by ID”
We will select the table name “Products” and for Row ID we will select “Product (Value)”
Step 5: Get Price List Currency
In our case we have price lists with different currencies, hence we will need to retrieve the actual currency of the pricelist.
We do that again with a Dataverse : Get Row by ID and select Currencies and Row ID: Currency (Value)
Step 6: Create Chat Message
Since the Teams “Post message in a chat or channel” is sometimes buggy when it comes to message layouts, it is recommended to draft your message in a compose, and parse the compose to the next step.
Here is our chat message including a little layout tweaking such as adding <strong> </strong> to make some letters bold.
We want to show the product code, which in our case is a custom field named “Product ID”. The amount is the local amount from the price list, for which we add the Curency as well in order to be complete.
Step 7: Post Message in a Chat or Channel
Now we can do the final step, which is to post our chat message in a group chat or in a channel. In our case we have a chat specifically for our sales team, where we want to post the message in.
The actual message is the output of our compose in step 6
When you’re done with above, the entire flow should have the following elements:
Now you can test your flow, and (hopefully) it should work. Here is an example of how it looks on our side:
Great Work! Feel free to reach out if you have any issues or questions regarding above flow.