Inventory
ION tracks parts by serial number or lot number. You can also leave a part untracked and record only its quantity. Part inventory holds information about a part and sets it up so you can track it in runs and aBOM construction. This page covers how to create part inventory objects, issue those parts to part kits to allocate inventory to runs, and move new or unused parts back into inventory.| Part inventory | Description |
|---|---|
| id | Unique identifier for a part inventory object. |
| serialNumber | Required if the part is serial tracked. Must be unique per part, so another inventory object with the same part relation cannot have a matching serial number. Can optionally be autogenerated. |
| lotNumber | Required if the part is lot tracked. Can optionally be autogenerated. |
| location | Location where the inventory object is stored. |
| part | Part that this inventory object is an instance of. |
| unitOfMeasure | How the quantity of this inventory object is measured. |
| quantity | Amount of inventory present. |
| runs | Runs related to this inventory object. |
| installed | true if all quantity is attached to aBOM items, otherwise false. |
| kitted | true if all quantity is kitted to runs, otherwise false. |
Inventory tracking types
| Tracking type | |
|---|---|
| serial | Any inventory with a serial number has the serial tracking type. It can also have a lot number in addition. Serialized inventory objects can only have a quantity of 0 or 1. |
| lot | Any inventory object with a lot number and no serial number is lot tracked. Lot-tracked items must have a quantity greater than or equal to 0. |
| untracked | If a part inventory has neither a serial nor a lot number, it is an untracked item. There are no quantity restrictions on an untracked part. |
Query part inventories
The queries below list part inventories by a filter or get a specific inventory object: List part inventory with a filter:Create part inventories
Run the mutation below with the first inputs to create a part inventory object for the serial part with part id 1. Run the mutation again with the second inputs to create an inventory object for the lot-tracked part with part id 2. When you specify no quantity, the inventory object has a quantity of 0. You can also autogenerate the serial number and lot number using the last set of inputs. Create the inventory with this mutation:Update inventory items
You can change almost all the fields on an inventory object except its relation to the part it is an instance of. All the quantity and tracking-type validations enforced on creation are also enforced on update. The mutation returns the updated part inventory object. Update the inventory with this mutation:Delete part inventories
Delete a part inventory object using the following mutation. It returns the id of the deleted part inventory object. Delete the inventory with this mutation:Issue parts to runs
.png?fit=max&auto=format&n=YrwX258m7a4En2z1&q=85&s=0c9f2a7b281faef4a662f98ba43324d1)
Part kits
Part kits let you allocate specific parts and quantities for a run. To create a part kit, you must already have a run. See the Runs example for how to create one. To remove parts from inventory and attach them to the run that consumes them, use a part kit object. The mutation below creates a part kit and attaches it to a run:| Part kits | Description |
|---|---|
| id | Unique identifier for a part kit object. |
| run | Run that inventory objects are kitted to. |
| partInventories | Inventory objects with an additional field, issuedQuantity, which identifies the quantity of the inventory allocated to the run. |
Issue inventory to kits
To move parts from inventory into the part kit, use theissueItemToKit mutation. Whether a part is serial-tracked, lot-tracked, or untracked, you reference its partInventoryId and, when the item is not serial-tracked, the quantity you want to issue to that kit:
Issue an item to the kit with this mutation:
issueItemToKit mutation. When you issue parts to a kit, the kit shows the quantity of that required part fulfilled as issuedQuantity. The quantity is decremented from the original inventory object.
Move parts back to inventory
Once a serial-tracked part is built, move it back to inventory for use on a higher-level assembly. To do so, use themoveItemToInventory mutation:
Move an item back to inventory with this mutation: