Automating Opportunity Timeline Updates for Owners and Sales Teams in Dynamics 365 using power automate - CloudFronts

Automating Opportunity Timeline Updates for Owners and Sales Teams in Dynamics 365 using power automate

Posted On September 5, 2024 by Mithun Varghese Posted in  Tagged in

What is Opportunity in D365 CRM?

The opportunity table represents a potential sale to new or established customers. It helps you to forecast future business demands and sales revenues. You can create a new opportunity in Dynamics 365 for Customer Engagement to monitor an inquiry from your existing customer or convert a qualified lead into an opportunity. Opportunities are frequently used by salespeople to monitor the sales engagements they are presently working on.

For More details, please follow the link
https://learn.microsoft.com/en-us/dynamics365/sales/developer/opportunity-entities

What are Notes in Timeline Section of D365 CRM?

The timeline makes the entire history of activities visible to app users. The timeline control is used to capture activities like notes, appointments, emails, phone calls, and tasks to ensure that all interactions with the related table are tracked and visible over time. Use the timeline to quickly catch up on all the latest activity details.

For More details, please follow the link https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/set-up-timeline-control

Use Case: Using Power Automate, whenever the notes in the Opportunity’s Timeline are updated, an automated email will be sent to the Opportunity Owner and associated Sales Team in the timeline of that Opportunity.

Steps:

– Login to make.powerautomate.com with your CRM credentials and you will land onto this page.

– Once you have landed into Power Automate Page, click on Create and selected Automated Cloud Flow

– Set your Trigger as the below since the flow should start working only when the Notes are added in the timeline of the Opportunity.

– I have also set a certain condition to this flow.  In other words, it checks whether there is a non-empty value in _objectid_value and that this value’s type is ‘opportunities’. The expression returns true if both requirements are satisfied and returns false otherwise.

– The Expression is @and(not(empty(triggerOutputs()?[‘body/_objectid_value’])),    equals(triggerOutputs()?[‘body/_objectid_type’], ‘opportunities’))

– Then Initializing variable for Email Addresses

– Initializing variable for Notes Table

– Retrieving the Owner’s Email Address. This step is necessary to obtain the Opportunity Owner’s email address so that we can send the initial notification email to them.

– List All Notes in the Opportunity. We use the List rows action to retrieve multiple Note records associated with the Opportunity. This allows us to access all the notes within the Opportunity’s timeline.

– Get opportunity by ID. Here we are fetching the complete details of to access all the fields and data associated with the specific record. We are filtering out based on name and opportunity id. The row ID is typically obtained from another step in your flow, such as a “List rows” action or a trigger that provides record details. My record details where I need fetch details is from Opportunity. 

– After retrieving the record, we need to fetch details of the associated Sales Team. This ensures that whenever a record is linked to the Sales Team, all members of the Sales Team receive an email notification. Thus, we are connecting the Sales Team to the Opportunity to include them in the notification process. The Fetch XML needs to be taken from Advanced Find in CRM.

– In this step, we need to store the email address of the sender (i.e., the “From” user). We initialized this variable in step 3, so here we will save the GUID of the sender into that variable.

– In this step, we need to save the email address of the recipient (i.e., the “To” user). We initialized this variable in step 3, so here we will store the GUID of the recipient into that variable. a participationtype mask of 2 indicates a specific participant role or type, i.e., sales team members associated with this Opportunity.

– Next, we need to ensure that the content is structured within a table. As specified in step 6, I created a variable called `NotesTable` to hold this data. We will use this table to format the content into an HTML table for the email.

– In this step, we are configuring the URL link for the Opportunity. Include the base URL of the environment and append the unique identifiers for both the Opportunity and the Topic field (which is a field within the Opportunity).

– Sending an Outlook Email to the Opportunity Owner and Sales Team associated with the Opportunity. This Outlook mail works only if ‘Email Addresses Sales Team is Skipped’.

– In Power Automate, adding a new row typically involves using actions provided by connectors such as Dataverse, SQL Server, SharePoint, or others, depending on where your data is stored. Here we have created an email body in this action.

– In this step, we are using a bound action to send emails within the CRM system.

    Output:

    1. Whenever the notes in the Timeline of the Opportunity get updated, the Opportunity Owner and the Sales Team associated with the respective opportunity will receive an email with the following contents. The Sales Team Members are manually added in the Sales Team Grid.
    2. So, once I try to add a note in the timeline section and after writing the contents.  

    – Once, I click on Add Note, waiting 5-10 seconds and then you find the email within the timeline. Please note that the Email is tracked within CRM itself.

    – Below is the Opportunity which contains the Opportunity Owner, and the Sales team associated with that Opportunity. The Owner is CF Admin, and the Sales Team Members are Amit Prajapati, Ethan Rebello and Mithun Varghese.

    – The Opportunity Owner and Sales Team will receive notifications about the Notes in the timeline. All email interactions will be tracked in the Opportunity’s timeline, where you can also view all previous notes associated with this timeline.

    Conclusion:

    Automating bulk case resolution using Power Automate in Dynamics 365 CRM offers an efficient way to streamline your workflows and reduce manual errors. By setting up automated email notifications for updates in the Opportunity’s timeline, your sales team and opportunity owners stay informed, ensuring smoother communication and faster response times.

    We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at [email protected]


    Share Story :

    SEARCH BLOGS :

    FOLLOW CLOUDFRONTS BLOG :


    Secured By miniOrange