Skip to main content
An mBOM item represents the bill of materials required to construct a part. A part has an mBOM made up of many mBOM items, which dictate the subparts used in the part’s construction. You can think of parts as a tree structure, where the nodes are part objects and the edges are mBOM items. The root of the tree is a part representing a completed assembly. Its mBOM is the parts used in its construction. Each of those parts can have its own mBOM. Maintaining this tree structure through the mBOM and subsequent aBOM is a vital part of ION.

mBOM items

mBOM itemDescription
idUnique identifier of the mBOM item object.
parentThe part object whose construction this mBOM item describes.
partThe part object used in the construction of the parent.
quantityThe amount of a specific part needed in construction.
substitutesList of valid substitutes that can be used in place of the specified part.

mBOM substitutes

An mBOM substitute is a valid alternative that can be used in place of the defined part. Each mBOM item can have many mBOM substitutes, which are subpart replacements for that specific subpart.
mBOM substituteDescription
idUnique identifier of the mBOM substitute object.
partThe part object that can be substituted for the part in the mBOM item.
mbomItemThe mBOM item for which this object is a valid substitute.

Query an mBOM item

The queries below list mBOM items by a filter or get a specific mBOM item. It is often more effective to query the mBOM relation through a part object. List mBOM items with a filter:
query MBOMItems($filters: MBomItemsInputFilters) {
    mbomItems(filters: $filters) {
        edges {
            node {
                id partId parentId quantity
            }
        }
    }
}
Set the filter variables:
{
    "filters": {
        "parentId": {
            "eq": 1
        }
    }
}
Get a single mBOM item by ID:
query GetMBOMItem {
    mbomItem(id: 1) {
        id partId parentId quantity
    }
}

Query an mBOM substitute

The queries below list mBOM substitutes by a filter or get a specific mBOM substitute. List mBOM substitutes with a filter:
query MBOMSubstitutes($filters: MBomSubstituteInputFilters) {
    mbomSubstitutes(filters: $filters) {
        edges {
            node {
                id partId parentId mbomItemId
            }
        }
    }
}
Set the filter variables:
{
    "filters": {
        "mbomItemId": {
            "eq": 1
        }
    }
}
Get a single mBOM substitute by ID:
query MBOMSubstitute {
    mbomSubstitute(id: 1) {
        id partId parentId mbomItemId
    }
}

Create an mBOM item

An mBOM item defines which parts and how many of those parts are required to build a new part. The parent is the relation to the part being built, and the part relation is the part required in the build. The quantity value must be greater than 0. Returns the newly created mBOM item. Create the mBOM item with this mutation:
mutation($input: CreateMBomItemInput!){
  createMbomItem(input: $input){
      mbomItem {
          id parentId partId quantity
      }
  }
}
Set the variables:
{
    "input": {
        "parentId": 2,
        "partId": 1,
        "quantity": 3
    }
}

Update an mBOM item

You can update the quantity of an mBOM item and its associated part. Returns the updated mBOM item. Update the mBOM item with this mutation:
mutation UpdateMBomItem($input: UpdateMBomItemInput!) {
  updateMbomItem(input: $input) {
    mbomItem {
      id parentId partId quantity
    }
  }
}
Set the variables:
{
    "input": {
        "etag": "etag1",
        "id": 1,
        "partId": 3,
        "quantity": 5
    }
}

Create mBOM substitutes

Create a valid substitution for a specific part within an mBOM. Any parts listed with mBOM substitutes do not raise a validation error if they are attached to an aBOM instead of the part specified in the original mBOM item. Create the mBOM substitutes with this mutation:
  mutation CreateMbomSubstitutes($input:
                                 [CreateMBomSubstituteInput]!){
    createMbomSubstitutes(input: $input){
      mbomSubstitutes {
        id parentId partId mbomItemId
      }
    }
  }
Set the variables:
{
    "input": [
        { "partId": 3, "parentId": 2, "mbomItemId": 1 },
        { "partId": 4, "parentId": 2, "mbomItemId": 1 }
    ]
}

Delete an mBOM item

You can delete an mBOM item unless it has already been used in the construction of an aBOM. Returns the ID of the deleted mBOM item. Delete the mBOM item with this mutation:
mutation DeleteMBomItem($id: ID!, $etag: String!){
    deleteMbomItem(id: $id, etag: $etag){
        id
    }
}
Set the variables:
{
    "id": 1,
    "etag": "etag1"
}

Delete an mBOM substitute

Delete an mBOM substitute. Returns the ID of the deleted mBOM substitute. Delete the mBOM substitute with this mutation:
mutation DeleteMBomSubstitute($id: ID!, $etag: String!){
    deleteMbomSubstitute(id: $id, etag: $etag){
        id
    }
}
Set the variables:
{
    "id": 1,
    "etag": "etag1"
}