Overview of Business Events in D365 Finance and Operations for AgXML
What are business events in Dynamics 365 Finance and Operations and how do they impact AgXML?
Business Events are a way Dynamics 365 Finance and Operations (D365) can communicate with external systems. D365 has other ways of communicating with outside systems, but what makes the business events unique is the ability to determine at what moment during a business process a message will be sent out externally to another system. Other options in D365 for external messaging continually look for updates in the SQL database. However, this can cause multiple messages to be exported which generates more noise than necessary.
Levridge created our own business events in D365 to create XML files following the AgXML framework. Levridge chose business events because of the reduction in external messages being created and the ability to determine when a message will be generated and sent to external sources.
Where are business events set up?
Business Event Catalog
Business events are set up in D365 under System administration > Setup > Business Events > Business Events Catalog. The business events currently used by Levridge for AgXML are shown below. Levridge currently uses the commodity movement and load order AgXML exports supporting creates, deletes, modifications, assign, unassign, void, transportation, and farm and field. Levridge will continue to update and add additional business events as our product develops. Users can extend D365 and create business events that fit their business needs.
Business Events Endpoints
D365 natively lets users set up different types of endpoints for managing messages in business events. At Levridge we created our own endpoint exchange to make the Ag integrations more seamless.
Activate Business Events
After validating the required business event catalogs exist and an endpoint is set up, the last step is activating the business events. For Levridge as mentioned before we use Load orders and Commodity movements. You can also deactivate events if needed.
Business events parameters
There are a few parameters that need to be set up for the business events mostly around performance and failures.
Additional setup required:
This blog won’t go in-depth but additional setup that is needed is the Azure Service Bus as an endpoint as well as a landing location to process the messages. For the demonstration in the later part of this blog, I have set up a folder to store the generated AgXML file; but in actual practice, this file would be picked up by either a scale or a vendor/customer for further processing.
Examples of a business event creating an AgXML commodity ticket
For Levridge I will now show how a simple commodity inbound ticket can be created in D365 and then exported to an external system for additional processing.
1. Create an inbound scale ticket.
2. After the record is completed and saved, the business events run and send the message out of D365 to the service bus and are then picked up or dropped in a folder for further processing. Below is an example of the AgXML file created from the inbound scale ticket above.
In summary, Levridge is continually building out AgXML functionality with the goal of making agricultural companies run more efficiently all while being up on the latest technology offered by Microsoft and Dynamics 365 Finance and Operations.