ERP System Integration with Mobile Applications
ERP integration—one of most technically complex tasks in enterprise mobile. ERP systems (SAP, Microsoft Dynamics, Oracle ERP, 1C) designed without mobile in mind: heavy data models, synchronous transactions, SOAP/XML API instead of REST, rigid business logic. Connecting mobile directly—almost always fails.
Why Direct API Doesn't Work
SAP ERP on ABAP returns RFC calls or SOAP BAPI. Single material data request may trigger 5-7 internal RPCs, take 3-8 seconds, return 200 KB XML with unneeded fields.
Microsoft Dynamics 365 has OData API—formally "modern", but response with expand-nesting bloats to megabytes. On mobile with 4G, parsing in main thread = ANR on Android, UI freeze on iOS.
Oracle ERP Cloud—REST API exists but versions aggressively. Minor version can have breaking changes, existing integration breaks after Oracle update.
Middleware: Integration Layer
Mandatory architecture element—integration middleware between ERP and mobile. Functions:
- Transform: XML/SOAP → JSON, heavy objects → mobile DTO
- Cache: reference data (warehouses, items, counterparties) update rarely—cached with TTL 15-60 min removes ERP load
- Orchestrate: one mobile action (post invoice) → multiple ERP calls
- Buffer: offline user creates document → middleware accepts and later sends to ERP synchronously
Middleware on Node.js, Go, .NET, or Java Spring. Apache Camel for routing between multiple ERPs. MuleSoft/Dell Boomi for enterprise-scale customers.
Authentication and Authorization
ERPs have own permission system, often role-based: warehouse staff see only their warehouse, manager—only their clients, accountant—financial documents. Mobile must respect these rights.
Options:
- Technical ERP user in middleware—simple, loses user context (all actions from one account, no audit)
- SSO via corporate IdP (Azure AD, Okta, Keycloak): user logs via SAML/OAuth 2.0, IdP issues token, middleware maps to ERP user. Audit preserved, ERP rights apply correctly.
On mobile: MSAL SDK for Azure AD, AppAuth for standard OAuth 2.0. Store refresh token in Keychain/Android Keystore—not SharedPreferences.
Offline and Conflicts in Enterprise Context
Warehouse without internet. Worker scans barcodes, creates shipment—all local. Connection returns, document goes to ERP. But balance may have changed (another worker shipped same item via web).
ERPs usually solve via optimistic locking (version check on write), reserve quantities. Middleware must handle ERP error response and return to mobile UI: "Balance changed. Current: 15 units. You tried: 20 units."
Reference Data Sync
Nomenclature in ERP—thousands of items, worker needs hundreds tied to their warehouse. Mobile downloads differential update (delta sync): GET /items?updated_since=2025-01-01T00:00:00Z. ERPs don't always support delta—middleware computes delta on its side via own reference replica.
Room (Android) + CoreData (iOS) store local reference copy. Background sync every N minutes updates. User works with local copy—fast, without waiting.
Performance and Monitoring
ERP calls slow. Middleware logs every call: duration, endpoint, result. Prometheus + Grafana or Datadog show response percentiles: if p95 > 5 sec on method—cache mandatory.
Timeout strategy: mobile waits max 10 sec, then error with retry button. Middleware doesn't kill ERP call—completes and caches result.
Timeline
ERP API audit and middleware design: 1-2 weeks. Basic integration (read, create documents) with offline buffer: 1-2 months. Full integration with SSO, delta-sync, conflict resolution, monitoring: 2-4 months. Cost calculated individually.







