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.
- 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.
- Select settings, Navigate to Features and enable 'In-app notifications'.
After refreshing your browser, you should see the notification bell in your header.
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!
In the next step I am going to get case record.
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!
In Content, paste the following JSON. Replace the <entityLogicalName> with the entity name and <recordId> 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=<entityligicalname>&id=<=recordId>",
"navigationTarget": "newWindow" }
}
]
}
I am going to add a phone call for a case now.
After the phone call created, a notification is received along with an action. Clicking on 'Open Phone Call' will open the popup case record.
After clicking the 'Open Phone call” action, the case record will be displayed in a new window.
Thank you..!