BOM sync via Config Management API fails on custom attribute mapping with 500 Internal Server Error

Running into a frustrating issue with BOM synchronization using the Config Management API on Windchill 11.2 M030. When we attempt to sync BOM data that includes custom attributes, the API returns 500 Internal Server Error and the sync completes only partially - standard attributes sync fine, but all custom fields are missing.

Our API call structure:


POST /Windchill/servlet/odata/ConfigMgmt/SyncBOM
{"sourceConfig": "OR:789", "targetConfig": "OR:790",
 "includeAttributes": ["Material", "Cost", "CustomLeadTime"]}

The custom attribute ‘CustomLeadTime’ is properly defined in our type system and visible in the UI. We’ve validated the API payload structure against documentation, but the sync fails whenever custom attributes are included. Standard PTC attributes work perfectly. Has anyone successfully mapped custom attributes through the Config Management API?

The 500 error suggests the API is hitting an unmapped attribute during serialization. In 11.2, the Config Management API requires explicit type system configuration for custom attributes. You need to register your custom attributes with the API’s attribute mapper service. Check if there’s an AttributeMapping configuration file in your Windchill/codebase/com/ptc/windchill/config directory.

Custom attributes need to be referenced by their internal names, not display names. Check your type definition - the internal name is usually something like ‘IBA|CustomLeadTime’ or similar. Use the Type Manager API to retrieve the exact internal attribute name and use that in your includeAttributes array.

Check your Windchill logs for the full stack trace of that 500 error. It’s likely a NullPointerException or ClassCastException when the API tries to serialize your custom attribute. This usually means the attribute type definition is incomplete - verify that your custom attribute has a proper data type mapping in the type system.

You’ve hit a well-documented limitation in the Config Management API’s handling of custom attributes. The solution requires addressing all three focus areas systematically.

1. Custom attribute mapping: The API expects custom attributes to be referenced using their fully qualified internal names. Your current reference is incorrect. Retrieve the proper name:


GET /Windchill/servlet/odata/ProdMgmt/AttributeDefinitions
Filter: displayName eq 'CustomLeadTime'

The response will show the internal name, typically formatted as IBA|customLeadTime or com.yourcompany.CustomLeadTime. Update your payload:


{"includeAttributes": ["Material", "Cost", "IBA|customLeadTime"]}

2. Type system configuration: Custom attributes must be explicitly registered in the Config Management type mapping. Edit site.xconf and add:

<Property name="com.ptc.windchill.config.customAttributes"
  value="IBA|customLeadTime:java.lang.Double"/>

This maps your custom attribute to its Java type. Restart the method server after this change.

3. API payload validation: The Config Management API performs schema validation before processing. Your payload must include type hints for custom attributes:

{
  "sourceConfig": "OR:789",
  "targetConfig": "OR:790",
  "includeAttributes": [
    {"name": "Material", "type": "string"},
    {"name": "Cost", "type": "double"},
    {"name": "IBA|customLeadTime", "type": "double", "customType": "IBA"}
  ],
  "validateSchema": true
}

The customType: IBA flag tells the API to use the IBA attribute handler instead of standard attribute serialization.

Complete solution:

  1. Query attribute definitions to get internal names
  2. Update site.xconf with custom attribute type mappings
  3. Restart Windchill method server
  4. Modify your API payload to include type hints
  5. Add error handling for partial sync scenarios

Alternative if this fails: Use the lower-level Parts API with explicit attribute updates:


PATCH /Windchill/servlet/odata/ProdMgmt/Parts('OR:component')
{
  "IBA|customLeadTime": 14.5,
  "_configContext": "OR:790"
}

This approach updates attributes directly on part instances within a configuration context, avoiding the Config Management API’s validation layer. Process each BOM component individually in a batch operation. Less elegant but more reliable for custom attributes.

We encountered this in our ERP integration project. The issue is that custom IBA attributes aren’t automatically exposed through the Config Management API’s BOM sync endpoint. You need to create a custom API extension that explicitly handles IBA serialization. It’s not a configuration fix - it requires code customization.

I remember dealing with this exact scenario. The problem is that the Config Management API validates attribute payload against a schema that doesn’t automatically include custom attributes. You need to extend the schema definition or use a different endpoint. Try the generic Parts API instead: POST to /Windchill/servlet/odata/ProdMgmt/Parts with your custom attributes explicitly defined in the payload. This bypasses the Config Management API’s strict validation.