The connection between Microsoft Dynamics 365 and the Microsoft Azure platform provides a secure and reliable channel for communicating Dynamics 365 run-time data to external cloud-based line-of-business applications.
Microsoft Dynamics 365 can post the message request data for the core operation to cloud hosted applications listening on the Microsoft Azure Service Bus. Microsoft Dynamics 365 can connect with the Microsoft Azure platform by coupling the Dynamics 365 event execution pipeline to the Microsoft Azure Service Bus. Microsoft Azure Service Bus solutions that are “Dynamics 365-aware” can listen for and read the Microsoft Dynamics 365 data from the service bus.
1. Microsoft Azure Service Bus
The service bus relays the request message data context between Microsoft Dynamics 365 and Microsoft Azure Service Bus solution listener applications. The service bus also provides data security so that only authorized applications can access the posted Dynamics 365 data.
2. Azure Topic
Topics and Subscriptions provide a one-to-many form of communication, in a publish/subscribe pattern. Useful for scaling to very large numbers of recipients, each published message is made available to each subscription registered with the topic. Messages are sent to a topic and delivered to one or more associated subscriptions, depending on filter rules that can be set on a per-subscription basis. The subscriptions can use additional filters to restrict the messages that they want to receive. Messages are sent to a topic in the same way they are sent to a queue, but messages are not received from the topic directly. Instead, they are received from subscriptions. A topic subscription resembles a virtual queue that receives copies of the messages that are sent to the topic. Messages are received from a subscription identically to the way they are received from a queue.
3. Azure Aware Plugin: The framework will leverage Azure Aware Plugin registered on the Azure Message entity to send the message to the target Topic/ Queue through service end point. Its recommended to have the azure plugin run asynchronously. Based on the recipient of data, the data in appropriate format can be send.
4. Service Bus Queue or Topic: Message once received in Queue/ Topic will get pushed into country specific subscription queues based on country specific filters on config data in message.
5.Error Handling: Any error happening in CRM will be stored in “Error log” table inside CRM and linked to the Azure Message table record.
Any error happening in Azure will be handled in Dead Letter Queue and reprocessed. It may be updated back to “Error log “ in CRM or moved to common ‘Azure Failed’ record table for Reporting to external system.
6.Azure Function: Azure function will be triggered on post of message in Topic/ Queue by Logic App. Function will read the input XML message and will connect to CRM Actions to pass on the received message. Function can use assembly with the helper function to perform any additional CRUD actions in CRM.