# Write a Procedure

A procedure is the set of steps a technician follows. You write it once and attach it to a work order template. Every work
order made from that template then carries the same instructions, and the results are recorded.

## What a Procedure Contains

| Part | What it is |
| --- | --- |
| **General Information** | The name, category and description |
| **Step** | A major phase of the job, with an estimated time in minutes |
| **Check** | One task or verification inside a step |
| **Entry options** | How the technician records a check's result |
| **Images** | Diagrams or photos that show the technician what to look at |

Steps and checks each have **Enabled** and **Required** flags. A check also has a data type that decides how its result is
captured.

![A procedure in Kanoa Maintenance](https://docs.kanoa.ai/img/cmms/procedure.png)

## Build the Procedure

For example, CoreForge's weekly PM for Machine 1 has three steps: Lubrication, Coolant System and Safety Guards.

1. Open **Configuration → Maintenance → Procedures**.
2. Create a category for your procedures, such as `Machining`.
3. Add a procedure in it with a name, such as `Machine 1 Weekly PM`, and a description. Make sure it is enabled.
4. Add each step with its name and estimated time, such as `Lubrication` at 10 minutes.
5. Add the checks under each step, such as `Way lube reservoir filled`. Choose each check's data type and entry options.
6. Save the procedure.

{/*
TODO: Confirm on a gateway the exact buttons and fields for adding a category, procedure, step and check, and add a
screenshot. The Developer Training uses data type Boolean with the entry method OK / Not OK, and clears Allow N/A on a
check so the technician can't skip it. Confirm those names and where Allow N/A is set.
*/}

:::tip
Attach an image to a check where the technician needs to know where to look, such as a lube fill point.
:::

## Attach It to Work

A procedure does nothing until you attach it to a work order template. You do that when you plan the work, in
[Plan Preventive Maintenance](./4-plan-preventive-maintenance.md). Technicians then work through it as described in
[Execute a Work Order](../8-maintenance-technician/2-execute-a-work-order.md). The time they enter on each step is reported as
procedure step hours.

::embed-section{src="../../kanoa-cmms/procedure.md" collapsed="true" summary="Reference Materials: Procedures - Steps, checks and entry options."}

## Worked Example

The CoreForge sample plant writes a weekly preventive maintenance procedure for Machine 1, the same as Developer Training.

::embed-section{src="../../training/7-training-maintenance/01-maintenance-setup/2-procedures.md"}

## Check Your Understanding

1. What is the difference between a step and a check?
2. What decides how a technician records a check's result?
3. How does a procedure reach a technician?

<details>
<summary>Answers</summary>

1. A step is a major phase of the job. A check is one task or verification inside a step.
2. The check's data type and its entry options.
3. You attach it to a work order template. Work orders generated from the template carry the procedure.

</details>
