abom as built bill of materials api.md

aBOM (As-built Bill of Materials)

An As-built Bill of Materials (aBOM) tracks the build process of parts in a hierarchical tree structure. The aBOM will track which part instances and lots are used within the creation of parts, subsystems, and systems. The aBOM can be thought of as a more intricate copy of the mBOM, with relations to physical inventory objects rather than parts. See here for more info on aBOMs.

Setup: Part inventory

Creating Part Instances and Lots

To create an aBOM, you will need an inventory. See the Part Inventory API for details on creating inventory. A part with inventory will have a part number, and that part should have an mBOM. This mBOM will be used to create the aBOM.

When it is first created, the part inventory will have only empty build requirements. Build requirements define the parameters for what parts can be installed.

Installing parts

Installing a part is done via creating an aBOM installation. aBOM installations link inventories to buildRequirements. Conversely, uninstalling a part is done by deleting aBOM installations.

{% tabs %} {% tab title="Create aBOM installation" %}

mutation CreateABomInstallation($input: CreateABomInstallationInput!) {
    createAbomInstallation(input: $input) {
        abomInstallation {
            buildRequirementId
            buildRequirementReferenceDesignatorId
            partInventoryId
            quantity
        }
    }
}

{% endtab %}

{% tab title="Inputs" %}

{
    "input": {
        "buildRequirementId": 1,
        "partInventoryId": 3,
        "quantity": 1
    }
}

{% endtab %} {% endtabs %}

Editing build requirements

You can add additional build requirements to an inventory that don't originate from the mBOM.

To add a build requirement:

{% tabs %} {% tab title="Create build requirement" %}

mutation CreateBuildRequirement($input: CreateBuildRequirementInput!) {
  createBuildRequirement(input: $input) {
    buildRequirement {
      fixedQuantityPerBuildRequirement
      id
      madeOnAssembly
      originMbomItemId
      partId
      partInventories {
        id
      }
      quantityPerParentPartInventory
    }
  }
}

{% endtab %}

{% tab title="Inputs" %}

{
  "input": {
    "partId": 1,
    "partInventoryId": 484,
    "quantityPerParentPartInventory": 5,
    "fixedQuantityPerBuildRequirement": 0,
    "madeOnAssembly": false
  }
}

{% endtab %} {% endtabs %}

To edit a build requirement:

{% tabs %} {% tab title="Update build requirement" %}

mutation UpdateBuildRequirement($input: UpdateBuildRequirementInput!) {
    updateBuildRequirement(input: $input) {
        buildRequirement {
            fixedQuantityPerBuildRequirement
            id
        }
    }
}

{% endtab %}

{% tab title="Input" %}

{
  "input": {
    "id": 1031,
    "etag": "dca4e886ecce4a499d15411006a6d82a",
    "quantityPerParentPartInventory": 8
  }
}

{% endtab %} {% endtabs %}

In this example, the quantityPer of the buildRequirement is changed, but you could also change the fixed quantity, MOA designation, substitutes, and reference designators.