Power Community

Power Community

Generate in-app notifications within Dynamics 365 using Power Automate flow.

Wouldn’t it be wonderful if upon your next login to Dynamics, you were promptly informed of significant events that occurred during your absence? Such as leads being assigned to you, opportunities closed by your team, or new cases opened.

Now, all of this is achievable through ‘in-app notifications’ for Dynamics 365.

Enable the feature within your model driven apps and users will see notifications when they log in, navigate pages or are on a page for more than a minute.

Enable the feature.

  1. Navigate to the maker admin(https://make.powerapps.com/) and open the model-driven app you would like to enable this feature in and select the edit.
  2. Select settings, Navigate to Features and enable ‘In-app notifications’.

Rahman1005_0-1711963426510.png

After refreshing your browser, you should see the notification bell in your header.

Rahman1005_1-1711963440758.png

In this example I am going to create a notification when a new phone call record is created for case, and I am going to show the notification to the case owner. Obviously, you can use any trigger in Power Automate flow to create a notification.
We are going to create an automated cloud flow when creating the new flow. Click ‘+New Flow’ Make sure you name your flow, for my example I called the flow ‘In-App Notification on new call’.
For the trigger I’m going to use the ‘When a row is added, modified or deleted’. The change type is ‘added’ and the table name is ‘phone calls’. My scope is organization (I want this to run for everyone in the organization) and I am going to run this flow as the modifying user. That’s all you have to enter in the trigger step!

Rahman1005_2-1711963469754.png

In the next step I am going to get case record.

Rahman1005_3-1711963483971.png

In the next step we’re going to create the actual notification in data verse. Click on ‘+New Step’ and select ‘Add a new row’. For “Table name” select the ‘Notifications’ table.

The rest of this step is really about who the notification goes to and what we want to show in the notification.

In the “Title” field I am going to enter “New phone call has been added for your case!!!”. The title field will show in bold in the notification.

In the ‘Body‘ field I am going to enter “A new phone call has been added for your Case Number:” followed by the dynamic content in the case number field of the case that triggered the flow. The data in the ‘Body‘ field will show below the ‘Title‘ field in the notification.

The ‘Data‘ field in the step is a JSON structure to provide a more advanced control over the notification. links, and/or custom icons. However, those make for better notifications.

In the ‘Expiry (seconds)‘ field I will enter the number of seconds after which the notification will be deleted. I am going to set this for 20 minutes, which equals 1200 seconds.

The ‘Icon Type‘ field will allow you to choose an icon to be shown in the notification. There are a few icons you can use out of the box, and it looks like can use a custom icon as well. I haven’t figured out how to do that yet, so I am going to pick the out of the box “Info” icon.

The ‘Owner(Owners)‘ field represents who will see the notification,. Note that I entered /system users first and the dynamic content (Owner(value)) in parentheses.

Lastly you can set a priority and set the toast type to ‘Timed’. That’s all for the flow configuration! Make sure you save your flow and test it to make sure everything works as expected!

Rahman1005_4-1711963502172.png

In Content, paste the following JSON. Replace the with the entity name and with the GUID of the specific record for which the link needs to be generated.
{

“actions”:[

             {

“title”: “Open Phone Call”,

“data”:{

“url”: “?pagetype=entityrecord&etn=&id=<=recordId>“,

“navigationTarget”: “newWindow” }

              }

           ]               

}

I am going to add a phone call for a case now.

Rahman1005_5-1711963514509.png

Rahman1005_6-1711963535186.png

After the phone call created, a notification is received along with an action. Clicking on ‘Open Phone Call’ will open the popup case record.

Rahman1005_7-1711963545046.png

After clicking the ‘Open Phone call” action, the case record will be displayed in a new window.

Rahman1005_8-1711963555584.png

Thank you..!

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Web resource method does not exist in Dynamics 365 CE

Got the below error while working on Onload of Account record JavaScript in Microsoft Dynamics 365 CE. Script Error One of...

More Articles Like This

- Advertisement -spot_img