Click or drag to resize

GetCommodityContents

This topic describes the ShipExec Server GetCommodityContents Rule

A business rule hook used to set the list of available commodity contents that are available on the commodities screen in the shipping client

Sample GetCommodityContents Rule
C#
public List<CommodityContent> GetCommodityContents(List<CommodityContent> definedCommodityContents)
{
    CommodityContent item1 = new CommodityContent
    {
        ProductCode = "RW100",
        OriginCountry = "US",
        Description = "Bright Red Widget",
        Quantity = 1,
        QuantityUnitMeasure = "PCS",
        UnitWeight = new Weight
        {
            Amount = 1.46,
            Units = "LB"
        },
        UnitValue = new Money
        {
            Amount = 1.34,
            Currency = "USD"
        },
        HarmonizedCode = "12345678",
    };
    return new List<CommodityContent> { item1 };
}
See Also