How can developers expose custom business functionality from Dynamics 365 Finance and Operations to external applications?
Question
Answers
When an external application needs to interact with Dynamics 365 Finance & Operations, the most important architectural decision is to expose a stable business contract rather than exposing internal implementation details.
For example, suppose an external e-commerce application needs to request a sales order creation operation in Finance & Operations. A developer should not simply expose internal tables or X++ implementation details and allow the external system to manipulate data arbitrarily. Instead, the integration should define what the external system is allowed to request and what response it should receive.
Depending on the business requirement, Finance & Operations provides several integration approaches, including data entities/OData, custom services, business events, and other supported integration mechanisms.
The choice depends on the interaction pattern.
| Requirement | Potential approach |
|---|---|
| External system needs business data | Data entities/OData |
| External system needs an operation/business service | Custom service |
| External system needs notification that something happened | Business events |
| Large-scale data movement | Data management/integration mechanisms |
| Event-driven integration | Business events + messaging/integration services |
The critical distinction is:
Data integration ≠ business operation integration ≠ event notification.
For example:
- “Give me customer records” is a data-access requirement.
- “Create a sales order according to these business rules” is a business-operation requirement.
- “Tell my system when a sales order is confirmed” is an event-notification requirement.
Treating all three as simple CRUD operations can result in fragile architecture.
Important design considerations
Authentication and authorisation
External applications must authenticate using supported identity mechanisms and should receive only the permissions necessary for the operation.
Input validation
Never assume that external applications send valid data. Validate required fields, business rules, data types, references, and allowed values.
Idempotency
This is particularly important in enterprise integrations.
Imagine the external system submits:
Create Order 10025
The request succeeds in Finance & Operations, but the response is lost because of a network failure.
The external system retries.
If the operation is not designed to handle duplicate requests safely, the same business transaction could potentially be created twice.
Therefore, enterprise integrations should consider idempotency keys, external identifiers, duplicate detection, and reconciliation mechanisms.
Error handling
Integration errors should be meaningful enough for support teams to determine whether the problem is:
- invalid business data
- authentication failure
- missing permissions
- temporary infrastructure failure
- downstream dependency failure
- business-rule rejection
Monitoring
A production integration needs more than an API endpoint. Teams need visibility into:
- successful requests
- failed requests
- processing time
- retry counts
- rejected messages
- integration backlog
- recurring business failures
Real-world architecture
A typical architecture could be:
E-Commerce → API Management/Integration Layer → Finance & Operations
The integration layer can perform:
- authentication
- validation
- transformation
- routing
- retry
- logging
- monitoring
- error handling
This prevents the external system from becoming tightly coupled to the internal implementation of Finance & Operations.
Expert consideration
A common mistake is to ask:
“Which API should we expose?”
The better architectural question is:
“What business capability should we expose, who owns that capability, what contract should consumers depend on, and how will that contract evolve?”
That mindset leads to much more maintainable Dynamics 365 integrations.