# Using Item States

In this section you configure item states so waste counts can be classified by reason, organize them into categories, link them to Manual Pack 1, and record a waste count with a reason.
A basic waste count event records a quantity. A richer waste count event is linked to an item state:

```text
Waste count: 5
Waste Reason: Damaged Parts
```

The result is a waste event you can later analyze by reason.

::embed-section{src="../../../kanoa-ops/items/item-states.md" collapsed="true" summary="Reference Materials: Item States - Classify your scrap reasons or define infeed counts as First Pass / Rework."}

:::action[Configure Manual Pack 1 Scrap Reasons]

1. Open **Configuration → Ops → Item States**.
2. Create the following item state category structure:

   ```text
   Quality
   Quality\Coating
   Quality\Handling
   Process
   ```

3. Add these item states, and associate each one with the **Waste** counter type:

   ```text
   Quality\Coating\Bad Coating
   Quality\Coating\Insufficient Coating
   Quality\Handling\Damaged Parts
   Quality\Handling\Cosmetic Defect
   Process\Incorrect Item
   ```

4. Open the **Item States Link** tab.
5. Link the new scrap reasons to `Manual Pack 1`. Linking the categories is enough; you do not need to link each reason individually.
6. Save the configuration.
:::

:::action[Enter waste with a reason]

1. Start a new production run on `Manual Pack 1`.
2. Navigate to **Ops → Operations → Run Review** and select `Manual Pack 1`.
3. Select the production run and click the eye icon (or double-click the row) to open the run details.
4. Open the **Counts** tab.
5. Add a waste count using the button for one of the configured waste reasons.
6. Save the event.
7. Review the run data and confirm the waste event includes both quantity and reason.

:::

:::check

Copy this script into the Ignition Designer Script Console (**Tools → Script Console**) and run it. It checks the four item state categories, that each scrap reason is in the right category and associated with the **Waste** counter type, that all five are linked to Manual Pack 1, and that Manual Pack 1 has a waste count with a reason. Each check prints PASS or FAIL with what to fix. It doesn't change anything.

<details>
<summary>Show the check script</summary>

::check-script{src="ops/01-base-configuration/9-item-states.py" title="checkLesson-itemStates.py"}

</details>

:::
