Click or drag to resize

PreShip

This topic describes the ShipExec Server PreShip Business Rule

A business rule hook that fires before the Ship event

Sample PreShip Business Rule
C#
public void PreShip(ShipmentRequest shipmentRequest, SerializableDictionary userParams)
{
    //Example of modifying a shipment before processing
    //this will check the shipment's residential indicator and reject any that are going to a residential destination

    if (shipmentRequest.PackageDefaults.Consignee.Residential == true)
        throw new Exception("No residential shipments allowed under this user profile");
}
See Also