Laddawn.com : Stock Item Availability Options - Technical Specs

In the results area, for a stock item only, we need to determine an Availability Date for the main results area, and also provide detail of the shipping options once the user clicks on the availability date field.  Bundling Logic will evolve from here and will be added later.  Here are the availability options (AVAIL.TYPE):

1 = Ship Complete Today from primary warehouse

2 = Ship Complete Today from alternate warehouse

3 = Ship Complete in 72 hours (or next PO Receipt Date) from the primary warehouse

4 = Split Ship today from primary and alternate warehouse

5 = Ship Partial today from primary warehouse and backorder the remainder

Program Name: BP WEB.AVAILABILITY.OPTIONS (new program). 

This process will be called from multiple places:

  1. From the results area via WEBPRODUCTITEM.READ to get a single 'Availability Date'.  This will be the first possible date available when going through rules (the date that from the first multi-value of AVAIL.DATE).
  2. From the results area when user clicks on Availability Date to see detailed availability options. Call from web to RPC$ITEM_GETAVAILABILITY.  This option will return to the web a list of Avail Types, Avail Dates, Avail Whses, Avail Qtys

The WEBPRODUCTITEM.READ or RPC$ITEM_GETAVAILABILITY programs should only be calling this new program for stock items (manufactured, purchased, or transferred).

To determine Primary and Alternate Whs:

SYSTBL "WZIP" - this is the master record, which holds multi-valued starting range zip code prefixes (1st 3 char) in field 1.  Using SHOP.ZIPCODE, locate first 3 characters in the master record.  Next, read SYSTBL "WZIP*":starting prefix.  In this record, field 1 has the ending zip code prefix and field 2 has the list of 5 warehouses, comma delimited, in the order of closest warehouse first.  The primary warehouse is the first in the list and alternate is the second.  Note: Alternate warehouse options are not given when the Zip Code is identified as a Customer Pickup (CPU) **THIS HAS NOT BEEN DEFINED YET ON THE SHOP WIDGET – simply eliminate options associated with alternate warehouse (or set alternate whs = "")

Available Quantity Calc:

AVAIL.OH = ONHAND - (SHIPPING ALLOCATION + BACKORDERED):     INVWHS<1> - (INVWHS<2> + INVWHS<4>)   

Assigning Availability Date and Options for a Manufactured Stock Item:

ITMPLTMST<8> for the primary warehouse = "M" (manufactured in this warehouse).

Below are the options in the order that they s/b assigned:

  1. Ship Complete Today from Primary: If the full quantity (REQUESTED.QTY) is available in the primary warehouse:
    1. AVAIL.TYPE = 1
    2. AVAIL.DATE = Today
    3. AVAIL.WHS = primary whs
    4. AVAIL.QTY = REQUESTED.QTY
    5. Note: there are no other options.  Return just this single value.
  2. Ship Complete Today from Alternate: If the full quantity is available in the alternate warehouse:
    1. AVAIL.TYPE = 2
    2. AVAIL.DATE = Today
    3. AVAIL.WHS = alternate warehouse
    4. AVAIL.QTY = REQUESTED.QTY
    5. Possible alternatives include: (#3) ship complete from primary warehouse in 72 hours, (#4) split ship from primary and alternate warehouse today, (#5) ship partial and backorder the rest from primary warehouse.  If any of these options are possible, append to the end of the list. 
  3. Ship Complete in 72 Hours from Primary: If none of the above, then: 
    1. AVAIL.TYPE = 3
    2. AVAIL.DATE = TODAY + 3 BUSINESS DAYS (use SHIPPING calendar for non-working days)
    3. AVAIL.WHS = primary warehouse
    4. AVAIL.QTY = REQUESTED.QTY
    5. Possible alternatives include: (#4) split ship from order and alternate warehouse and (#5) ship partial and backorder the rest from the order warehouse.  If any of these options are possible, append to the end of the list.
  4. Split Ship Today between Primary and Alternate: If a partial quantity is available in the primary warehouse and the balance is available in the alternate warehouse, return both warehouses in a multi-valued format: 
    1. AVAIL.TYPE = 4  ]  4
    2. AVAIL.DATE = Today ] Today
    3. AVAIL.WHS = primary whs ] alternate whs
    4. AVAIL.QTY = primary whs's avail qty ] remaining balance
    5. Possible alternatives include: (#5) ship partial from the primary warehouse and backorder the rest.  If this options is possible, append to the end of the list. 
  5. Ship Today and Backorder from Primary:
    1. AVAIL.TYPE = 5  ]   5
    2. AVAIL.DATE = Today ] Today + 3 Business Days
    3. AVAIL.WHS = Primary ] Primary
    4. AVAIL.QTY = Primary whs's avail qty ] remaining balance 
    5. There are no other options

 

 

Assigning Availability Date and Options for a Purchased Stock Item:

ITMPLTMST<8> for the primary warehouse = "P" (purchased).

Below are the options in the order that they s/b assigned:

  1. Ship Complete Today from Primary: If the full quantity (REQUESTED.QTY) is available in the primary warehouse:
    1. AVAIL.TYPE = 1
    2. AVAIL.DATE = Today
    3. AVAIL.WHS = primary whs
    4. AVAIL.QTY = REQUESTED.QTY
    5. Note: there are no other options
  2. Ship Complete Today from Alternate: If the full quantity is available in the alternate warehouse:
    1. AVAIL.TYPE = 2
    2. AVAIL.DATE = Today
    3. AVAIL.WHS = alternate warehouse
    4. AVAIL.QTY = REQUESTED.QTY
    5. Possible alternatives include: (#3) split ship from primary and alternate warehouse today, (#5) ship partial and backorder the rest from the primary warehouse on the expected PO Receipt date (see Technical notes below),  (#4) ship complete from primary warehouse on the expected PO Receipt date (see Technical notes below).  If any of these option are possible, append to the end of the list.
  3. Split Ship Today between Primary and Alternate: If a partial quantity is available in the primary warehouse and the balance is available in the alternate warehouse, return both warehouses in a multi-valued format:
    1. AVAIL.TYPE = 4  ]  4
    2. AVAIL.DATE = Today ] Today
    3. AVAIL.WHS = primary whs ] alternate whs
    4. AVAIL.QTY = primary whs's avail qty ] remaining balance
    5. Possible alternatives include: (#5) ship partial from the primary warehouse and backorder the rest from the primary whs on the expected PO Receipt Date, (#4) ship complete from the primary warehouse on the expected PO receipt date. If either of these options is possible, append to the end of the list.
  4. Ship Complete on Expected PO Receipt Date from Primary:
    1. AVAIL.TYPE = 3
    2. AVAIL.DATE = Expected PO Receipt Date
    3. AVAIL.WHS = primary warehouse
    4. AVAIL.QTY = REQUESTED.QTY
    5. Possible alternatives include: (#5) ship partial from the primary warehouse and backorder the rest from the primary whs on the expected PO Receipt Date
  5. Ship Today and Backorder from Primary:
    1. AVAIL.TYPE = 5  ]   5
    2. AVAIL.DATE = Today ] Today + 3 Business Days
    3. AVAIL.WHS = Primary ] Primary
    4. AVAIL.QTY = Primary whs's avail qty ] remaining balance
    5. There are no other options

 

Assigning Availability Date and Options for a Transferred Stock Item:

  1. Ship Complete Today from Primary: If the full quantity (REQUESTED.QTY) is available in the primary warehouse:
    1. AVAIL.TYPE = 1
    2. AVAIL.DATE = Today
    3. AVAIL.WHS = primary whs
    4. AVAIL.QTY = REQUESTED.QTY
    5. Note: there are no other options
  2. Ship Complete Today from Alternate: If the full quantity is available in the alternate warehouse:
    1. AVAIL.TYPE = 2
    2. AVAIL.DATE = Today
    3. AVAIL.WHS = alternate warehouse
    4. AVAIL.QTY = REQUESTED.QTY
    5. Possible alternatives include: (#3) split ship from primary and alternate warehouse today, (#5) ship partial and backorder the rest from the 'transfer from' warehouse in 3 business days (maufactured item) or on the Expected PO Receipt Date (purchased item),  (#4) ship complete from the 'transfer from' warehouse on the Availability Date.  If any of these option are possible, append to the end of the list.
  3. Split Ship Today between Primary and Alternate: If a partial quantity is available in the primary warehouse and the balance is available in the alternate warehouse, return both warehouses in a multi-valued format:
    1. AVAIL.TYPE = 4  ]  4
    2. AVAIL.DATE = Today ] Today
    3. AVAIL.WHS = primary whs ] alternate whs
    4. AVAIL.QTY = primary whs's avail qty ] remaining balance
    5. Possible alternatives include: (#5) ship partial and backorder the rest from the 'transfer from' warehouse in 3 business days (maufactured item) or on the Expected PO Receipt Date (purchased item), (#4) ship complete on availability date from the 'transfer from' warehouse on 3 days (manufactured item) or PO Receipt Date (purchased item). If either of these options is possible, append to the end of the list.
  4. Ship Complete on Availability Date: If none of the above exists then set the date to 3 days (manufactured) or Expected PO Receipt Date (purchased)
    1. AVAIL.TYPE = 3
    2. AVAIL.DATE = 3 business days or Expected PO Receipt Date
    3. AVAIL.WHS = 'transfer from' warehouse
    4. AVAIL.QTY = REQUESTED.QTY
    5. Possible alternatives include: (#5) ship partial from the primary warehouse and backorder the rest from the primary whs on the expected PO Receipt Date
  5. Ship Today and Backorder from transfer whs:
    1. AVAIL.TYPE = 5  ]   5
    2. AVAIL.DATE = Today ] Today + 3 Business Days or po receipt date
    3. AVAIL.WHS = Transfer From ] Transfer From
    4. AVAIL.QTY = Transfer Whs's avail qty ] remaining balance
    5. There are no other options

 

NOTE: MOD Items (including marketplace) have their own availability date calculation program, so will never go through this logic.

 

Technical:

 

  1. To determine the expected PO Receipt date for a purchased item.   Using the Inventory Planning (for the pertinent warehouse/plant - ie, INVPLAN06) sum up all Sales Order demand for the item and then loop through all Purchase Order supply netting against demand to determine the date that a Purchase Order will be received that will satisfy the demand.  If there is not a PO on record that will satisfy the demand generate the date using the Purchase Lead Time from the ITMPLTMST file.   When you have arrived at an expected PO Receipt Date add 1 additional day for receiving time.
    1. ITMPLTMST<0> Plant*CPN
    2. ITMPLTMST<9> Purchase Lead Time
    3. INVPLANxx<0> CPN
    4. INVPLANxx<1,X> SALES DUE DATE (MV)
    5. INVPLANxx<2,X> SALES QTY DUE (MV)
    6. INVPLANxx<4,X> PURCHASE DUE DATE (MV)
    7. INVPLANxx<5,X> PURCHASE QTY DUE (MV)
    8. The Item Type Flag (MPT) and Transfer Warehouse can be found in the ITMPLTMST file as follows.
      1. ITMPLTMST<0> Plant*CPN
      2. ITMPLTMST<8> MFG/PUR/TRANSFER FLAG
      3. ITMPLTMST<12> TRANSFER FROM WAREHOUSE (aka SUPPLY WHS)