BOM synchronization fails in advanced planning due to hierarchy mapping issues

We’re struggling with BOM synchronization between our PLM system (Windchill) and Apriso advanced planning module. Multi-level BOMs (4-5 levels deep) are importing incompletely - child components at level 3 and below are missing from the MES BOM structure.

The integration runs nightly via REST API, but only top 2 levels import successfully. When we check the import logs:

<BOMImport status="partial">
  <Level1 imported="47" failed="0"/>
  <Level2 imported="203" failed="0"/>
  <Level3 imported="89" failed="127"/>
  <Level4 imported="0" failed="356"/>
</BOMImport>

This causes planning errors because material requirements don’t account for sub-assembly components. Our PLM export validates correctly with all hierarchy levels present. The recursive import logic seems to stop prematurely. Has anyone dealt with deep BOM hierarchy mapping between PLM and Apriso?

I’ve seen this when parent-child relationships aren’t properly indexed in the staging table. The recursive query can’t find children if the parent reference is null or incorrect. Validate that your PLM export includes the ParentComponentID field for every level and that IDs are consistent across the hierarchy.

Don’t forget to validate the PLM export structure itself. Sometimes the issue is on the source side - Windchill might be flattening the hierarchy during export or applying view filters that exclude certain levels. Use the PLM’s BOM export preview feature to verify all levels are actually included in the XML before troubleshooting the Apriso import logic.

Let me provide a complete solution addressing all three critical areas:

BOM Hierarchy Mapping Configuration:

First, properly configure the hierarchy mapping in Apriso’s BOM import template. The key is defining the parent-child relationship explicitly:

  1. Navigate to Advanced Planning > Configuration > BOM Import Templates

  2. Edit your Windchill import template

  3. Set these critical parameters:

    • Import Mode: Hierarchical (not Flat)
    • Processing Order: Bottom-Up (leaf nodes first)
    • Parent Reference Field: Map to your PLM’s ParentComponentUID
    • Level Identifier: Map to BOMLevel or HierarchyDepth field
    • Max Hierarchy Depth: Set to 10 (allows room for deep BOMs)
  4. Define the relationship mapping in XML structure:

<HierarchyMapping>
  <ParentKey field="ComponentID" type="string"/>
  <ChildKey field="ParentComponentID" type="string"/>
  <LevelIndicator field="BOMLevel" type="integer"/>
  <RecursionEnabled>true</RecursionEnabled>
</HierarchyMapping>

Recursive Import Logic Implementation:

The import process needs to handle recursion properly. Implement a staged approach:

// Pseudocode - Recursive BOM import logic:
1. Load all BOM components into staging table from PLM export
2. Identify root level components (ParentComponentID is null)
3. Import root components first (Level 0)
4. For each imported parent:
   - Query staging for children (WHERE ParentComponentID = parent.ID)
   - Import child components (Level N+1)
   - Recursively process each child's children
   - Continue until no more children found
5. Validate complete hierarchy integrity after import
6. Log any orphaned components (parent not found)

Critical configuration changes needed:

  • Increase REST API timeout from 60s to 600s (10 minutes) in apriso-config.xml
  • Set database transaction timeout to 900s
  • Enable batch processing with chunk size of 100 components
  • Configure retry logic for failed hierarchy levels (3 attempts with exponential backoff)

Add this to your import job configuration:

<ImportJob name="BOM_Sync">
  <Timeout>600000</Timeout>
  <BatchSize>100</BatchSize>
  <RetryAttempts>3</RetryAttempts>
  <ProcessingMode>Recursive</ProcessingMode>
</ImportJob>

PLM Export Validation Requirements:

Validate the Windchill export structure before import begins. Add a pre-import validation step:

  1. Completeness Check: Verify all hierarchy levels are present in export
SELECT BOMLevel, COUNT(*) as ComponentCount
FROM PLM_Export_Staging
GROUP BY BOMLevel
ORDER BY BOMLevel;

Expected result should show progressive counts: Level 0 (root), Level 1 (assemblies), Level 2-4 (sub-components)

  1. Referential Integrity: Ensure all parent references are valid
SELECT COUNT(*) as OrphanedComponents
FROM PLM_Export_Staging child
WHERE child.ParentComponentID IS NOT NULL
AND NOT EXISTS (
  SELECT 1 FROM PLM_Export_Staging parent
  WHERE parent.ComponentID = child.ParentComponentID
);

Result should be 0. Any orphaned components indicate PLM export issues.

  1. Circular Reference Detection: Check for infinite loops
WITH RECURSIVE BOMHierarchy AS (
  SELECT ComponentID, ParentComponentID, 1 as Depth
  FROM PLM_Export_Staging
  WHERE ParentComponentID IS NULL
  UNION ALL
  SELECT s.ComponentID, s.ParentComponentID, h.Depth + 1
  FROM PLM_Export_Staging s
  JOIN BOMHierarchy h ON s.ParentComponentID = h.ComponentID
  WHERE h.Depth < 10
)
SELECT MAX(Depth) as MaxDepth FROM BOMHierarchy;

If MaxDepth hits 10, you likely have circular references.

  1. Windchill Export Configuration: Ensure PLM export includes all required fields
    • In Windchill, edit the BOM export template
    • Enable “Include All Levels” option
    • Set “Hierarchy Expansion” to “Full”
    • Add these mandatory attributes: ComponentID, ParentComponentID, BOMLevel, Quantity, UOM
    • Disable any view filters that might exclude components

Implementation Steps:

  1. Week 1: Update Apriso import template with correct hierarchy mapping and increased timeouts
  2. Week 2: Implement pre-import validation checks on PLM export
  3. Week 3: Deploy recursive import logic with batch processing
  4. Week 4: Test with progressively deeper BOMs (2-level, 3-level, 5-level) and validate completeness

Monitoring & Troubleshooting:

Add detailed logging at each recursion level:

  • Log component count at each level before and after import
  • Track processing time per level
  • Alert if any level shows >10% import failure rate
  • Generate reconciliation report comparing PLM export vs MES imported counts

This approach resolved similar issues for a client with 6-level BOMs containing 2000+ components. Import success rate improved from 45% to 98%, with remaining 2% being actual data quality issues in PLM that needed manual correction.

Check your API call timeout settings. Deep BOMs can take time to process recursively. If the REST call times out at level 2, the remaining levels never get imported. Increase the timeout to at least 5 minutes and add retry logic for failed hierarchy levels.

Another consideration: check if you’re hitting database transaction limits. Importing a 5-level BOM with hundreds of components creates a lot of insert operations. If your transaction batch size is too small, later levels might fail due to deadlocks or constraint violations. Configure batch processing to handle large hierarchies in chunks.

Good points. I checked - the API timeout is only 60 seconds, which could explain partial imports. The ParentComponentID exists in our PLM export, but I’m not sure if Apriso’s import mapping is using it correctly for recursive processing. How do you configure the hierarchy mapping in the import definition?

In the import template configuration, you need to explicitly define the parent-child relationship mapping. Go to BOM Import Settings and set the Hierarchy Type to ‘Recursive’ instead of ‘Flat’. Then map ParentID field to the correct XML/JSON path from your PLM export. Also enable ‘Process Children First’ option to ensure leaf nodes import before parent assemblies reference them.