Engineering

How to Get PLMXML BOM Data Into Your ERP or WMS

Read a PLMXML bill of materials, export it to CSV for your ERP or WMS, check it before import, and know when the flow is worth automating.

Manpreet Singh4 December 20267 min read

Engineering finishes a design and sends a .plmxml file. Purchasing needs a parts list, the ERP needs a bill of materials (BOM), and the warehouse needs to know what to kit and pick. Then someone opens the file in a text editor and sees hundreds of lines of id42, #id105 and occurrenceRefs, and no part list anywhere.

I work on the receiving end of this: the ERP and warehouse management system (WMS) side, where product data arrives and must be correct before anyone orders, receives or picks against it. This post explains how a PLMXML BOM is built, how to get it into a spreadsheet you can import, what to check first, and when re-keying it by hand stops making sense.

Note

Scope: the product structure (parts, revisions, quantities, attributes). 3D geometry, variant rules and effectivity are a different problem and are not covered here.

What a PLMXML file is

PLM XML is the XML format that Siemens publishes for exchanging product data. Siemens describes it as "a lightweight, flexible mechanism for transporting high-content product data", and its schema is open and published as a standard W3C XML Schema. You meet it most often as an export from Teamcenter.

The important detail for anyone downstream is in how the data is stored. In Siemens' words, it represents product data "both explicitly and via references". A part is not written out where it is used. Instead, each element points to others by id, and you must follow the chain to build a single line of a BOM.

Why the BOM is hard to read

Here is one line of a BOM, a screw used four times in a motor housing, as a typical BOM export stores it. The example is from an invented desk fan:

<Occurrence id="id16" instancedRef="#id105" parentRef="#id11">
  <UserData type="AttributesInContext">
    <UserValue title="SequenceNumber" value="20"/>
    <UserValue title="Quantity" value="4"/>
  </UserData>
</Occurrence>

<ProductRevision id="id105" masterRef="#id205" revision="A" name="Screw M4 x 8"/>
<Product id="id205" productId="HW-0408" name="Screw M4 x 8"/>

To get "HW-0408, revision A, quantity 4, inside the motor housing", you read three elements in three places:

  1. The Occurrence places a part in its parent assembly (parentRef) and holds the quantity in that assembly.
  2. Its instancedRef points to a ProductRevision, which holds the revision letter.
  3. The revision's masterRef points to the Product, which holds the part number (productId).

A real export repeats this for every line, and the elements are often far apart in the file. Some files use a different structure, an InstanceGraph of ProductRevisionView and ProductInstance elements, with the same idea of ids and references.

What your ERP or WMS actually needs

Most BOM imports want a flat table. This is how the PLMXML pieces map to the columns an ERP or WMS usually asks for:

ERP or WMS fieldWhere it comes from in PLMXML
Part numberProduct@productId
Descriptionname on the ProductRevision or Product
RevisionProductRevision@revision
Parent assemblyThe parent Occurrence (parentRef, or occurrenceRefs on the parent)
Quantity per assemblyA quantity attribute or a Quantity user value on the Occurrence
Extra fields (material, find number, weight)UserData values on the Occurrence or the ProductRevision

Two of these cause most of the import errors I see:

  • Quantity per assembly versus total quantity. The file stores the quantity in the parent only. If the motor housing appears twice in a product and holds four screws, you need eight screws, and no element in the file says "8". You must multiply down the tree.
  • The same part in many places. One screw can sit in several assemblies. A structure import needs each place as its own line. A purchasing list needs one line with the total.

Common traps before you import

These are the problems that turn a clean-looking export into wrong stock or wrong picks:

  • Attribute names differ between companies. UserData titles are set by each company's PLM configuration. One file says Quantity, another a different custom title. Check the names in your file before you map columns.
  • Quantities that are not whole numbers. Cable, tube and sheet material can come through as 1.5 or 0.25. Make sure the ERP field and the unit of measure agree.
  • References to other files. A large export can point into a second file (parts.plmxml#id7). If you only have one file, those lines have no part details. Ask for the full export rather than guessing.
  • Old revisions. The export shows the revisions that were current when it was made. If engineering has released a change since then, the file is already out of date.
  • The engineering BOM is not always the build BOM. The structure engineering designs is not always the structure production or the warehouse works with. Sub-assemblies may be bought in, or never exist as a stocked item. Agree which assemblies become ERP items before the first import.

The manual route: a free PLMXML Viewer

For a one-off or occasional file, you don't need software. I built a free PLMXML Viewer on PBX Tools that does the reference-following for you. It reads the file in your browser, so the file is not uploaded anywhere.

  1. Open or drop the .plmxml or .xml file (or paste its text).
  2. Read the indented BOM. Each line shows the part number, name, revision, the quantity in its parent and the total quantity in the whole product. Select a line to see its attributes.
  3. Switch to Parts summary for one line per part and revision, with its total quantity.
  4. Export to CSV. Export BOM CSV keeps the structure (a Level column plus one column per attribute) for a BOM structure import. Export summary CSV gives the purchasing or part-master list.

The viewer flags lines it cannot complete, such as a reference to another file, a missing id or a quantity that is not a number, instead of dropping them quietly. Those flagged lines are the ones to fix before an import.

Tip

The viewer reads the two structures described above. If a file shows no product structure, open it in the XML Viewer to see every element and find out how that export is built.

Check the CSV before it goes in

Before an import, run through this list. It takes a few minutes and catches most bad loads:

  • Every flagged line is fixed or explained.
  • Total quantities match what engineering expects for a few known parts.
  • Part numbers match the format your ERP uses (leading zeros, prefixes, case).
  • Revisions are the released ones, not a work-in-progress export.
  • Units of measure are set for every part with a fractional quantity.
  • Sub-assemblies that are not stocked items are handled the way you agreed.

Spreadsheets are a good tool for the first few files. They become the problem when the same person repeats these steps every week.

When to automate it

Manual export and import is fine when designs change a few times a year. These are the signs that it has stopped being fine:

  • Someone exports, cleans and re-keys a BOM every week, and nobody else knows how.
  • Picking or kitting errors trace back to an old revision or a wrong quantity.
  • Engineering changes are released faster than the ERP is updated.
  • Two systems disagree about a part, and fixing it means comparing spreadsheets by hand.

An integration takes over the steps you did by hand. It picks up each new export, follows the references, applies your company's attribute names and unit rules, validates the result, and sends it to the ERP or WMS through its API or import interface. Every run is logged, so a failed line is found and fixed before it reaches the warehouse. If you build one, the decisions in my post on reliable third-party API integrations apply directly: safe retries, idempotent writes and a runbook your team can own.

Summary

  • PLMXML stores a BOM as ids and references, so one BOM line comes from several elements.
  • Your ERP or WMS needs a flat table: part number, revision, parent and quantity per assembly, with totals calculated from the tree.
  • For occasional files, the free PLMXML Viewer follows the references and exports a CSV.
  • Check flagged lines, totals, revisions and units before every import.
  • When the export runs weekly or errors reach the warehouse, automate it.

If your BOM data needs to reach an ERP or WMS reliably, see how we approach WMS and ERP integration. You can also email me at mp@pbxdigital.net.