# Script Parts and Stock

The earlier chapters used the Kanoa Inventory screens. Everything those screens do runs through the `system.kanoa.inventory` functions, and you can call the same functions from your own scripts.

Script instead of clicking when you need to:

- **Build your own screen.** A technician screen or scanner workflow that issues parts without opening the Inventory pages.
- **Load data in bulk.** Add the same bill of materials to many machines, or load a parts list from a file.
- **Report.** Send purchasing the list of parts to reorder.
- **Integrate an ERP.** Keep the parts catalog in step and record deliveries as they arrive.

You run these scripts from the Ignition Designer: the Script Console to try them, then project script libraries, gateway scripts and Perspective views to run them for real. Each function returns a value, or a `(value, message)` pair where `message` is `None` on success. The reference page for each function is embedded in its lesson.

:::info[Before you start]
Complete the earlier Inventory chapters first. These lessons use the parts, the Parts Room storeroom and the Machine 1 bill of materials you built there.
:::

## Lessons

1. [Issue Parts from Your Own Screen](./1-issue-parts-from-your-own-screen.md): issue a part to a work order from a script, and read back the parts used.
2. [Load BOMs by Script](./2-load-boms-by-script.md): add bill of materials items to many assets in one run.
3. [A Reorder Report by Script](./3-reorder-report-by-script.md): list the parts below their reorder point for purchasing.
4. [Sync Parts and Receipts from an ERP](./4-sync-from-erp.md): add or update parts, and record deliveries as receipts.
