Skip to main content

Knowledge Center

Nightly batch for optimization of assignments according to special rules

SAR Optimize according to special rules.

Abbreviations which are used:

  1. SSA (Goods reception which are used to store goods in stock)

  2. 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)

  3. 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)

  4. 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)

  5. COA (Sales order, which is a sales order that has been acknowledged by the selling company)

  6. SAR (Stock assignment register, which keeps the assignments between Stock/Supplier backlog/Production work orders and Production work order/Sales order)

  7. 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)

  8. PUR (The purchase application used for creating SPO)

  9. ART (The archive of products)

  10. S&D (Ship & Debit)

  11. SQU (Purchase quote)

  12. BREF (The base (derived from) for calculating landed cost in a COA)

  13. REQ (Requested Date)

  14. CONF (Confirmed Date)

  15. DELDATE (Delivery date. ('Scheduled shipping date' for a COA or 'Planned start date' for a PWO or a specific operation in PWO))

  16. FIFO (First In - First Out, a principle for selling out/using the oldest stock first)

SAR and assignments in general

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.

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.

Step 1 Recalculate DELDATE

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.

Step 2 Stock Assignment Window

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.

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.

Step 3 Optimize assignments

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.

Find products that should be optimized

The requirements for a product to be optimized are:

  1. 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.

For these products, the program will check whether there exists COA or PWO that are candidates for getting better assignments.

Find COAs and PWOs which are candidates for being optimized

The requirements for COAs and PWOs to be a candidate are:

  1. Must be active. This means that status must be >1 and >9

  2. Production is not started for a PWO (Means status must not be 5,7 or 8)

  3. Picking process is not started

  4. The SAR assignments are not blocked for re-assigning (locked links)

  5. SAR assignments are not defined as outside of the assignment window

  6. SAR is not set up with access only for a specific customer

  7. COA does not have a special structure

  8. COA is not linked to a non-S&D SQU in BREF. PWO is not linked to a non-S&D SQU in KITSQUID

  9. COA/PWO does not have existing assignments from anything else than ordinary purchase, productions, replacement from supplier or by-product from supplier.

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.

The candidates are sorted by DELDATE in ascending order to ensure that the ones that need goods first will get the best assignments.

After sorting on DELDATE, the priority sorting for optimization is as follows:

  1. COA/PWO which is 'Pending'

  2. COA/PWO with assignment from SPO, sorted descending by REQ in SPO

  3. COA/PWO with assignment from SOA/PWO with CONF=””, sorted descending by REQ in SOA/PWO

  4. 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

  5. COA/PWO with assignment from SSA

  6. 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

The program has now built a list of documents that should be optimized within one product

Re-assigning:

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’.

The preferred assignments for COA/PWO are in prioritized order:

  1. 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.

  2. 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.

  3. SSA with available quantity, sorted ascending by Date of the SSA

  4. SSA which have assignment to COA/PWO with a DELDATE which is later, sorted ascending by Date of the SSA

  5. 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

  6. 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.

  7. 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.

  8. 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.

  9. SPO with available quantity, sorted ascending by REQ. REQ in SPO must be earlier than REQ in the existing assignment to the COA/PWO

  10. 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.

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.

If the SSA/SPO/SOA/PWO that is found has enough available quantity, the COA/PWO will get new assignment from this.

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.

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:

  • SOA/PWO with CONF early enough to meet DELDATE of the COA/PWO which it has assignments to, sorted ascending by CONF

  • SSA, sorted ascending by Date

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.

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’.

This COA/PWO will now be handled during a later iteration of the re-assigning process described in step 3"-Re-assigning’.

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.

Step 4 Optimize Stock according to FIFO principle

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.

Find products that should be optimized

The first thing the FIFO step does is to find which products that are candidates for being re-assigned.

The requirements for a product to be re-assigned are:

  1. Product is to be found in SSA with available quantity

  2. Product is to be found in SSA which has assignment to PWO/COA

  3. Picking process has not yet started

  4. LinkLock is not set in SAR

  5. The stock is not of type special structure

  6. Stock is not reserved for a specific customer

  7. Stock is not returned to supplier for repair

  8. Delivery date is not outside of the Assignment Window

  9. The product is not excluded from autorelinking

Find Stock that should be optimized

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.

Re-Assigning

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.

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.

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.

Summary

PWO and COA which get new assignments in the FIFO step will still have assignments from stock, but might from a different SSA.