SAP Integration
Learn the possibilities for integration of Emporix with an ERP system, such as SAP, and replicating data properly.
Last updated
Was this helpful?
Learn the possibilities for integration of Emporix with an ERP system, such as SAP, and replicating data properly.
Last updated
Was this helpful?
Emporix is designed to integrate seamlessly with ERP systems. To integrate an ERP system like SAP with Emporix, an integration layer (such as a middleware solution or API management platform) can be utilized to handle data exchange efficiently. This layer can collect and transform data, for example IDocs from SAP, into a suitable format, such as JSON, and make the necessary API calls to Emporix. Options for integration include using an IPaaS platform or an API management layer that supports OData, REST API, or other protocols, enabling flexible and scalable integration tailored to the specific requirements of the ERP and target systems.
Given SAP’s significant presence in the ERP software space, we highlight a scenario in which asynchronous pricing and order replication occur from the Emporix Commerce Engine to SAP ERP. In this example, we selected SAP BTP Integration Suite (formerly known as SCPI) to streamline the integration process, leveraging Emporix flexible API capabilities.
The video and the diagram show high level overview of the data replication between Emporix and S/4Hana using SAP Integration Suite.
This demo is a presentation of one potential approach to integrate with SAP. Alternatively, REST APIs or OData can be utilized for integration purposes.
To create an order from Emporix into SAP, the following master data must be replicated to provide the information for the transactional IDoc:
MATMAS05
Material
Product
COND_A04
Condition
Price, PriceModel, PriceList
DEBMAS07
Customer
Company
ADRMAS03
Contact Person
Customer
ADR2MAS03
Address
Location
ADR3MAS03
Address
Location
Transactional IDoc:
SALESORDER_CREATEFROMDAT202
Transaction
Order created Webhook payload
Here's how the replication process looks like:
Product replication uses the MATMAS IDoc generated by SAP ERP, which holds essential product details, for example, localized product name, tax type, and product code. Emporix can use the same product code as the ERP, allowing the upsert API to create or update the product as needed, thereby simplifying the integration process.
Product prices are replicated through the COND_A IDoc, known as conditions
in SAP, which contains details such as price validity, minimum quantity, and customer-specific price lists. Prices are assigned to either net or gross price models, depending on the price type, and customer assignments are made at the ship-to level.
Customer data is distributed across multiple IDocs. The diagram below shows SAP/Emporix object relations:
To accurately reflect this data in the Emporix Commerce Engine, the following entities must be created:
Company
The DEBMAS IDoc contains core company information, including functional assignments such as Sold To, Ship To, Bill To, Payer, and the Contact Person relationship.
Address details are provided through the ADRMAS IDoc.
Location
Company location details, along with communication information, are derived from data in the DEBMAS and ADRMAS IDocs. Depending on the functional assignments of the addresses, locations are tagged as either shipping or billing.
Customer
The Emporix customer entity is created based on the Contact Person relationship from the ERP system. This relationship includes the customer’s assigned email, phone number, and address details. As illustrated in the diagram, the DEBMAS, ADR2MAS, and ADR3MAS IDocs are required for customer creation within the Emporix Commerce Engine.
Order replication from Emporix to SAP ERP is achieved through order creation webhooks, which are sent to the SAP BTP Integration Suite. The necessary company details (e.g., sold-to, ship-to) are added to the order using mixins, ensuring they are included in the webhook payload. The SAP BTP Integration Suite then converts the webhook data into a SALESORDER_CREATEFROMDAT202 IDoc, which is sent to the SAP ERP system through the iFlow.