Bundle Options
Overview: There are always alternative bundling options, if nothing else “ship this at a later date” is always available.
Keep in mind we do not save anything to the database until the user clicks save and continue. This means that we need to pass along all the bundles every time we make a database call.
Process:
- Clicking View Alternatives on the Bundle does the following:
- Call Shipment.GetBundleOptions
- All the bundle parameters will be based on the bundles as they were at the beginning. The temporary bundles (explained later) will never be passed to the database.
- Return Data Type: NameValuePair
- Params
- COMPANY.ID
- CONTACT.NBR
- CART.NAME
- BUNDLE.INDEX
- The bundle number the user is clicking the link on.
- BUNDLE.OPTION (MUST BE “”)
- The option they selected. At this point it must be “”
- WHS.CD
- “:” delimited list of Warehouse codes for all the bundles.
- SHIP.DATE
- “:” delimited list of Ship dates for all the bundles.
- SHIP.VIA
- “:” delimited list of Ship VIAs for all the bundles
- SHIP.FOB
- “:” delimited list of all FOB codes for all bundles
- LTL.FLAG – Need to track this one down. Pass “” for now.
- PART.NBR
- List of part numbers in current bundles.
- “:” delimited for the bundles
- “^” delimited for the Items within each bundle.
- List of part numbers in current bundles.
- ITEM.QTY
- List of Quantities for the items in the bundles.
- “:” delimited for the bundles
- “^” delimited for the item number
- List of Quantities for the items in the bundles.
- PKGCOMM.NBR
- List of Comment Numbers (CommentID) for the comments selected for all the bundles.
- “:” delimited for the bundles
- “^” delimited for each Comment
- List of Comment Numbers (CommentID) for the comments selected for all the bundles.
- PKG.INPUT1
- List of Comment Input 1 for the comments selected for all the bundles.
- “:” delimited for the bundles
- “^” delimited for each Comment
- List of Comment Input 1 for the comments selected for all the bundles.
- PKG.INPUT2
- List of Comment Numbers (CommentID) for the comments selected for all the bundles.
- “:” delimited for the bundles
- “^” delimited for each Comment
- List of Comment Numbers (CommentID) for the comments selected for all the bundles.
- UPDATE.SHIP.PREF
- Returns Data Fields
- BUNDLE.ALT.OPTION
- BUNDLE.DESCRIPTION
- For each NameValuePair returned
- Display an option button on the result.
- Call Shipment.GetBundleOptions
- Paints the UI with a list of Option buttons.
- First radio button can be hard coded for “I’m good with this. Please ship on BundleDate.
- One radio button for each item add an option button to the UI.
- Last radio button will always be “I would like to select a later date for these items.”
- Clicking any of the DB generated radio buttons:
- Calls ShipmentService.SetBundleOption
- Returns: Shipment Collection, and Changed Bundle Indexes.
- Calls ShipmentService.SetBundleOption
- Store the returned collection in a collection of “temporary” shipments. We are going to keep them separate so if the user closes the popup without clicking OK nothing changes on the main screen.
- Keep the “temporary” collections of Shipments, and display the shipments represented by the Change Bundle Indexes.
- Clicking on the First (“I’m good with this”) button sets the temporary collection of shipments
- Clicking OK will:
- Replace the current bundle’s shipment collection to the popup’s temporary collection of shipments.
- Close the Popup
Plan of Attack:
- Setup - Map & Test ShipmentService.GetBundleOptions - 6 Hours
- Display Option buttons based on Return and call DB radio onclick - 3 Hours
- Setup - Map & Test ShipmentService.MakeBundleSelection - 6 Hours
- Preserve temporary full collection and display changed bundles under radio button - 5 Hours
- Program the OK button to replace the shipment collection on the main page and refresh - 5 hours.