---
title: "Sample Workflows for Quality Inspector: Moving Items, Initiating a Retest, and Discarding Failed Stock"
app: "Quality Inspector"
section: "How-to guides"
last_updated: "2026-06-12"
url: "https://insight-works.com/kb/quality-inspector/sample-workflows-for-quality-inspector-moving-items-initiating-a-retest-and-discarding-failed-stock/"
---

# Sample Workflows for Quality Inspector: Moving Items, Initiating a Retest, and Discarding Failed Stock

Common outcomes for quality inspections include initiating inventory movements or further testing based on inspection results. You can enable Multiphase processes through a series of workflow responses handling each step. The following example outlines a receiving lot by lot scenario where failed items are moved to another location for retesting. Further failures result in discarding the items, but a passed retest automatically initiates a move back to the original location.

### Prerequisites

- Have two locations in the company (this example uses the CRONUS Silver and Blue locations)
- Have run Assisted Setup for Quality Inspector
- Have a Quality Inspection Template
- Have a lot-tracked item

### Setup: Create a test when a purchase order is received

Automating the generation of inspection tests when receiving stock ensures consistent quality control, reduces manual errors, and enables timely identification of non-conforming items for further action.

To automatically create a test when a purchase order is received, a generation rule with a purchase trigger must be present.

1. Navigate to the _Quality Inspection Templates_page in Business Central and select the desired template.
2. Select **Test Generation Rules**.
3. Select a new row to initiate a new rule.
4. Input a description of the rule, set the intent to Purchase, and set the table to Purchase Line.
5. Add a filter to limit the _Location Code_ field to the Silver warehouse.
6. Set the _Purchase Trigger_ field to “When Purchase Order is received”.

When a purchase order is received in the Silver location, a new test will be created.

### Setup: Blocking a lot when a test has failed

While you can use a workflow to block or unblock a lot based on a Quality Inspection Test result, blocking the lot this way can impact other desired transactions, such as moving the failed items. You can implement more granular lot blocking via Quality Inspection Grades.

1. Navigate to _Quality Inspection Grades_ in Business Central.
2. Select **Edit List**.
3. Update any of the allow transaction columns to prevent specific transactions from being performed when the test has failed for the FAIL grade (e.g., you can prevent sales, purchases, consumption, and output while allowing inventory movements to take place).

### Workflows

#### Setup: Ensure Quality Inspection Workflows are Enabled

1. Navigate to _Quality Inspector Setup_ in Business Central.
2. Select**Show More** in the _Defaults_FastTab.
3. Ensure that _Workflow Integration_is set to **Enable Workflow Integration**.

#### Setup: Add Movement and Adjustment Batches

You must specify the item journal batches for inventory movements and adjustments on the _Quality Inspector Setup_page. If the journal batch does not have a no. series, the test no. is used instead.

1. Navigate to _Quality Inspector Setup_ in Business Central.
2. Navigate to the _Inventory and Warehousing_ FastTab.
3. Set a batch name in the _Batch Name_ field in the _Bin Movements and Reclassifications _section.
4. Set a batch name for _Batch Name_ field in the _Inventory Adjustments _section.

#### Setup: Add a Quality Inspection Workflow Category

1. Navigate to _Workflow Categories_ in Business Central.
2. Select **New**.
3. Input a code and description for the new category (e.g., QI or Quality Inspection).

#### Workflow 1.A: If a test fails, move the tested item to a retesting location

1. Navigate to _Workflows_in Business Central.
2. Select **New Workflow from Template ![](/wp-content/uploads/kb-legacy/Down-Arrow.png)**/**New**.
3. Input a value for the _Code_ field (e.g., MOVEFAILTEST).
4. Input a description in the _Description_field (e.g., “Move Failed and Create Retest”).
5. Select the previously-created Quality Inspection category in the _Category_ field.
6. **Assist Edit** the _When Event_of the first line in the _Workflow Steps_ subpage.
7. Select the _A Quality Inspection Test is finished_ event.
8. Select the _On Condition_ field and add the following conditions for triggering the workflow:

   - Location Code: SILVER
   - Retest No.: 0
9. Select **OK** (the workflow triggers in the Silver location for initial tests with a Retest No. of 0).
10. Select **Select Response**in the _Then Response_ field.
11. Set the _Select Response_field to “Move Inventory from Test” (updates to display additional configuration for the workflow response).
12. Leave the default _Use Reclassification Journal_ in the _Movement Method_ section.
13. Toggle the _Entire Lot/Serial/Package_ field in the _Quantity_section (ensures that the entire lot is moved to the new location).
14. Select the Blue location in the _Destination_ section.
15. Ensure the _Post Immediately_field is enabled for automatic movement processing.

#### Workflow 1.B: If a test fails, create a retest

 Note: Continue after the _Workflow 1.A: If a test fails, move the tested item to a retesting location_ section.

1. Select the second response line in the _Response_ table and select **Create Retest** in the _Test_ response.
2. Select the third response line in the _Response_ table and select **Set Database Value** (updates the location of the retest).
3. In the _Configuration_ section, set the following values:

   - Table: IWX QI Test
   - Filter: WHERE(No.=FILTER([NO.]),Retest No.=FILTER(1))
   - Field: Location Code
   - Value to Set: BLUE

 Note: This will find the first retest matching the originating test’s no. and set the location code of the test header to BLUE. For more examples of using dynamic test fields, see the [_Quality Inspector Expression Examples_](/kb/quality-inspector/quality-inspector-expression-examples/) page.

1. Select **OK**.
2. Toggle _Enabled_ to activate the workflow.

#### Workflow 2: If a retest fails, discard the item

1. Navigate to _Workflows_in Business Central.
2. Select **New Workflow from Template![](/wp-content/uploads/kb-legacy/Down-Arrow.png)**/**New**.
3. Input a value for the Code field (e.g., FAILRETEST).
4. Input an appropriate description in the _Description_ field (e.g., Discard Failed Retest).
5. Select the previously-created Quality Inspection category in the _Category_ field
6. **Assist Edit** the _When Event_of the first line in the _Workflow Steps_ subpage.
7. Select the _A Quality Inspection Test is finished_ event.
8. Select the _On Condition_ field and add the following conditions for triggering the workflow:

   - Location Code: BLUE
   - Retest No.: <> 0
   - Grade Code: FAIL
9. Select **OK** (the workflow triggers for Blue location retests finished with a failing grade).
10. Select **Select Response**in the _Then Response_ field:
11. Select **Negative Adjustment** for the _Select Response_ field (updates to display additional configuration for the workflow response).
12. Toggle the _Entire Lot/Serial/Package_in the _Quantity_section (the entire lot is used for the retest).
13. Select the dropdown for the _Reason_ field to provide a reason code, if needed.
14. Leave the default _Just Create Entries_toggle in the _Post/Release Now or Later_ section to create the entries (allowing for further review before posting the adjustment).
15. Select **OK**.
16. Toggle _Enabled_ to activate the workflow.

#### Workflow 3: If a retest passes, return the item to the warehouse

1. Navigate to _Workflows_in Business Central.
2. Select **New Workflow from Template**/**New**.
3. Input a value for the _Code_ field (e.g., PASSRETEST).
4. In the **Description** field, enter an appropriate description (e.g., “Move Passed Retest”).
5. Select the previously created Quality Inspection category in the **Category** field.
6. **Assist Edit** the **When Event** of the first line in the **Workflow Steps** subpage.
7. Select the **A Quality Inspection Test is finished** event.
8. Select the _On Condition_ field and add the following conditions for triggering the workflow:

   - Location Code: BLUE
   - Retest No.: <> 0
   - Grade Code: PASS
9. Select **OK**(the workflow triggers for Blue location retests finished with a passing grade).
10. Select **Select Response** in the _Then Response _field.
11. Select the first response line in the _Response_ table and choose the **Move Inventory from Test**workflow response (updates to display additional configuration for the workflow response).
12. Leave the default _Use Reclassification Journal_ in the _Movement Method_ section.
13. In the _Quantity_ section, toggle the _Entire Lot/Serial/Package_(ensures the entire lot is moved).
14. Select the Silver location in the **Destination** section and select a bin to move the item to.
15. Leave the _Post Immediately_ toggle enabled to ensure the movement is processed automatically.
16. Select **OK**to close the page.
17. Toggle _Enabled_ to activate the workflow.

#### Test the Workflows

1. Create a purchase order for the lot-tracked item in the Silver location.
2. Add the tracking information to the line.
3. Receive the order (if the _Show Test_ setting in _Quality Inspector Setup_is set to show tests, the newly-created test will open; otherwise, navigate to _Quality Inspection Tests_and open the test).
4. Set the test measurements to a fail state so the overall grade for the test is a fail.
5. Finish the test (_Workflow A_ runs, creating and posting a reclassification journal to move the lot and creating a retest in the Blue location).
6. Test Workflow B, if needed:

   1. Navigate to the retest and set the test measurements to a fail state so that the overall grade for the test is a fail.
   2. Finish the test (Workflow B runs, creating an item journal for the negative adjustment).
7. Test Workflow C, if needed:

   1. Set the test measurements to a pass state so the overall grade for the test is a pass.
   2. Finish the test (Workflow C runs, creating and posting a reclassification journal to move the lot back to the Silver location).

Also refer to :

[https://kb.dmsiworks.com/knowledge-base/move-product-automatically-from-one-bin-to-another-bin-in-quality-inspector/](/kb/quality-inspector/move-product-automatically-from-one-bin-to-another-bin-in-quality-inspector/)
