Skip to main content

createBomDraft

Requires permission biddesk:assembly:manage.

Opens an assembly's next draft bill of materials, copying the lines of fromVersionId or else of its released version. Refused with BOM_DRAFT_EXISTS (and draftId) when the assembly already has a draft. 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 CreateBomDraft($assemblyProductId: ID!) {
createBomDraft(assemblyProductId: $assemblyProductId) {
id
status
createdAt
assemblyProductId
note
obsoletedAt
lines {
id
findNumber
alternateProductIds
bomVersionId
componentProductId
drawingRef
}
}
}

Variables:

{
"assemblyProductId": "id"
}

Response:

{
"data": {
"createBomDraft": {
"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"
}
]
}
}
}
createBomDraft(
assemblyProductId: ID!
fromVersionId: ID
): BomVersionWithLines!

Arguments​

createBomDraft.assemblyProductId ● ID! non-null scalar​

The assembly product.

createBomDraft.fromVersionId ● ID scalar​

A version of the same assembly to copy; default its released version.

Type​

BomVersionWithLines object​

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