Add Decision Tree Model

Within this article you will find instructions on how to build a Decision Tree Model in Safefood 360°. The Decision Tree Model allows a User to create and customise their own Decision Trees. The Decision Tree Model can then be embedded into a Food Safety Plan, to be used as part of a Hazard Analysis, or into a Supplier/Material Template/Programme, to be used as part of Supplier/Material Assessment.

As opposed to the industry standard CODEX Decision Tree which can only have two outcomes (‘CCP’ or ‘Not CCP’), a User can build their own Decision Tree Model in Safefood360° which may virtually have any outcome they like.

Decision Tree Model outputs can be associated with specific Control Models. For example, in a Supplier Full Assessment Record, if you answer the questions in the Decision Tree, and there is an associated outcome, e.g. Onsite Audit, the system can complete all the details for this automatically in the Control workflow stage if a Control Model has been associated with that outcome of the Decision Tree.

How to Add a Decision Tree Model

Image: Navigating to the 'Add Decision Tree Model' Button

To add a Decision Tree Model, navigate to the Food Safety Plan module via the 'Risk>Food Safety Plan' dropdown. Once within the Food Safety Plan, click the 'Add Model>Decision Tree Model' button.

Image: Blank Decision Tree Model

Completing Model Details

Image: Blank Model Details

1. Name: Using the open text field, enter the 'Name' of the Decision Tree Model. This name will appear throughout the system where this Decision Tree Model is selected, e.g. within a Full Assessment Template or Programme, a Pre-Assessment Template or Programme and Food Safety Plans. [Mandatory Field]

2. Folder: Select a folder for your Decision Tree Model. It is recommended to maintain a tidy and organised structure within the system for improved efficiency when using the software, e.g. organising folders by the Module the Decision Tree is used such as SQM/Full Assessments, SQM/Pre-Assessment, Food Safety Plans, etc. If you require to create a new folder, click on the main ‘My Decision Tree Models’ folder, and click the 'New Folder' button at the bottom left side of the folder window. You will be prompted to name your new folder by simply typing into the open text field. To save the new folder, click away from the folder.

3. No.: The 'No.' is set automatically by Safefood 360°. It refers to the sequence of questions within the Decision Tree. When lines are added using the 'Add Line' button, the 'No.' will increase. The 'No.' will be for Yes and No 'Go To' Decisions.

Image: Question 'No.' Options Dependent on Number of Questions Added

4. Question: Using the open text field, detail the questions. The questions should be phrased to suit 'Yes' and 'No' responses. [Mandatory Field]

5. Yes Decision: The 'Yes Decision' field allows the User to define what should happen next if 'Yes' is selected for the particular question. The 'Yes Decision' field has two options to use when completing the 'Yes Decision', the dropdown list of 'Go To' responses, and an open text field for specific outcomes (stopping the Decision Tree workflow). [Mandatory Field]

- The dropdown contains a list of the remaining questions that can be selected to move the Decision Tree to, e.g. Go to 2, Go to 4, etc. On the other hand, the open text field allows the User to type in the end result of the Decision tree, e.g. CCP, oPRP, High Risk Supplier Controls Required, etc.

- If a 'Go To' question is selected from the dropdown list for the 'Yes Decision', within the Supplier/Material Assessment Record or Food Safety Plan, the Decision Tree will simply move the User to that question. However, if the end result is typed into the open text field for the 'Yes Decision', within the Supplier/Material Assessment Record or Food Safety Plan, the Decision Tree will end and the User will not need to complete any further questions.

6. Monitor?: If a result has been typed into the 'Yes Decision' field, e.g. CCP, oPRP, High Risk Supplier Controls Required, etc, the 'Monitor?' field must be completed. Click the empty field once for 'Yes' and a second time for 'No'. Selecting 'Yes' will result in the Monitoring Details workflow stage being opened within the Food Safety Plan, and the Controls workflow stage being opened within the Supplier/Material Assessments (If the Controls workflow stage has been enabled within the Template/Programme). Selecting 'No' will result in the Monitoring Details workflow stage being skipped in the Food Safety Plan, and the Controls workflow stage being skipped in the Supplier/Material Assessments. If 'Go to X' has been selected within the 'Yes Decision', the 'Monitor?' field is not applicable and the User will be unable to click the field.

7. Control Program: If the User has selected 'Yes' for the 'Monitor?' field for the 'Yes Decision', Control Models that have been built within the Food Safety Plan module using the 'Add Model>Control Model' button can be selected and linked to the Result. If a Control Model has been selected, once the Controls workflow stage has opened within the Supplier/Material Assessment, the Control Model associated with this Decision Tree outcome will populate automatically in the relevant fields.

Note: As well as adding your own Control Models to the Control Program section, you can also select System Control Models from the relevant folder, selecting from the as list of Material and Supplier Controls.

Image: Control Model Folders

Note: Selecting the 'Control Program' to populate when a Result is selected in the Decision Tree will only work with the Supplier/Materials Assessments. If the 'Control Program' is selected within a Decision Tree Model that is used within a Food Safety Plan, the Control Program selected won't open automatically in the Monitoring Details workflow section. The Control Program can however be selected manually once the Monitoring Details has opened, using the 'Add Control' button.

Image: Hazard Analysis Monitoring Details Workflow Stage 'Add Control'

8. No Decision: The 'No Decision' field allows the User to define what should happen next if 'No' is selected for the particular question. The 'No Decision' field has two options to use when completing the 'No Decision', the dropdown list of 'Go To' responses and an open text field for specific outcomes (stopping the Decision Tree workflow).

The dropdown contains a list of the remaining questions that can be selected to move the Decision Tree to, e.g. Go to 2, Go to 4, etc. On the other hand, the open text field allows the User to type in the end result of the Decision tree, e.g. CCP, oPRP, High Risk Supplier Controls Required, etc.

If a 'Go To' question is selected from the dropdown list for the 'No Decision', within the Supplier/Material Assessment Record or Food Safety Plan, the Decision Tree will simply move the User to that question. However, if the end result is typed into the open text field for the 'No Decision', within the Supplier/Material Assessment Record or Food Safety Plan, the Decision Tree will end, and the User will not need to complete any further questions.

9. Monitor?: If a Result has been typed into the 'No Decision' field, e.g. CCP, oPRP, High Risk Supplier Controls Required, etc, the 'Monitor?' field must be completed. Click the empty field once for 'Yes' and a second time for 'No'. Selecting 'Yes' will result in the Monitoring Details workflow stage being opened within the Food Safety Plan, and the Controls workflow stage being opened within the Supplier/Material Assessments (If the Controls workflow stage has been enabled within the Template/Programme). Selecting 'No' will result in the Monitoring Details workflow stage being skipped in the Food Safety Plan, and the Controls workflow stage being skipped in the Supplier/Material Assessments. If 'Go to X' has been selected within the 'No Decision', the 'Monitor?' field is not applicable and the User will be unable to click the field.

10. Control Program: If the User has selected 'Yes' for the 'Monitor?' field for the 'No Decision', Control Programs that have been built within the Food Safety Plan module using the 'Add Model>Control Model' button can be selected and linked to the Result. If a Control Model is selected, once the Controls workflow stage has opened within the Supplier/Material Assessment, the Control Model associated with this Decision Tree outcome will populate automatically in the relevant fields.

11. X: Click the 'X' button to delete any unwanted lines. However, you can only delete the last question. The system will provide an error on screen if any other questions is attempted to be deleted.

12. Add Line: Click the 'Add Line' button to create more lines to detail more questions.

13. Save: Click the 'Save' button to save the Decision Tree.

14. Cancel: Click the 'Cancel' button if you wish to discard the details created and exit back to the Food Safety Plan module.

Image: Completed Model Details

Decision Tree Examples

Example 1: Decision Tree for Hazard Analysis and Critical Control Points (HACCP) Plan

Example 2: Decision Tree for Preventive Control (PC) Plan

Example 3: Decision Tree for Supplier Full Assessment

Example 4: Decision Tree for Material Full Assessment