kylewest / DotNetShipping

UPS, FedEx, USPS shipping rate calculators for .NET
MIT License
78 stars 66 forks source link

UPS rating engine does not seem to return non-negotiated rates #57

Open pshaff opened 7 years ago

pshaff commented 7 years ago

I have tried to set the UseNegotiatedRates to false or true and the rates returned from UPS are not what I can get going directly to UPS. The prices seem to be consistently lower than expected.

kylewest commented 7 years ago

Can you provide a specific example? When I try it works as expected.

Kyle

pshaff commented 7 years ago

Before the first of the year I validated that this code worked and did return the proper results.

        var rateManager = new RateManager();

        UPSProvider ups = new UPSProvider(_upsLicenseNumber, _upsUserId, _upsPassword) {UseNegotiatedRates = false};

        // Add desired DotNetShippingProviders
        rateManager.AddProvider(ups);
        rateManager.AddProvider(new FedExProvider(_fedexKey, _fedexPassword, _fedexAccountNumber, _fedexMeterNumber));
        rateManager.AddProvider(new USPSProvider(_uspsUserId));

        // (Optional) Add RateAdjusters
        //rateManager.AddRateAdjuster(new PercentageRateAdjuster(.9M));

        // Call GetRates()
        Shipment shipment = rateManager.GetRates(origin, destination, packages);

When I check the rates returned from Fedex and the USPS, I can match the rates up discounted or not. For some reason, since the first of the year, the UPS rates are not returning as I would expect. Most, if not all of the rates are lower than expected. Please let me know if I am just not configuring the UPS rate provider to return our non-discounted rates.

Thanks,

Phil

From: Kyle West [mailto:notifications@github.com] Sent: Thursday, January 12, 2017 3:04 PM To: kylewest/DotNetShipping DotNetShipping@noreply.github.com Cc: Phil Shaff Phil.Shaff@frontiercoop.com; Author author@noreply.github.com Subject: Re: [kylewest/DotNetShipping] UPS rating engine does not seem to return non-negotiated rates (#57)

Can you provide a specific example? When I try it works as expected.

Kyle

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/kylewest/DotNetShipping/issues/57#issuecomment-272282766, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATktOBx26repToLnn9-WfsfmpYXEUgS_ks5rRpUmgaJpZM4Lhxiq.

pshaff commented 7 years ago

Kyle,

When I rate a single package with the weight between 1 and 40 pounds shipping to any domestic address. The UPS rating engine is only returning the rates that have been negotiated while the Fedex engine is returning both negotiated and standard rates. I need to be able to show the standard rates for our account for UPS.

Let me know what you are looking for if you need specific examples.

Thanks,

Phil

kylewest commented 7 years ago

Hey Phil,

Hard for me to test this because I don't have an account with negotiated rates. You're welcome to send me your credentials and I will do the testing but I'm guessing you don't want to do that and I wouldn't blame you.

If you're willing to clone this repo and make a couple changes I think we can figure it out though. I did some research and I think the issue is either with PickupType or CustomerClassification.

screenshot-2017-01-26-at-11-37-02

Are you setting your ShipperNumber somewhere? If so the request is using 00 "Rates Associated with Shipper Number". If not, try setting that to 04 (retail) or some of the other values and see if that works.

One last thing: this may be something with your account and you may want to talk to your UPS rep before beating your head against the wall just in case it is. From the docs... screenshot-2017-01-26-at-11-47-06

bgiromini commented 7 years ago

We started using your package and that documentation is what we used to determine the pricing differences. The price you get from UPS.com is the retail rate. Just FYI.