Let’s Talk Power Automate

We recently had a client request an enhancement for their Dynamics 365 Sales opportunities and quotes to include freight charges at the product line level. While standard Dynamics 365 includes freight amounts at the Opportunity and Quote levels, our solution showcased below requires extending this functionality. Using Power Automate and Dataverse (formerly CDS), we implemented a flow to update and manage freight charges. This integration showcases the flexibility and power of combining Dynamics 365 with automation tools to meet specific business needs.

opportunity sales process dynamics 365

However, our client needed a more granular way for tracking freight amount (charges) for an Opportunity or Quote. We can easily create some new currency fields for them at the Opportunity Product Line level to capture these currency amounts.

dynamics 365 opportunity product line

These fields can now be provided to the user in the Edit Inline Views on the Opportunity or Quote itself so that the user can easily see the freight amounts and totals for each product line.

edit inline views d365 sales

But…what about totaling up the freight amount from each product line and bringing that value up to the Opportunity or Quote level in the out-of-the-box freight amount field?

total freight amount opportunity quote d365

You could use rollup calculated fields here and this solution would work, however, another option is to use Power Automate to sum up all the product line freight amounts for you and store this value in the out-of-the-box freight amount field on the Opportunity or Quote.  This will also allow for all the other built-in calculations for the opportunity to still function.

Here we can use a Power Automate flow to be triggered whenever an opportunity product line is created or updated to get a list of all of the product lines.  The flow can then sum up the freight amounts using the add function(fx) and a couple of variables, then write the total value back into the opportunity freight amount field.

d365 power automate flow

Now we can see that the freight amounts from the opportunity product lines have rolled up to the opportunity out-of-the-box field freight amount.

opportunity product lines rolled up dynamics 365

Thanks for reading! You may also be interested in…

  IMTS and Digital Transformation – When Worlds Collide

1 Comments

  1. Henry McCallum on February 1, 2021 at 3:16 am

    Thank you – A clean and simple approach to address not only freight but other fields (columns, elements, attributes- ms and their name changing) where standard calculated fields might work. The beauty of this method is it does not interfere with existing calculated fields and business rules.