AutoCore Import Triangle Analysis: DIS → DIWS → PartyServices
The Mental Model
1. What data does each service import?
DataImportServices (God Module)
Imports: Legacy ERP/ADW product catalog data via CSV
- Member Products: Site-specific inventory/price.
- Global Products: Master catalog definitions.
- Organizational Data: Store groups, retail locations, warehouses.
- Employee Data: Staff records for alliance members.
[!IMPORTANT] This pipeline does NOT handle industry-standard XML.
- PIES XML is handled by
PIESServices.- ACES/VCDb is pre-loaded reference data, never imported through this CSV route.
DataImportWrapperServices (Batch Router)
Every method follows an identical batch pattern:
- Parse CSV header → map to service fields.
- Iterate rows → catch/log errors individually.
dispatcher.runSynctarget service row-by-row.- Capture scorecard metrics (Total, Success, Error).
PartyServices (Supply Chain Hierarchy)
Manages the "Actors" in the system. "Party" = any business entity:
MEMBER: Auto parts store group.PART_STORE: Individual retail shop.BRAND_OWNER: Product line owner.DOMAIN_PARTY: Catalog domain (e.g., AutoCore vs. NAPA).
2. Why "Party" appears in an import pipeline
In this automotive context, a product doesn't exist in isolation.
The wdPartyId (Warehouse Distributor Party ID) is the Context Owner. Every product import requires a wdPartyId to:
- Resolve brand mappings.
- Scope category hierarchies (Categories are often Party-prefixed).
- Document facility ownership (ProductFacility).
Hierarchical Flow: Wrapper → DataImport → PartyServices.
3. Refactoring Opportunity
All 43 wrapper methods in DataImportWrapperServices are copy-pasted implementations with only the target service name changed.
Recommendation: Replace with a single generic importCsvWrapper(serviceName, ...) logic to reduce code entropy.