Asynchronous integration
Asynchronous integration patterns use batch data APIs that run through a batch service. These patterns are nonblocking, meaning that the caller submits the request and continues without waiting for the response. Batch data APIs are suited for asynchronous integration because they handle large-volume data imports and exports. When these APIs are called, the import or export process runs in a batch. One advantage of using batch data APIs is their ability to handle large volumes of data, especially when business logic runs concurrently with the import or export process. As a best practice, when you're dealing with several hundred records, you should use a batch data API integration.
Similar to synchronous patterns, you can invoke REST and SOAP integration APIs in finance and operations apps asynchronously.
| Pattern | Asynchronous programming paradigm |
|---|---|
| OData | DbResourceContextSaveChangesAsync |
| Custom service | httpRequestBeginGetResponse |
| SOAP | UserSessionServiceGetUserSessionInfoAsync |
| Batch data API | BeginInvoke |
Asynchronous integration pattern scenario
A retailer uses finance and operations apps for financial and statement posting, while their point-of-sale (POS) system is an external, on-premises system. The retailer processes hundreds of transactions daily, but real-time data isn't required. At the end of the day, the retailer needs to import all transaction data into finance and operations apps for financial processing. Because real-time data isn't necessary and the volume of data is large, this scenario is best suited for asynchronous integration by using batch data APIs.
The retailer follows these steps to implement this scenario:
- Identify the required entities for the integration in finance and operations apps and turn on data management.
- Use the REST batch data API in the on-premises, external system to import the transaction data into finance and operations apps at the end of each business day.