# Defect Actions ## Overview The Defect Actions feature allows users to define actions to be applied to a material when a specific defect occurs. These actions can be triggered either when a defect is recorded or when the material is tracked out of a process step. Defect Actions are configured per Product and enable automated handling of defective materials to ensure consistent quality control. !!! note "Background Information" Defect handling in Surface Mount Technology (SMT) manufacturing is a critical process to ensure the quality and reliability of electronic assemblies. SMT involves mounting electronic components directly onto the surface of printed circuit boards (PCBs), and due to the precision required, defects can occur at various steps of the manufacturing process such as at the pick and place or solder paste processes. These defects can include issues like misalignment of components, soldering problems (e.g., solder bridges, voids), and missing components, among others and are normally detected by equipment or operators at an inspection/test step. --- ### Concept When a material completes a relevant operation (defect recording or track out), the system evaluates the **SMTDefectActionContext** to determine if a Defect Action should be triggered. The evaluation process: 1. The system identifies the triggering operation (based on configuration) 2. Matches the material context (Product, Flow, Step, Defect Reason, etc.) 3. Determines the applicable Defect Action 4. Executes the selected action > Only **one Defect Action** is applied per material and defect, except for specific cases (see below) --- ## Functional Behavior ### Available Defect Actions The table below enumerates the available defect actions and their respective effects, **ordered by their precedence**: | Defect Action | Description | | :----------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **None** | Defines that no defect action should happen to a given material. | | [**Terminate Material**](../../tutorials/terminatedefectaction/index.md) | Defines that a defective board should be terminated when tracked out. Requires the association of a loss reason. In case of line flows, except if it’s the last line step, the loss reason must be configured at the following step where the terminate is to be executed. Can't be directly applied to a panel without specifying a board as the sub-material ID. | | **Hold** | Defines that the defective material should be put on hold when tracked out. (Must be a topmost material) | | **Change Material Quantity** (deprecated) | Sets the primary quantity of the defective material to a specified value. | | **Go Back To Step** | Defines that the defective material, when tracked out, should go back to a previous step of the same line flow or flow. | | **Send to Rework** | Defines that the defective material should be sent to a predefined off-flow. Requires the association of an off-flow reason. In case of line flows, except if it’s the last line step, the off-flow reason must be configured at the following step where the terminate is to be executed. | | **Open Protocol** | Opens a protocol instance for the defective material. | | **Send a Notification** | Sends a notification regarding the defective material to all users, a group or a specific user. | !!! note "Precedence" The higher up a defect action is on the table above, the higher priority it has. The defect action "None" has the highest precedence and will override all the others, for example. --- ### Trigger A Defect Action is triggered when either: - A defect is recorded on a material - A material is tracked out of a step (depending on configuration) ### Allowed Actions Note that the **TrackOut** has available **all** the defect actions but the **Record Material Defect** has only the following trigger operations: - None - Change Material Quantity - Open Protocol - Send a Notification --- ### Key Components #### SMTDefectActionContext (Smart Table) Defines the context in which a Defect Action applies, including: - Product / Product Group - Flow / Step - Defect Reason - Defect Action This table is used during runtime to resolve which action should be executed. --- #### Product Defect Actions Defines: - The triggering **operation** - The **Defect Action** - Action-specific parameters Both configuration layers must align for correct execution. --- ### System Actions Once triggered, the system: - Resolves the matching Defect Action - Applies precedence rules - Executes the selected Defect Action --- ### Important Note Both configurations are required: - **SMTDefectActionContext** - **Product Defect Actions** If only one is configured, Defect Actions will not be executed. --- You can find more detailed information about **Defect Actions** in the [**Terminate Material**](../../tutorials/terminatedefectaction/index.md) tutorial.