UPS Rates

Hace 4 meses
Hi Team, just testing the new UPS rate provider in v4.7. Slight problem if trying to use negotiated rates when the shipper is based in a country that does not have an abbreviation for the StateProvinceFrom, like the UK where I am based. This causes the check on line 380 in the UPSService.CreateRateRequestAsync method to not use negotiated rates, as stateCodeFrom is always null

if (!string.IsNullOrEmpty(_upsSettings.AccountNumber) && !string.IsNullOrEmpty(stateCodeFrom) && !string.IsNullOrEmpty(stateCodeTo))


I suspect this is also a problem in the current version.

Also 'UPS Express Saver' is missing from the options in the configuration. This happens to be our cheapest service. I have tried to find the service code but failed. Anyone know where UPS publish a definitive list? Very frustrating...

Thanks

Julian
Hace 4 meses
Would you comment out that line and verify that it works OK and you get your negotiated rates?

Here's the enum for DeliveryService (condensed ;)
Are you looking for TodayExpressSaver?

public enum DeliveryService
{
    [UPSCode("01")]    NextDayAir,
    [UPSCode("02")]    _2ndDayAir,
    [UPSCode("03")]    Ground,
    [UPSCode("07")]    WorldwideExpress,
    [UPSCode("08")]    WorldwideExpedited,
    [UPSCode("11")]    Standard,
    [UPSCode("12")]    _3DaySelect,
    [UPSCode("13")]    NextDayAirSaver,
    [UPSCode("14")]    NextDayAirEarly,
    [UPSCode("54")]    WorldwideExpressPlus,
    [UPSCode("59")]    _2ndDayAirAm,
    [UPSCode("65")]    WorldwideSaver,
    [UPSCode("71")]    WorldwideExpressFreightMidday,
    [UPSCode("74")]    Express1200,
    [UPSCode("75")]    HeavyGoods,
    [UPSCode("82")]    TodayStandard,
    [UPSCode("83")]    TodayDedicatedCourrier,
    [UPSCode("85")]    TodayExpress,
    [UPSCode("86")]    TodayExpressSaver,
    [UPSCode("96")]    WorldwideExpressFreight
}
Hace 4 meses
Talysurf wrote:
... Anyone know where UPS publish a definitive list? Very frustrating...

Yes it is Very frustrating!
Here is the only page I found in UPS dev portal that even lists services.  Note, all the services I mentioned above may not even be available for "Shipments originating in" the UK.  You may want to check with UPS tech support.
https://developer.ups.com/api/reference/rating/appendix?loc=en_GB
Hace 4 meses
Hi,
Sorry I should have said, it is working now. I commented out just
 !string.IsNullOrEmpty(stateCodeFrom)
from the if statement, and I get my negotiated rates:)

Thanks for the link, that is helpful. Upon further investigation all returned rates are accounted for and do exist in the DeliveryService enum, so I think for the UK it's called something different, so like you suggest I will contact UPS and get clarification. For reference when I run a shipment through the UPS website, it's that that comes back with 'UPS Express Saver' as the cheapest.

Julian
Hace 2 meses
Talysurf wrote:

Sorry I should have said, it is working now. I commented out just
 !string.IsNullOrEmpty(stateCodeFrom)
from the if statement, and I get my negotiated rates:)



We've also added these changes in the plugin, thanks for the info.