Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

PowerAutomate Flow when Opportunity is updated

Posted on by 50

Our organization is creating flows for when an opportunity is modified using the When a row is added, modified or deleted step.  The challenges is that when a user updates a record, it can generate 2-3 events as not all fields are updated in the same transaction (e.g., when marking step in BPF complete, closing opp as won).  Is it possible to queue changes for a single row into a single flow?  Essentially, we are capturing the status into the "last status" custom field, so we do not generate multiple won emails, or create multiple project entries for the won opp.

Has anyone run into similar issues, when wanting to trigger notifications or other actions when an opportunity enters a different status? Or is it better to modify the BPF and insert a trigger flow then?

UPDATED 1/20/2023:

Here is the current flow:

pastedimage1674229638023v1.png

Currently the flow triggers when any field is modified:

pastedimage1674229184942v6.png

Skips any flows triggered by the service account running the flow:

pastedimage1674229240708v7.png

Updates my custom "Last xxx" steps if the values have changed:

pastedimage1674229423481v9.png

  • Levi Stevens Profile Picture
    Levi Stevens 50 on at
    RE: PowerAutomate Flow when Opportunity is updated

    I have use cases based on status, probability, assignee, etc.  The challenge is that if I combine them all in one flow, the flow will be triggered if any of my target fields change. I will run into the same issue, if the status changes and the probability, or otherwise, there may be a timing issue where it triggers multiple notifications as the "last xxx" field hasn't been updated.  I am not aware of any way for a specific triggered flow, to check "WHICH" field changed, so I have to break them out into seperate flows with seperate column filters.

    If the status changes, a flow runs, and notification happens.  If the probability is modified simultaneously, a separate flow runs for that and only sends the appropriate notification.  Avoids getting two notifications for the status change just because another field was updated simultaneously and before the last status field can be updated.

  • Levi Stevens Profile Picture
    Levi Stevens 50 on at
    RE: PowerAutomate Flow when Opportunity is updated

    See updated post with the complete flow and expanded sections

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 8,454 Super User 2024 Season 1 on at
    RE: PowerAutomate Flow when Opportunity is updated

    Yoc can create 4 flow or can have 4 conditions in one flow where we have to check the status..... And as per the status your customization will run.

  • Levi Stevens Profile Picture
    Levi Stevens 50 on at
    RE: PowerAutomate Flow when Opportunity is updated

    s.sheikh - My solution is already doing this, this is still impacted by the flow of multiple flows triggered and I end up with duplicate notification emails or projects created on closure due to timing.  Combining this technique with the suggestion from Amit Katariya I believe may work, it just requires me to break my flows into 4 separate flows instead of a single one. 1) New 2) Change - Assignee 3) Change - Status 4) Change - Probability.

  • Levi Stevens Profile Picture
    Levi Stevens 50 on at
    RE: PowerAutomate Flow when Opportunity is updated

    Haig Liu This doesn't seem relevant to my post

  • Levi Stevens Profile Picture
    Levi Stevens 50 on at
    RE: PowerAutomate Flow when Opportunity is updated

    I will try this and let you know how it works.

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 8,454 Super User 2024 Season 1 on at
    RE: PowerAutomate Flow when Opportunity is updated

    Can you share an example that will be more helpful. Because it is still confusing how can status will be different? 

  • s.sheikh Profile Picture
    s.sheikh 20 on at
    RE: PowerAutomate Flow when Opportunity is updated

    One possible solution to this problem is to use a custom field, such as the "last status" field, to store the current status of the opportunity. This field can be updated each time the opportunity is modified, and the flow can be configured to check the value of this field before triggering any notifications or actions.

    Another solution is to modify the Business Process Flow (BPF) and insert a trigger flow, this will ensure that the flow only triggers when the opportunity enters a different status. This can be achieved by adding a step in the BPF that checks the current status and compares it to the "last status" field, if they are different then trigger the flow, otherwise do nothing.

  • Suggested answer
    Haig Liu Profile Picture
    Haig Liu Microsoft Employee on at
    RE: PowerAutomate Flow when Opportunity is updated

    Hi Levi Stevens,

    I thought you might need this:

    https://powerautomate.microsoft.com/en-us/blog/parallel-actions/

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 8,454 Super User 2024 Season 1 on at
    RE: PowerAutomate Flow when Opportunity is updated

    If u want to trigger the flow when specific field is updates then u have to add only that field in filter rows of your step. 

    Please refer below article which will help u to implement your requirement. 

    https://learn.microsoft.com/en-us/power-automate/dataverse/create-update-delete-trigger#filtering-columns

    Thank You, 

    Amit Katariya

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans