Set up push notifications

Completed

Throughout the day, as field sellers meet with customers, certain situations might occur that they should be aware of. For example, a seller might be assigned to a new lead that they should engage with immediately. Another scenario could occur where a customer meeting was created and assigned to them. If they're not alerted of the change, it's possible that they might miss the lead or won't notice that they have a meeting assigned to them. In the Dynamics 365 Sales mobile app, push notifications let you send updates to users through their mobile phones or tablets.

You can use push notifications to:

  • Alert the user about status changes in records that are assigned to them.

  • Remind field sellers to enter important business data.

Important

Setting up push notifications requires an understanding of how to create cloud flows in Microsoft Power Automate and how to use the Microsoft Dataverse connector. For more information, see the Overview of cloud flows and the Microsoft Dataverse documentation.

Get started creating a push notification

The Dynamics 365 Sales mobile app is powered by Microsoft Power Platform. Essentially, it's a model-driven application that's being consumed on mobile devices. Push notifications are delivered by using flows that are created in Power Automate. They can be triggered based on a series of different events such as a lead or opportunity record being created.

Each scenario that organizations use push notifications for will differ. At a high level, the process will resemble the following steps:

  1. Create and define when the flow should be triggered.

  2. Identify the user whom the record is assigned to.

  3. Get extra information (optional).

  4. Call the Push Notification action.

  5. View in the mobile app.

Create and define when the flow should be triggered

The first step is to create the flow and specify how it will be triggered. For this example, you'll want the flow to be triggered when an opportunity record is created. This approach will ensure that the field seller is notified when a new opportunity is assigned to them.

Because all Dynamics 365 Sales information that's related to leads is stored in Dataverse, the easiest way to trigger this flow is to apply the Dataverse connector. This approach provides different triggers and actions that can be applied against a Dataverse instance. In this case, because you want to trigger the flow when an opportunity is created for anyone in the organization, you'll set up the trigger as displayed in the following image.

Screenshot of a push notification trigger in Microsoft Power Automate.

For more information, see Microsoft Dataverse - Triggers.

Identify the user who's assigned as owner of the opportunity

When opportunities are created, they're assigned to the user or team that will be responsible for it. You can complete this task in the Owner field. To ensure that the push notifications are being sent to the correct person, you'll need to identify the user who's being designated as the owner of the opportunity record. The Dataverse connector includes an action called Get a row by ID. You can use this action to reference a specific record. In this case, you'll select the Owner field on the opportunity because it defines the user who's responsible for the opportunity.

Screenshot of the flow step where the flow gets a row by ID.

For more information, see Get a row by ID.

Get extra information

You might want to include extra information in your push notification that you'll send to the user. For example, you might want to include information about the account or contact that the opportunity is associated with. If you plan to include more details from related records, such as account, you'll need to get that information the same way that you did for the user. The following image shows the account details being retrieved for the account that's associated with the opportunity.

Screenshot of the Get Account flow step in Power Automate.

Call the push notification action

Now that you've identified the user whom to send the notification to and the data that you might want to include, the final step is to create and define the details of the notification. The Microsoft Power Apps Notifications V2 connector includes the Send a push notification V2 action. You can use this action to send push notifications to canvas and model-driven applications. As previously mentioned, the Sales mobile application is a model-driven app.

To ensure that push notifications work as intended and are being pushed to the correct application, you'll need to define the following information:

  • Mobile app - Defines the type of application it is, such as an app from Power Apps or Sales. In this Instance, you'll select Sales.

  • Your app - Defines the specific app that you want to set up the notification for.

Screenshot showing the step where the push notification is sent to a recipient.

View in the Sales mobile app

For sellers to receive push notifications, they'll need to ensure that they've enabled notifications in the application. They can do so when the app is launched or from the settings area of the application.

After notifications have been enabled, the Power Automate flow will be triggered when an opportunity is created, and any push notifications will be shown to the seller who's using the mobile phone or tablet. Sellers don't need to be in the app or using their device to receive push notifications.