...
Code Block | ||
---|---|---|
| ||
USE HarmonyStore DECLARE @TypeOrderIdDomestic uniqueidentifier = 'fe2ba03d-1c5e-4475-9280-cf89b282baf3' DECLARE @TypeOrderIdInternational uniqueidentifier = '60b8d5a0-b1fb-4817-ae38-c5b254c6b26f' SELECT TOP 1 * FROM dbo.OrdOrder WHERE Number = @trackingNumber AND TypeOrderID IN (@TypeOrderIdDomestic, @TypeOrderIdInternational) |
Per the Vendor, Here is the logic to categorize the 5 buckets at the top:
Use: "shipmentStatus" values that we look for and what step they are matched to:
Step 1: "Shipment Data Received", "Shipment Being Processed for Pickup"
Step 2: "At Pickup Terminal", "Temporary Origin Hold",
Step 3: "In Transit To Delivery Terminal", "In Transit", “In Transit- Confirmed out of Origin”
Step 4: "At Delivery Terminal", "At Delivery Terminal Delivery Appt Set", "Temporary Destination Hold", "Delivered To Warehouse", "Shipment is Out for Delivery", "On Hand DEST Delv Appt Set"
Step 5: "Shipment Delivered", "Picked Up From Customer", "Return Data Received", "Delivered"