mBOMs

mBOM items:

mBOM items represent the bill of materials required to construct a part. A part will have an mBOM made up of many mBOM items which dictate the subparts to be used in a part's construction. One can think of parts as a tree structure, where the nodes are part objects and the edges are mbom items. In this vein the root of the tree would be a part representing a completed assembly, it's MBOM would be parts used in its construction, and which in turn could have their own mBOM. Maintaining this tree structure through the mBOM and subsequent aBOM is a vital part of ion trace.

mBOM Item

Description

id

Unique identifier of mBOM Item object

parent

The part object which this mBOM item describes the construction of

part

The part object which will be used in the construction of the parent

quantity

The amount of a specific part needed in construction

substitutes

List of valid substitutes that could be used in place of the specified part

mBOM Substitutes

mBOM substitutes are valid alternatives that can be used in place of the defined part. Each of those mBOM items may have many mBOM substitutes which are subpart replacements for that specific subpart.

mBOM Substitute

Description

id

Unique identifier of mBOM Substitute object

part

The part object which can be substituted for the part in the mBOM Item

mbomItem

The mBOM Item for which this object is a valid substitute for

Query mBOM Item

The queries below specify how to 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
Filter Inputs
Get
List
query MBOMItems($filters: MBomItemsInputFilters) {
mbomItems(filters: $filters) {
edges {
node {
id partId parentId quantity
}
}
}
}
Filter Inputs
{
"filters": {
"parentId": {
"eq": 1
}
}
}
Get
query GetMBOMItem {
mbomItems(id: 1) {
id partId parentId quantity
}
}

Query mBOM Items

Query mBOM Substitute

The queries below specify how to list mBOM substitutes by a filter or get a specific mBOM substitute.

List
Filter Inputs
Get
List
query MBOMSubstitutes($filters: MBomSubstituteInputFilters) {
mbomSubstitutes(filters: $filters) {
edges {
node {
id partId parentId mbomItemId
}
}
}
}
Filter Inputs
{
"filters": {
"mbomItemId": {
"eq": 1
}
}
}
Get
query MBOMSubstitute {
mbomSubstitute(id: 1) {
id partId parentId mbomItemId
}
}

Query mBOM Substitutes

Create 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 to the part required in the building. The quantity value must be greater than 0. Returns the newly created mBOM Item.

Mutation
Inputs
Mutation
mutation($input: CreateMBomItemInput!){
createMbomItem(input: $input){
mbomItem {
id parentId partId quantity
}
}
}
Inputs
{
"input": {
"parentId": 2,
"partId": 1,
"quantity": 3
}
}

Mutation to create mBOM item

Update mBOM Item

The quantity of an mBOM item and its associated part's can be updated. Returns the updated mBOM Item.

Mutation
Inputs
Mutation
mutation UpdateMBomItem($input: UpdateMBomItemInput!) {
updateMbomItem(input: $input) {
mbomItem {
id parentId partId quantity
}
}
}
Inputs
{
"input": {
"etag": "etag1",
"id": 1
"partId": 3,
"quantity": 5
}
}

Mutation to update mBOM item

Create mBOM substitutes

Create a valid substitution for a specific part within an mBOM. Any parts which are listed with mBOM substitutes will not raise a validation error if they are attached to an aBOM instead of the part specified in the original mBOM Item.

Mutation
Inputs
Mutation
mutation CreateMbomSubstitutes($input:
[CreateMBomSubstituteInput]!){
createMbomSubstitutes(input: $input){
mbomSubstitutes {
id parentId partId mbomItemId
}
}
}
Inputs
{
"input": [
{'partId': 3, 'parentId': 2, 'mbomItemId': 1},
{'partId': 4, 'parentId': 2, 'mbomItemId': 1},
]
}

Mutation to create a mBOM substitute

Delete a mBOM Item

An nBOM Item may be deleted unless it has already been used in the construction of an aBOM. Returns the ID of the deleted mBOM Item

Mutation
Inputs
Mutation
mutation DeleteMBomItem($id: ID!, $etag: String!){
deleteMbomItem(id: $id, etag: $etag){
id
}
}
Inputs
{
"id": 1,
"etag": "etag1"
}

Mutation to delete an mBOM Item

Delete mBOM Substitute

Delete a mBOM substitute. Returns the ID of the deleted mBOM substitute.

Mutation
Inputs
Mutation
mutation DeleteMBomSubstitute($id: ID!, $etag: String!){
deleteMbomSubstitute(id: $id, etag: $etag){
id
}
}
Inputs
{
"id": 1,
"etag": "etag1"
}

Mutation to delete mBOM substitute