Bill of Materials Mutations

CreateBillOfMaterial

Creates a new bill of materials.

Parameters:

ParameterTypeDescription
inputBillOfMaterialInput!BOM data.
mutation CreateBillOfMaterial($input: BillOfMaterialInput!) {
  CreateBillOfMaterial(input: $input) {
    id
    label
    active
    is_default
    variant_id
    components {
      id
      quantity
      weight
      component {
        id
        label
      }
    }
  }
}

UpdateBillOfMaterial

Updates an existing bill of materials.

Parameters:

ParameterTypeDescription
idID!BOM ID.
inputBillOfMaterialInput!Updated fields.

DeleteBillOfMaterial

Deletes a bill of materials.

Parameters:

ParameterTypeDescription
idID!BOM ID.

SetDefaultBillOfMaterial

Sets a BOM as the default for its variant.

Parameters:

ParameterTypeDescription
idID!BOM ID.

EnableBillOfMaterials

Enables one or more bills of materials.

Parameters:

ParameterTypeDescription
ids[ID!]!List of BOM IDs.

DisableBillOfMaterials

Disables one or more bills of materials.

Parameters:

ParameterTypeDescription
ids[ID!]!List of BOM IDs.

BillOfMaterialInput data type

FieldTypeDescription
labelStringBOM name.
descriptionStringOptional description.
activeBooleanWhether active.
is_defaultBooleanWhether default.
variantProductVariantIDInputProduct variant.
components[BillOfMaterialComponentInput]Components list.

BillOfMaterialComponentInput data type

FieldTypeDescription
component_idIDComponent variant ID.
quantityFloatRequired quantity.
weightIntComponent weight.

Data Types

VariantComponentInput

FieldTypeDescription
idIDComponent ID (for updates).
variant_idIDParent variant ID.
component_idIDComponent variant ID.
quantityFloatRequired quantity.

AssemblyInput

FieldTypeDescription
idIDAssembly ID (for updates).
quantityFloatQuantity to assemble.
location_idIDLocation ID.
batch_numberAssemblyBatchNumberInputBatch number details.
components[AssemblyComponentInput]Components list.

AssemblyComponentInput

FieldTypeDescription
idIDComponent ID (for updates).
quantityFloatQuantity.
batch_numbers[AssemblyBatchNumberInput]Batch numbers.

AssemblyBatchNumberInput

FieldTypeDescription
idIDBatch number ID (for updates).
quantityFloatQuantity.
dataBatchNumberInputBatch number details.
serial_numbers[SerialNumberInput]Serial numbers for this batch.
serial_number_textStringSerial number text.