Introduction

In the ever-evolving landscape of business applications, effective communication is paramount. In today's dynamic environment, companies rely on seamless interactions with their employees and customers, making it essential to keep everyone in the loop. This is where in-app notifications in model-driven apps in Dynamics 365 come into play. These notifications are more than just messages; they are a powerful tool to address various challenges and streamline organizational operations.

Solving Communication Challenges with In-App Notifications

Imagine a scenario where your sales team needs instant notification upon assigning a high-priority lead. Or, consider a situation where a customer service agent requires real-time updates on the status of a support ticket. In our case, users frequently engage with tasks, needing daily awareness of expired tasks, those expiring today, and more. This is where in-app notifications shine.

Implementing In-App Notifications in Dynamics 365

Start by configuring your model-driven app to enable in-app notifications. This involves setting up the notification logic, specifying when and how notifications should be triggered, and defining who should receive them. Next, you can write a script or create a Power Automate Flow to define the trigger for your notification and develop the logic.

Let’s explore some real cases that we implemented. The initial requirement was to notify task owners about the expiration date if it's today. Consequently, a Power Automate flow was established. It runs every morning, fetching all active tasks with a due date matching the current day, and generates a notification. As a result, when users access the system, they find all the necessary information about their tasks conveniently located in the "View Notifications" section:

Don’t forget to include links to the activity in the notification; it would be more convenient for the user to navigate directly to the specific record. This can be achieved through the Parse JSON step:

In this example, a link is generated in the notification. The full schema text for this example is as follows:

{
    "type": "object",
    "properties": {
        "link": {
            "type": "object",
            "properties": {
                "actions": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "title": {
                                "type": "string"
                            },
                            "data": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string"
                                    },
                                    "navigationTarget": {
                                        "type": "string"
                                    }
                                }
                            }
                        },
                        "required": [
                            "title",
                            "data"
                        ]
                    }
                }
            }
        }
    }
}

Additionally, users needed to receive instant notifications when someone assigned a task to them. The trigger involves modifying the owner field on the Task entity. Upon assignment of the activity to you, a notification will promptly appear.

Conclusion

By implementing in-app notifications in model-driven apps in Dynamics 365, users gain a powerful tool to streamline communication and address pressing challenges in the workplace. With real-time updates, contextual alerts, reduced information overload, and enhanced collaboration, organizations can experience improved efficiency, better decision-making, and, ultimately, increased customer satisfaction. This technology empowers businesses to stay agile, responsive, and competitive in today's fast-paced business world.