@BrettLyder you could also use a Memory variable:
Give the variable a name ""memQtyShipped"" and set the value as you read the current S/O line or if the qty shipped changes
retVal = oSession.AsObject(oSession.ScriptObject).SetStorageVar(""memQtyShipped"",tmpQtyShipped)
Load the quantity shipped from the ""memQtyShipped"" variable during a SO_InvoiceTierDistribution event:
retVal = oSession.AsObject(oSession.ScriptObject).GetStorageVar(""memQtyShipped"",tmpQtyShipped)