Skip to main content
Part objects in ION represent abstractions that carry information about a particular part, while the physical parts themselves are Inventory objects. A Part object dictates the mBOM, revision, supplier part number, tracking type, and other attributes of a part. For the full list of Part fields, see the Part type in the API Reference, or open the GraphiQL editor in ION from Developer Platform > GraphQL.

Query parts

The queries below list parts by a filter or get a specific part. List parts with a filter:
Set the filter variables:
To return only the latest revision of each part, add "isLatestRevision": { "eq": true } to filters. Get a single part by ID:

Create a part

The part number and revision must be unique. If you supply no revision in the mutation, the part defaults to revision A. Once created, you cannot update the revision of a part. Instead, use the createPartRevision mutation to iterate a part’s revision. Create the part with this mutation:
Set the variables:
If the part you create contains custom attributes, declare the attributes when you create the part, even if an attribute contains no value.
To create a part with attributes, include them in the mutation input:
Set the variables:

Update a part

You can update the tracking type to either serial or lot only if all existing inventory objects related to the part conform to the new tracking type. Update the part with this mutation:
Set the variables:

Create a part revision

You can generate a revision from any part. For example, if your part “ion-13” has existing revisions A and B, you can generate a third revision C from either revision A or B.

What the new revision copies

The new revision starts as a copy of the source part. The createPartRevision input accepts overrides for description, thumbnailId, supplierPartNumber, revisionScheme, and trackingType. Everything else comes from the source part:
  • Part fields. All part fields except the ones ION sets itself: id, parentId, revision, revisedFromId, revisionScheme, entityId, the created and updated timestamps, and the created-by and updated-by users. ION sets revisedFromId to the source part’s id.
  • File attachments. The new revision links to the same file attachments as the source, including link-only attachments. Both revisions share the same attachment records, so there is no second copy of the file.
  • Assets, labels, and requirements. Linked to the new revision the same way as file attachments.
  • Custom attributes. Copied with their values.
  • Part subtypes and planning policy. Copied.
  • mBOM. ION creates a new Draft mBOM at version 1 for the new revision. If the source part has an mBOM, ION copies the items from its latest version into it, along with each item’s substitutes and reference designators. The source’s status doesn’t carry over, so a released mBOM on the source becomes a draft on the new revision. See mBOM versions and release.
The new revision does not copy comments, barcode labels, or subscriptions.

How the new revision is chosen

You can’t set revision in createPartRevision. ION chooses it for you:
  • Without revisionScheme, the new revision is the next revision in the part’s scheme after the part number’s latest revision. That is not always the source’s next revision. If revisions A and B exist, B is the latest, and you revise A, the result is C. If the part’s latest revision is Z, the new revision is AA.
  • With a revisionScheme that differs from the part’s current scheme, the new revision is the initial revision of that scheme. See Convert the revision scheme of an existing part.
  • If the chosen revision already exists for the part number, the mutation fails with Revision X already exists on part Y. Choose a different revision or scheme.

Set a revision when you create a part

If you set revision in createPart, ION checks these rules:
  • The revision must match the format of the part’s revision scheme. The default scheme is alphabetical, so a revision such as 1 fails with Revision 1 for part N is invalid. Must follow set revision format (ALPHABETICAL).
  • The revision is not required to come after existing revisions. You can create revision C and then revision A of the same part number.
  • The part number and revision pair must be unique, and uniqueness ignores case. Creating a when A exists fails.
  • The latest revision is the most recently created one, not the highest. If you create C and then A, latestRevision is A, and a revision created from either one is B. A - revision counts as the latest only when it is the part number’s only revision.
  • Setting a different revisionScheme in createPartRevision restarts numbering from the initial revision of the new scheme. In updatePart, it casts the current revision instead.
Create a revision with this mutation:
Set the variables:

Delete a part

Deleting a part cascades to delete the mBOM and mBOM substitutes associated with the part. You cannot delete a part that has existing inventory or that was used within a run. Delete the part with this mutation:
Set the variables:

Custom part revision scheme

ION lets you define custom schemes for part revisioning. You define these schemes in your organization’s settings. The mutation below creates a new scheme. You first need the ID and etag of the organization before you can update its settings. Four additional variables define a part revision scheme:
  • name (string): The name of the new revision scheme.
  • default (boolean): If true, all newly created parts inherit this revision scheme.
  • allowOverflow (boolean): Defines whether ION raises an error when the revision scheme reaches its max iteration, or overflows to the next available value.
  • format (array of strings): Defines how the values of a revision scheme appear. The string values in the array can be NUMERIC, ALPHABETICAL, or single-character-length constants. The format below defines part revisions like 00-1 or 95-7.
Create the revision scheme with this mutation:
Set the variables:

Update a part revision scheme

Once a part revision scheme exists in your organization’s settings, you can update it. The only fields you can update on a part revision scheme are allowOverflow and default. Update the revision scheme with this mutation:
Set the variables:

Convert the revision scheme of an existing part

Two strategies change the revision scheme of an existing part. Both set the revisionScheme for a part in either the updatePart or createPartRevision mutation above. Set revisionScheme to the name of one of the schemes in your organization’s settings.
  • Setting revisionScheme in the updatePart mutation casts the part’s revision. For example, if a part currently has revision D and you update that part to use the revisionScheme “new scheme” created above, the revision is set to 00-4.
  • Setting revisionScheme in the createPartRevision mutation resets the part’s revision, starting it over from the initial revision of the new scheme. If a part has revision D and you update the part’s revisionScheme in the createPartRevision mutation, it is set to 00-1.