Skip to main content

saveBomLines

Requires permission biddesk:assembly:manage.

Adds, changes and removes lines of a draft bill of materials in one save. The whole tree is checked; any problem (a cycle, more than 12 levels, a bad quantity…) refuses the save as BOM_INVALID with errors, and nothing is written. Refused with BOM_VERSION_NOT_DRAFT on a released or obsolete version, BOM_TOO_LARGE over 5,000 lines and VERSION_CONFLICT when someone saved first. Requires Bid Desk with engineered products and permission to manage assemblies.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation SaveBomLines($input: SaveBomLinesInput!) {
saveBomLines(input: $input) {
id
status
createdAt
assemblyProductId
note
obsoletedAt
lines {
id
findNumber
alternateProductIds
bomVersionId
componentProductId
drawingRef
}
}
}

Variables:

{
"input": {
"expectedVersion": 0,
"versionId": "id"
}
}

Response:

{
"data": {
"saveBomLines": {
"id": "id",
"status": "DRAFT",
"createdAt": "2025-01-15T00:00:00Z",
"assemblyProductId": "id",
"note": "string",
"obsoletedAt": "2025-01-15T00:00:00Z",
"lines": [
{
"id": "id",
"findNumber": "string",
"alternateProductIds": [
"id"
],
"bomVersionId": "id",
"componentProductId": "id",
"drawingRef": "string"
}
]
}
}
}
saveBomLines(
input: SaveBomLinesInput!
): BomVersionWithLines!

Arguments​

saveBomLines.input ● SaveBomLinesInput! non-null input​

The lines to add, change and remove.

Type​

BomVersionWithLines object​

A bill-of-materials version with its live lines.