Zum Inhalt springen
SAP, DATEV and Dynamics experts
All Articles Integration

Data Mapping Between ERP and Store: Field Assignment Done Right

11 min read
Daten-MappingERPTransformationFeldzuordnungValidierung

Data mapping -- the systematic field assignment between ERP and store system -- is the technical foundation of every successful integration. According to a Fraunhofer IML study, 32 percent (project experience) of all ERP integration projects fail due to insufficient data mapping (Fraunhofer IML, 2024). The reason: ERP systems like SAP and e-commerce platforms use fundamentally different data models, field names, data types and business logic. A SAP item is structurally not the same as a Shopware product. The middleware must bridge these differences -- through field assignment, type conversion, validation and business logic. This article shows how to build robust data mapping for your store integration.

Data Mapping: ERP to StoreERP System (Source Fields)ItemCodestring(20)ART-10042ItemNamestring(100)Bolts M8x40QuantityOnStockdecimal(18,3)1542.000PriceAfterDiscountdecimal(18,6)4.250000SalesUoMEntryint3 (= Ctn)Store System (Target Fields)productNumberstringART-10042nametranslatedBolts M8x40stockint1542price.grossfloat5.06 (gross)unit.namestringCarton1:1i18nroundtax+roundlookupMiddleware: Transformation, Validation, Enrichment1:1 MappingDirect assignmentwithout transformationType Conversiondecimal to intnet to grossLookup TablesUoM codes to namesTax keysValidationCheck required fieldsEnsure value rangesMapping Configuration: JSON/YAML-based, versioned, testableMapping changes without code deployment | Audit log for every transformation | Error protocol for invalid data

What Is Data Mapping and Why Is It So Critical

Data mapping describes the process of assigning fields from a source system to fields of a target system. In ERP-store integration, this means concretely: which SAP field is written to which Shopware field? How is a SAP data type converted to the Shopware data type? What business logic is applied during transformation?

The criticality of mapping is often underestimated. A faulty mapping does not immediately produce a visible error -- data flows, but it is wrong. Prices are displayed in the store without VAT, inventory levels are interpreted as pieces instead of cartons, or customer data is assigned to the wrong account. Such errors only surface when a customer receives an incorrect invoice or an item is shown as available that has long been sold out.

According to a Gartner study, successful integration projects invest 25 to 30 percent of project time in the mapping phase (Gartner, 2025). This investment pays off: clean mapping reduces the error rate in the production phase by a factor of four and significantly lowers rework costs. For API development, the mapping document is the central specification.

Mapping Types: From Simple Assignment to Complex Transformation

Not every field mapping is equally complex. In practice, we distinguish five mapping types that differ in their transformation effort and are each implemented differently in the middleware.

1:1 Mapping

Direct field assignment without transformation. Example: SAP ItemCode becomes Shopware productNumber. The value is transferred unchanged.

Type Conversion

Data type conversion between systems. Example: SAP decimal(18,3) becomes Shopware integer. Rounding rules must be defined.

Lookup Mapping

Value translation via reference tables. Example: SAP unit of measure code 3 becomes 'Carton'. The lookup table is maintained in the middleware.

Calculated Mapping

Values are transformed through formulas. Example: SAP net price + 19% VAT = Shopware gross price. Tax rates dynamically determined.

Aggregation Mapping

Multiple source fields are merged into one target field. Example: Inventory from three SAP warehouses is summed into total stock.

Splitting Mapping

One source field is split into multiple target fields. Example: SAP address block is separated into street, postal code, city and country.

Item Master Data: Mapping Between ERP and Store

Item master data is the most extensive mapping area. A typical ERP item record encompasses 80 to 150 fields (project experience), of which 30 to 60 are needed in the store depending on requirements. The challenge lies not only in the number of fields but in structural differences: SAP works with a flat item model and separate variant tables, while Shopware maps products with configurable property groups and variants as separate entities.

ERP Field (SAP B1)Store Field (Shopware)Mapping Type
ItemCodeproductNumber1:1
ItemNamename (translated)i18n assignment
QuantityOnStockstockType conversion (decimal to int)
SalesUoMEntryunit.nameLookup (code to name)
PriceAfterDiscountprice.grossCalculation (net + VAT)
ItemsGroupCodecategoriesLookup (group to category path)

Variant mapping is particularly complex. In SAP, variants are frequently managed as separate items with a parent bill of materials or matrix. In Shopware, variants are child elements of a parent product configured via property groups (size, color, material). The middleware must analyze the SAP variant structure, derive property groups and establish the assignment between SAP variant codes and Shopware property values.

Price Mapping: Net, Gross, Tiers and Customer Groups

Price mapping is among the most error-prone areas of ERP-store integration. The main reason: ERP systems typically work with net prices, while store systems display gross or net prices depending on B2B/B2C configuration. The middleware must determine the correct tax rate and calculate the gross price -- where the tax rate can vary by product category, customer location and delivery country.

With customer-specific pricing, complexity multiplies. SAP Business One supports up to ten price lists per item. Each price list can contain tiered prices (quantity-dependent) and time periods (valid from/to). In Shopware, these structures are mapped via price rules and customer groups. The mapping must define: which SAP price list corresponds to which Shopware customer group? How are tiered prices converted to Shopware price tiers? How are time-limited special prices handled?

According to an EHI Retail Institute survey, 68 percent of B2B merchants use customer-specific pricing models (EHI Retail Institute, 2025). Correct price mapping is therefore business-critical for the majority of B2B integration projects. An error in price mapping -- such as a missing VAT calculation or incorrectly assigned tiered price -- can have significant financial impact.

Validation Rules: Catching Faulty Data Before Transfer

Validation is the protective layer between transformation and transfer. Before a mapped record is sent to the target system, the middleware checks the data for completeness, consistency and validity. Faulty records are not transferred but collected in an error list and reported to the administrator.

Important validation rules include required field checks (item number, price, unit of measure must be present), value range checks (prices must not be negative, inventory not less than zero), reference checks (the referenced customer group must exist in the store), format checks (item numbers must conform to the defined format) and plausibility checks (gross price must be greater than net price). According to an IBM study, systematic validation rules reduce error rates in data migrations by 75 to 85 percent (IBM Data Quality Study, 2024).

  • Check required fields for completeness (item number, name, price, unit)
  • Validate data types (numeric fields must not contain letters)
  • Ensure value ranges (prices > 0, inventory >= 0, weights > 0)
  • Check referential integrity (category IDs, customer group IDs exist in target system)
  • Detect duplicates (no duplicate item numbers or customer numbers)
  • Validate character encoding (UTF-8 throughout, no invalid characters)

Mapping Documentation: The Foundation for Maintainable Integrations

A mapping document is the central specification of an ERP-store integration. It defines every field assignment, transformation logic, validation rules and data authority (which system leads which field). This document is created before implementation and approved by both departments -- IT and business.

A tabular structure with the following columns has proven effective: source system, source field, source data type, target system, target field, target data type, mapping type, transformation rule, validation rule and data authority. For a typical SAP-Shopware integration, the mapping document encompasses 150 to 300 rows (project experience) -- an investment that pays for itself many times over through reduced implementation errors and easier maintenance.

The mapping document should be versioned and maintained in a format accessible to all stakeholders. Changes to mapping -- such as new ERP fields or changed store requirements -- are documented and go through an approval process. This approach ensures that the middleware configuration always corresponds to the current state of the mapping document.

Internationalization: Correctly Mapping Multilingual Data

For international B2B stores, an additional mapping dimension comes into play: language assignment. Item descriptions, product texts and units of measure can be maintained in multiple languages in SAP. The middleware must map language codes between systems (SAP uses ISO codes like 'DE', 'EN'; Shopware uses locale codes like 'de-DE', 'en-GB') and assign translated fields to the correct language versions in the store.

A particular challenge is handling missing translations. When an item in SAP is only maintained in German but the store also requires an English version, the middleware must decide: is the German text used as fallback, a placeholder inserted, or the item hidden on the English page? This fallback logic must be configured in the mapping and coordinated with the business department.

Bidirectional Mapping: Data Flows in Both Directions

Most ERP-store integrations are bidirectional: master data flows from ERP to store, orders and customer data flow from store back to ERP. A separate mapping is needed for each data flow -- and the mapping direction significantly influences transformation logic.

Define Data Authority Clearly

For each field, it must be determined which system has data authority. Example: the item name is maintained in the ERP (ERP is master), product descriptions are maintained in the store (store is master). Without clear data authority, endless loops arise where both systems continuously overwrite each other's changes.

In order mapping (store to ERP), Shopware structures must be converted to SAP orders. Shopware line items become SAP order positions, Shopware payment methods become SAP payment terms, Shopware shipping methods become SAP shipping types. This reverse mapping requires its own lookup tables and validation rules. Error handling is particularly critical here: a non-assignable order value must not lead to data loss but must create a clarification case in the middleware.

Mapping Tests: Automated Quality Assurance

Systematic mapping requires systematic testing. For each mapping rule, at least one test case should exist that verifies correct transformation. In practice, a three-level testing approach has proven effective: unit tests for individual mapping rules (is the net price correctly converted to gross?), integration tests with real data records (is a complete SAP item correctly created as a Shopware product?) and end-to-end tests for the complete data flow (is a store order correctly created as a SAP sales order?).

Automated mapping tests can be integrated into the CI/CD pipeline: with every change to mapping code, all tests are executed and regressions immediately detected. This approach is particularly valuable for long-lived integration projects where new fields are added and existing mappings adjusted over months or years.

Common Mapping Errors and How to Avoid Them

Experience from numerous integration projects reveals recurring mapping errors that can be avoided with the right approach.

  • Net/gross confusion: The most common problem. Always explicitly clarify whether prices in the ERP are net or gross and which tax rate the middleware should use.
  • Missing unit assignment: SAP unit of measure codes (Pcs, Ctn, Plt) are not translated to understandable store units. Always create a complete lookup table.
  • Character encoding issues: SAP sometimes works with character encodings other than UTF-8. Umlauts and special characters are lost or displayed incorrectly.
  • Missing fallback values: When an optional ERP field is empty, the middleware must set a meaningful default value instead of transferring an empty string.
  • Rounding differences: Different rounding logic between ERP (6 decimal places) and store (2 decimal places) leads to cent-amount deviations.
  • Date format conflicts: SAP stores dates in YYYYMMDD format, Shopware expects ISO 8601. The middleware must ensure conversion.

Mapping Versioning: Managing Changes Traceably

A data mapping is not a static document. Over the course of an integration, fields are added, transformation rules adjusted and validations tightened. Without clean versioning, overview is quickly lost: which version of the mapping is currently running in production? Which change caused the error? Can the last change be reverted?

The middleware stores mapping configurations versioned -- similar to source code in a version control system. Each change receives a timestamp, the editor's name and a description of the change. In case of problems, the middleware can be rolled back to a previous mapping version without reimplementing the integration. According to a Gartner study, versioning mapping configurations reduces error analysis time for integration problems by 50 percent (Gartner, 2025).

Inventory Data Mapping: Special Cases and Calculation Logic

Mapping inventory data requires particular attention since multiple ERP values must be aggregated into a single store value. Physical warehouse stock in SAP consists of total stock minus reserved quantities, committed quantities (for open orders) and safety stock. Only the resulting available stock is transferred to the store.

In multi-warehouse scenarios, complexity multiplies: inventory from multiple warehouses must be summed, maximized or displayed location-specifically depending on business logic. The middleware implements aggregation logic as a configurable rule that can differ per item category or customer group. Additionally, minimum order quantities and packaging units must be considered -- an item sold only in cartons of 10 displays stock not in individual pieces but in available cartons.

Customer Master Data Mapping: Correctly Representing B2B Hierarchies

Customer master data mapping is particularly complex in the B2B context because B2B customers frequently have hierarchical structures: a corporation has multiple subsidiaries, each subsidiary has multiple locations, and each location may have its own delivery addresses and contacts. In SAP Business One, these structures are mapped via business partner hierarchies and contact persons.

The middleware must transfer these hierarchies into the store's customer model. In Shopware, customer accounts can be created with multiple addresses and contacts, but the hierarchical assignment (which subsidiary belongs to which corporation) requires custom fields or special B2B extensions. The mapping must define at which hierarchy level pricing conditions apply (corporation price or location price) and what permissions each user has within the hierarchy. According to an EHI Retail Institute analysis, 45 percent of B2B customers have more than five different delivery addresses (EHI Retail Institute, 2025), underscoring the relevance of well-thought-out address mapping.

Sources and Studies

This article is based on data from: Fraunhofer IML (2024), Gartner Integration Best Practices (2025), EHI Retail Institute (2025), IBM Data Quality Study (2024), SAP Business One Documentation (2025).

Related Articles