The "Quality Automation Rules" page is where the Tests (inclusive of the Checks you want to do within it) are registered against specific transactions in Business Central so that the system knows when to automatically generate a "Quality Order" in order for the tests to be done. Here you can also define how often these are to be generated and against what, using specific filters. 

You can access this page either from the "Quality Setup" ribbon, the Role Center via the 'Quality Tests' tab in the ribbon or simply searching for "Quality Automation Rules". This will open up the "Quality Automation Rules" page. Here, you can either create a new line by selecting the +New option in the ribbon, or you can use the Assisted Setup by selecting the Create New Rule option which will take you through each bit of setup with more explanation. The instructions below show how to create one manually via the +New button.

Once the +New option has been selected, a "Quality Automation Rule Card" will open showing a number of FastTabs with blank fields. From the ribbon, the Create New Rule option can still be chosen which will then just update the open card with the details you populate. There is also an Activate option. This only needs to be selected once all the fields are updated with your chosen setup and you wish to use this Automation rule to automatically create "Quality Orders". Selecting the arrow next to Activate will show another option, Deactivate which will be greyed out if the card is not yet Activated.

The Job Queue Entry button in the ribbon is only relevant for Automation Rules where the Transaction Type is 'Timed (Job Queue)' and is mentioned further down this article in more detail. 

General FastTab

The Entry No field will automatically populate with the next available number in the "Quality Automation Rules" list so this cannot be changed. Within the Description field, you can enter a unique code that will help explain what automation rule this relates to. Within the Transaction Type field, there is a dropdown arrow showing the following options: 

The difference between the 2 Production Transaction Types is that 'Production Output' is for the physical posted Lot/Serial so your "Quality Order" will be based on this output. If using 'In-Process Production', our "Quality Orders" created from this will only be against the Output as there is no Lot/Serial committed to stock at this point in time.

Depending on which option is chosen, depends on what can be done with this transaction. For the Pre-Posting options ('Warehouse Receipt' and 'Warehouse Shipment'), these will automatically create a quality order once the receipt/shipment has been created but will not allow the document to be posted until the "Quality Order" is complete. Due to this, these 2 Transaction Types are not linked to stock so are not Lot/Serial No specific. We expect these to be used for Non-Item related checks such as Vehicle checks, documentation checks etc. This also applies to the 'Timed (Job Queue)' Transaction Type

For all other Transaction Types, these MUST be Lot/Serial No specific. Using these Transaction types means that the "Quality Order" will generate once the document is posted/received.

Once the Transaction Type has been chosen, the Transaction Sub-Type can be chosen from the dropdown. This is only applicable where the Transaction Type is either 'Warehouse Receipt' or 'Warehouse Shipment' and it is there to specify what the Receipt/Shipment relates to i..e 'Return', 'Shipment' or 'Transfer'. 

When using the Transaction Types: 'Warehouse Receipt', 'Warehouse Shipment' or 'In-Process Production', you have the ability to utilise the Block Transaction toggle. This will effectively prohibit a User from continuing with a process when a failed "Quality Order" has been posted for the associated Lot/Serial no. The Active field is un-editable and this will be marked as 'Yes' when a User clicks on the Activate option in the ribbon. 

Filters FastTab

Dependant on the Transaction Type chosen will depend on the filters that can be applied (where not applicable, the 3 dots next to it will not display to define the values to filter by). The filter options are against Items, Locations, Customers, Vendors, Work Centre and Machine Centers. By clicking into any of these fields and clicking on the 3 dots, enter the Code/No for the option you want to filter by. You can select multiple entries by using standard BC filtering techniques. Where filters have been applied, these can be drilled into quickly to see the data. In the example below, these are shown in blue font. Where a filter hasn't been applied, these will default to 'All'. 

These filters are useful to further clarify what items, customers etc will trigger the automation rule to create a "Quality Order" so ensuring these are being used accurately will only enhance the productivity within your Quality team.

Test Metrics FastTab

In the Quality Test No field, select the "Quality Test" that is to be used as part of the "Quality Order" when this Transaction Type is being processed. You can only define 1 test here and it is Mandatory to be populated. Only 'Certified' tests will show as available to choose from.

Then you can confirm the Quality Order Creation. The options you can pick from here are 'Per Item' or 'Per Serial'Lot No'. 'Per Item' will create a "Quality Order" for every item within the specified Transaction Type (or just the ones you have filtered on in the Item filter if you have some selected). So if I have a "Quality Automation Rule" for Transaction Type 'Purchase Receipt', where my Item filter applies to 'All' and I choose 'Per Item' as my Quality Order Creation, when I post a "Purchase Receipt" containing 3 Items, each with 2 Lot numbers, I would expect to get 3 automatically created option "Quality Orders", 1 per Item. Each individual "Quality Order" would be for the qty of the specified Item from the "Purchase Receipt" and would display any Lot Numbers/Serial's that applied to it within the same "Quality Order". 

Choosing the option 'Per Serial/Lot No' using the same setup above would generate 6 automatically created "Quality Orders", 1 Quality Order per Lot number/serial number assigned on posting the "Purchase Receipt". 

Here, you can also confirm the Test Criteria which is to confirm whether you want the "Quality Order" to be created for the 'Full Quantity' from the Transaction Type Source Document or a 'Sample' Quantity'. If you choose 'Full Quantity', than the remaining fields regarding samples on the Test Metrics FastTab will be greyed out, deeming these irrelevant as the "Quality Order" will automatically be created for the full quantity from the source document it was created from. Where 'Sample' is chosen, then both the Sample (%) field and the Minimum Sample Qty fields must be populated before the card can be Activated. The Sample (%) requires the user to add in a whole number, confirming the percentage of the Quantity for the item that must be included on the "Quality Order". For example, if receiving in an Item line for Quantity '100 PCS' and the Sample (%) states the value '10', the "Quality Order" will automatically know the sample to test for the item will be '10' with this being 10% of the received qty. Populating a whole numerical value in the Minimum Sample Qty field will then act as an override if the Sample (%) value is less than it. For example, the User may define for the Item within this "Quality Automation rule" that it always must have 15 pieces sampled, so the value of '15' is populated in the Minimum Sample Qty. Using the example above receiving in a qty of '100', this would then automatically create the "Quality Order" for '15' to test because this is the absolute minimum qty needed to perform the "Quality Order" and as the Sample (%) was less, the Minimum takes priority. 

Occurrence FastTab

The fields here are to specify how often you want Business Central to create the "Quality Orders" based on the specified rules above. These are both mandatory fields. 

Interval Type and Interval Quantity work hand in hand so depend on each other in order to confirm when "Quality Orders" are raised. Interval Type can either be 'Every' or 'First'. So if 'Every' is chosen and in Interval Quantity, the numerical value of '1' is entered, for every single document that is the Transaction Type specified above and meets the filters chosen, a "Quality Order will be raised. Alternatively if the Interval Quantity was '2', every other posted document would result in a "Quality Order" being created. 

If you chosen Interval Type as 'First' instead, with an Interval Quantity of '2', than for the specified Transaction Type and filters, you would only get "Quality Orders" raised 2 times and never again when posting the same document type with the same filters applied, regardless of being 'Activated'. This may be particularly useful if trading with new Customers or Vendors and you wish to perform quality checks on them for the first few orders but never again once they have been done.