[en] Nightly batch for optimization of assignments according to special rules
[en] SAR Optimize according to special rules.
[en] Abbreviations which are used:
[en] SSA (Goods reception which are used to store goods in stock)
[en] SOA (Purchase order response, which is a purchase order that has been confirmed and is a part of supplier backlog. This is to be understood as goods that are to be received into stock in the future)
[en] SPO (Purchase order, which is a part of supplier backlog. This is to be understood as goods that are to be received into stock in the future)
[en] PWO (Production work order, which is used for manufacturing products in-house. In this documentation PWO means each and one material in the kit structure of a PWO)
[en] COA (Sales order, which is a sales order that has been acknowledged by the selling company)
[en] SAR (Stock assignment register, which keeps the assignments between Stock/Supplier backlog/Production work orders and Production work order/Sales order)
[en] KITSTARTDATE (This is a calculated date for each material in the kit structure of a PWO. It is set equal to the date the OPR (Operation) it is linked to should start)
[en] PUR (The purchase application used for creating SPO)
[en] ART (The archive of products)
[en] S&D (Ship & Debit)
[en] SQU (Purchase quote)
[en] BREF (The base (derived from) for calculating landed cost in a COA)
[en] REQ (Requested Date)
[en] CONF (Confirmed Date)
[en] DELDATE (Delivery date. ('Scheduled shipping date' for a COA or 'Planned start date' for a PWO or a specific operation in PWO))
[en] FIFO (First In - First Out, a principle for selling out/using the oldest stock first)
[en] SAR and assignments in general
[en] The assignments between SSA/SOA/SPO/PWO and PWO/COA are stored in SAR. If there is not enough goods available in stock or backlog, the PWO and COA will be 'Pending' assignment. This will generate a purchase need that is visible in the PUR application or a need for manufacturing if it is a product with structure.
[en] The purpose of the SAR Optimize batch is assign goods to PWO and COA in an optimized order. The program will try to achieve that these get assignments from SSA, SPO, SOA and PWO which fulfill their DELDATE. The COAs and PWOs that are going to be delivered first will get the 'best' assignments etc.
[en] Step 1 Recalculate DELDATE
[en] As a pre-step for optimizing SAR, the program will check whether DELDATE in existing assignments to PWO are correct calculated. If they are not, they will by default be recalculated as KITSTARTDATE - x days. X is a number of days set up as a margin in the Company settings (CSV) application, CSV/’DeliveryAndRequestDateMarginDays’. If the company setting CSV/'ProductionPlanningBasedOnProductionLeadTime' is ON, 'Production start date' from PWO will be used instead of KITSTARTDATE.
[en] Step 2 Stock Assignment Window
[en] This step is optional, the setting Margin for SalesLeadTime Assignment Window, that can be found in the Company settings (CSV) application, must be given a value, and at least one of the settings Use Assignment Window for Sales Order (COA) or Use Assignment Window for Production Work Order (PWO) must be turned on. The Assignment Window is defined as Standard lead time for a product plus the margin set in the Margin for SalesLeadTime Assignment Window setting.
[en] The purpose of step two in the SAR Optimization Batch is to ensure that only COA/PWO with delivery date inside the Assignment Window will get assignments from stock and backog. COA/PWO with delivery date outside of the Assignment Window will be ‘Pending’ assignments, and these items are marked in Stock Assignment Register to prevent Step 3 of the SAR Optimize Batch to get assignments from stock/backlog.
[en] Step 3 Optimize assignments
[en] This step runs as default for PWO, COA is optional. If it should run for COA as well, the setting Sales Order (COA) included in the Assignment Register Optimize job in the Company settings (CSV) application must be turned on. This documentation assumes this setting is ON.
[en] Find products that should be optimized
[en] The requirements for a product to be optimized are:
[en] Class must have a value before 'V' in the alphabet but not 'KM'. In practice this means ordinary parts/material/kits and not service or cost products.
[en] For these products, the program will check whether there exists COA or PWO that are candidates for getting better assignments.
[en] Find COAs and PWOs which are candidates for being optimized
[en] The requirements for COAs and PWOs to be a candidate are:
[en] Must be active. This means that status must be >1 and >9
[en] Production is not started for a PWO (Means status must not be 5,7 or 8)
[en] Picking process is not started
[en] The SAR assignments are not blocked for re-assigning (locked links)
[en] SAR assignments are not defined as outside of the assignment window
[en] SAR is not set up with access only for a specific customer
[en] COA does not have a special structure
[en] COA is not linked to a non-S&D SQU in BREF. PWO is not linked to a non-S&D SQU in KITSQUID
[en] COA/PWO does not have existing assignments from anything else than ordinary purchase, productions, replacement from supplier or by-product from supplier.
[en] Based on these claims the program builds a list of all products found that are matching the criteria above. The job optimizes one and one product and loops through all candidates that possibly could get better assignments. When there are no more assignments to optimize for this product, the program starts with the next and continues with the same procedure until there are no more products left in the list.
[en] The candidates are sorted by DELDATE in ascending order to ensure that the ones that need goods first will get the best assignments.
[en] After sorting on DELDATE, the priority sorting for optimization is as follows:
[en] COA/PWO which is 'Pending'
[en] COA/PWO with assignment from SPO, sorted descending by REQ in SPO
[en] COA/PWO with assignment from SOA/PWO with CONF=””, sorted descending by REQ in SOA/PWO
[en] COA/PWO with assignments from SOA/PWO with a CONF where this CONF is too late according to DELDATE of COA/PWO, sorted descending by CONF in SOA/PWO
[en] COA/PWO with assignment from SSA
[en] COA/PWO with assignment from SOA/PWO with a CONF where this CONF is in time according to DELDATE of COA/PWO, sorted descending by CONF in SOA/PWO
[en] The program has now built a list of documents that should be optimized within one product
[en] Re-assigning:
[en] The next step is to try to re-assign to the ‘best assignment' for COAs and PWOs in the list ‘Find COAs and PWOs that are candidates for optimization.’ under ‘Step 3 Optimize links’.
[en] The preferred assignments for COA/PWO are in prioritized order:
[en] SOA/PWO with CONF and available quantity, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing assignment to the COA/PWO, and CONF in SOA/PWO must be early enough to meet DELDATE of COA/PWO.
[en] SOA/PWO with CONF and which has assignment to COA/PWO with a later DELDATE, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing assignment to the COA/PWO, and CONF in SOA/PWO must be early enough to meet the delivery date of COA/PWO.
[en] SSA with available quantity, sorted ascending by Date of the SSA
[en] SSA which have assignment to COA/PWO with a DELDATE which is later, sorted ascending by Date of the SSA
[en] SOA/PWO with CONF and available quantity, where CONF in SOA/PWO is too late to meet the delivery date of COA/PWO, sorted ascending by CONF. CONF in SOA/PWO must be earlier than CONF in the existing assignment to the COA/PWO
[en] SOA/PWO with CONF and which is assigned to COA/PWO with a later DELDATE, sorted ascending by CONF, where CONF in SOA/PWO is too late to meet the delivery date of COA/PWO. CONF in SOA/PWO must be earlier than CONF in the existing assignment for the COA/PWO.
[en] SOA/PWO without CONF, but with available quantity, sorted ascending by REQ. REQ in SOA/PWO document must be earlier than REQ in the existing assignment to the COA/PWO.
[en] SOA/PWO without CONF which are linked to COA/PWO with a later DELDATE, sorted ascending by REQ. REQ in SOA/PWO must be earlier than REQ in the existing assignment to the COA/PWO.
[en] SPO with available quantity, sorted ascending by REQ. REQ in SPO must be earlier than REQ in the existing assignment to the COA/PWO
[en] SPO which is assigned to COA/PWO with a later DELDATE, sorting ascending by REQ. REQ in SPO must be earlier than REQ in the existing assignment to the COA/PWO.
[en] The term ‘early enough to meet DELDATE of COA/PWO’ means that CONF in SOA/PWO + X days added from the setting StockAssignmentConfirmMargin gives a date before or equal to DELDATE of COA/PWO. The setting StockAssignmentStockWindow defines X number of days from todays date where assignments from SSA has the highest priority. If DELDATE is today’s date or earlier, stock will always have highest priority, even if the setting don’t have any value.
[en] If the SSA/SPO/SOA/PWO that is found has enough available quantity, the COA/PWO will get new assignment from this.
[en] If the SSA/SPO/SOA/PWO that is found does not have enough available quantity, the optimize program will first remove its existing assignments to COA/PWO to increase available quantity. Then the existing assignments to the COA/PWO will be removed and it will get new assignments.
[en] If the existing assignment is to a PWO with CONF and the setting IgnoreConfInWorkOrderAtOptimizationBySpecialRules is turned “OFF”, or a COA with CONF and the setting KeepConfInSalesOrderAtOptimizationBySpecialRules is turned "ON", the batch will only remove assignments if it can find enough available qty to fulfill the need of the PWO/COA in prioritized order:
[en] SOA/PWO with CONF early enough to meet DELDATE of the COA/PWO which it has assignments to, sorted ascending by CONF
[en] SSA, sorted ascending by Date
[en] In case DELDATE of the COA/PWO that will have its assignments removed is within the period where stock has highest priority, SSA will be prioritized before SOA.
[en] In case the settings implies that CONF in COA/PWO doesn't have to be fulfilled, the COA/PWO for which assignments from SSA/SOA/SPO/PWO were removed, will be ‘Pending’ and added to the list described in ‘Find COA's and PWOs that are candidates for optimization.’ ’ under ‘Step 3 Optimize assignments’.
[en] This COA/PWO will now be handled during a later iteration of the re-assigning process described in step 3"-Re-assigning’.
[en] If a product is set up with ‘Assign in multiple of’, the optimize batch will only get assignments to COA for quantity that is multiple with this. This rule does not apply for PWO.
[en] Step 4 Optimize Stock according to FIFO principle
[en] This step runs as default for PWO, COA is optional. If it should run for COA as well, the setting Sales Order (COA) included in the FIFO step for Optimize job in the Company settings (CSV) application must be turned ON. This documentation assumes this setting is on. The purpose of this step is to ensure that the oldest stock is consumed or shipped out first.
[en] Find products that should be optimized
[en] The first thing the FIFO step does is to find which products that are candidates for being re-assigned.
[en] The requirements for a product to be re-assigned are:
[en] Product is to be found in SSA with available quantity
[en] Product is to be found in SSA which has assignment to PWO/COA
[en] Picking process has not yet started
[en] LinkLock is not set in SAR
[en] The stock is not of type special structure
[en] Stock is not reserved for a specific customer
[en] Stock is not returned to supplier for repair
[en] Delivery date is not outside of the Assignment Window
[en] The product is not excluded from autorelinking
[en] Find Stock that should be optimized
[en] When all products that should be optimized in this step is found, the program works with one and one product at a time and build a list the SSAs that can be optimized. The SSAs are sorted descending by Date. Means that the oldest stock is handled first.
[en] Re-Assigning
[en] The PWO or COA with the earliest DELDATE should get assignments from the oldest goods first. The re-assigning starts with the first SSA in the list described in ‘Find stock that should be optimized.’ The program searches for PWO/COA that have assignments from other SSA with a newer Date.
[en] The PWO/COAs that are found are sorted ascending by DELDATE and are handled one by one. If any of them have an earlier DELDATE than the PWO/COA that do have existing assignments from the SSA that is handled, the assignments will be removed and thePWO/COA with an earlier DELDATE will get assignment from the SSA. The COA/PWO that ‘lost’ its assignments, will then be added to the list of COA/PWO that will be handled in the next iteration according to its DELDATE.
[en] If a product is set up with ‘Assign in multiple of’, the FIFO step will get assignments to COA for a quantity that is in multiple of this. This rule does not apply for PWO.
[en] Summary
[en] PWO and COA which get new assignments in the FIFO step will still have assignments from stock, but might from a different SSA.