# BOM Pre-Check !!! info "From SMT Template version 3.2.0 onwards" ## Overview The BOM Pre-Check feature compares the component data received from Fuji's `BOMLIST` event with the material BOM stored in MES. This ensures consistency and accuracy before production begins. ## How It Works ### Data Preparation Step The **BOMLIST** event is sent by Fuji when the PGCHANGEII event receives an acknowledge. The Automation Controller will parse this event and store a list of **Reference Designators** with the corresponding **Product** in persistent storage using a key composed of equipment details: `BOMLIST_{Equipment Line Name}_{Equipment Machine Name}_{Equipment Module Number}_{Equipment Lane Number}_{Equipment Program Name}`. ??? example "Placement List" ```JSON PlacementLists: '[ { "ReferenceDesignator": "C1", "ComponentNames": [ "SMT_Component_1" ] }, { "ReferenceDesignator": "C2", "ComponentNames": [ "SMT_Component_1" ] }, { "ReferenceDesignator": "C5", "ComponentNames": [ "SMT_Component_2" ] }, { "ReferenceDesignator": "C3", "ComponentNames": [ "SMT_Component_1" ] }, { "ReferenceDesignator": "C4", "ComponentNames": [ "SMT_Component_1" ] } ]' ``` ### Validation Step When a `PCBCHECKIN` event is received: - The stored `BOMLIST` data is retrieved. - It is sent as input to the service **`ValidatePlacementList`** for comparison against the current BOM material in MES. [For more information about ValidatePlacementList check here.](../../../artifacts/services.md#validateplacementlist) ### Persistency Handling After the first successful validation of the BOM, a key named **BomValidated_<Resource Name>** will be stored in persistency with the value true. This allows subsequent requests to bypass validation until a new recipe is downloaded to the equipment. If you need to trigger a new validation on the next board request event, you can send a message bus message to the Area configured for the OIB Controller. Use the action group `SMT.IoT.Utilities.ResetPreBomValidation` and include the `ResourceName` in the message body. ??? example "Show DEE Example" ```csharp UseReference("", "Cmf.Foundation.Common.Exceptions"); UseReference("Cmf.Foundation.BusinessObjects.dll", "Cmf.Foundation.BusinessObjects"); UseReference("Cmf.Foundation.BusinessOrchestration.dll", ""); UseReference("", "Cmf.Foundation.Common.Exceptions"); UseReference("", "Cmf.Foundation.Common"); UseReference("Cmf.Navigo.BusinessObjects.dll", "Cmf.Navigo.BusinessObjects"); var serviceProvider = (IServiceProvider)Input["ServiceProvider"]; IArea area = serviceProvider.GetService(); area.Name = "SMT_Production Line"; area.Load(); var instance = area.GetAutomationControllerInstance(); if (instance == null) { throw new Exception("Area not connected to any IoT instance"); } else { var args = new { ResourceName = "SMT_Pick_Place_1" }; instance.Publish("SMT.IoT.Utilities.ResetPreBomValidation", args.ToJsonString()); } ```