close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UPS Integration

Thread began 8/06/2013 2:00 pm by peterm.bruce341471 | Last modified 8/08/2013 3:02 pm by Ray Borduin | 873 views | 14 replies |

peterm.bruce341471

UPS Integration

Jason, Ray, Anyone,

I've looked for a thread but can't find what I need. Trying to integrate UPS which should pull the client account prices for shipping live from UPS but it's not working. I've installed the access key and user details according to what's come from UPS. I've emailed them and this is the reply:

I have taken the liberty of having UPS send you your user ID profile information. Please note that the user ID created on 07/11/2013 was the user ID profile used to request the Access Key and should be receiving the negotiated rates. The user ID used within the request file when requesting Negotiated rates is case sensitive.

Negotiated Rates are only returned for qualified Shipper Account Numbers and eligibility is determined using the combination of User ID and the Shipper's Shipper Account Number in the XML request. If the User ID is qualified, both Published Rates and Negotiated Rates are returned. If the User ID or Shipper Account Number is not qualified for Negotiated Rates, only Published Rates are returned in the response.

The approved shipper number needs to be associated with the User ID used in the XML by adding it the Account Summary under Manage MyUPS at UPS.com.

To receive Negotiated Rates some XML additions are required that are slightly different from a basic request.

1. The approved User ID associated with the Negotiated Rates must be used in the AccessRequest container along with the Access Key and Password.

2. The approved shipper number must be included in the RatingServiceSelectionRequest/Shipment/Shipper/ShipperNumber container.

3. The empty node <NegotiatedRatesIndicator/> must be included in the RatingServiceSelectionRequest/Shipment/RateInformation container. The RateInformation container may need to be added as well.

4. The <StateProvinceCode> node is required in the RatingServiceSelectionRequest/Shipment/Shipper/Address container or RatingServiceSelectionRequest/Shipment/ShipFrom/Address container depending on the absence or presence of the ShipFrom container. If the <ShipFrom> container is present, the <StateProvinceCode> node is required there. In the absence of a <ShipFrom> container the <StateProvinceCode> node is required in the <Shipper> container. It is also required in the RatingServiceSelectionRequest/Shipment/ShipTo/Address container.

Please see the XML snippet below for examples of element placement. Note these are in addition to the already required tags for all Rates Tool requests:

<?xml version="1.0" encoding="UTF-8"?>
<AccessRequest>
<AccessLicenseNumber>XXXXXXXXXXXXXXXX</AccessLicenseNumber>
<UserId>XXX..XXX</UserId>
<Password>XXXX..XXXX</Password>
</AccessRequest>

<?xml version="1.0" encoding="UTF-8"?>
<RatingServiceSelectionRequest>
<Shipment>
<Shipper>
<ShipperNumber>XXXXXX</ShipperNumber>
<Address>
<StateProvinceCode>XX</StateProvinceCode> <!-- Required here if ShipFrom is not present -->
</Address>
</Shipper>
<ShipFrom>
<Address>
<StateProvinceCode>XX</StateProvinceCode> <!-- Required here if ShipFrom is present -->
</Address>
</ShipFrom>
<ShipTo>
<Address>
<StateProvinceCode>XX</StateProvinceCode> <!-- Required -->
</ShipTo>
<RateInformation>
<NegotiatedRatesIndicator/>
</RateInformation>
</Shipment>
</RatingServiceSelectionRequest>


5. Negotiated rates are returned in the NegotiatedRates node of the XML response and only at the shipment level. Published rates are still returned in the normal locations.

<NegotiatedRates>
<NetSummaryCharges>
<GrandTotal>
<MonetaryValue>16.08</MonetaryValue>
</GrandTotal>
</NetSummaryCharges>
</NegotiatedRates>
</RatedShipment>

6. Lastly, please note that the Customer Integration Environment (CIE) only returns a 1% discount regardless of your actual negotiated rates. You will need to move to production to see your actual rates.

Please contact us if you need any additional assistance.




Does anyone know what they are talking about? This is so far above my head I'm getting dizzy. All the details look right I can't see the problem!

Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

When it doesn't work do you get an error? Let's concentrate on your site and not what UPS sent you... you say it doesn't work... do you get any rate returned? no rate? an error?

General documentation from UPS won't help me debug the precise issue with your implementation. Please give specific information about what you see and I can look into it further. What address are you using? I'd want to use a similar address also for testing.

If you want help debugging I'd probably need FTP access. You can turn on debug mode from the admin panel and then visit the checkout_failure.php page after the failed shipping quote to see the full message returned from UPS, which will usually help shed some light on the exact problem.

Sign in to reply to this post

peterm.bruce341471

Ray,

Thanks, really kind of you to help. I'm sorry if I misled you, the UPS feature is working it is returning a rate but it's not the rates fixed for the account associated with the details we're using on the shipping section of the settings tab in the store, just a general rate which is very expensive. I did some tests, shipping from the store in England to Vienna Austria for 5Kg should be about £18 GBP but it comes in at £87.04 which is the basic rate, the discount associated with the account is 75% but this isn't coming up.

To be honest I thought this was a UPS problem but when I mailed them I got the reply I listed above.

I was sure I had the right details but it doesn't seem to be getting a live quote for the correct account. Does that clarify? Happy to organize FTP no problem if you need it.

Thanks Ray.

Sign in to reply to this post

Ray BorduinWebAssist

OK, put the site in "Debug Mode"... then go through the process and get the bad quote... then manually update the url to go to /checkout_failure.php.

View source on that page and it will give you the full communication with UPS and we can see if the correct values are in there or not.

When you view source, copy all of the text and update the private message area with all of the code you see there and I can see if I can give advice on how to correct the problem.

Sign in to reply to this post

peterm.bruce341471

Ray,

Okay I did that and the output is below. It does look like UPS is fetching an error but I can't be sure.

Thanks a lot.

Sign in to reply to this post

Ray BorduinWebAssist

View source before copying and pasting the error... it is in xml format, so you won't get all of the details copying and pasting from the web browser without right-clicking to View->Source first.

Sign in to reply to this post

peterm.bruce341471

Ray,

Just tried doing a domestic delivery so within the UK and various shipping options come up but the drop down box doesn't change the total value and when I checked the debug report it was the same as the one below despite being different values entered only the bottom of the report with the address fields was different. The shipping came back exactly the same.

The original report is below from source.

Sign in to reply to this post

Ray BorduinWebAssist

The important part of the result is the full request and full response from UPS.

I can see that it isn't returning any negotiated rates. It doesn't error, but it is returning the base rate charges.

You should be able to copy and paste the code from the private message below and ask UPS why it isn't returning your negotiated rate. Once it returns the negotiated rate we may still need to do a slight update so that it is used, but first thing is first in getting the value returned from UPS so that we can potentially use it.

Sign in to reply to this post

peterm.bruce341471

Ray,

Again thank you for the help, I can't tell you how much I appreciate it. I've heard back form UPS who have said some data needs adding to the code, I copied the details below and sent the file.

Sign in to reply to this post

Ray BorduinWebAssist

OK... I see the change they suggest.

I'll need to get FTP access to your server in order to make the necessary changes. Please provide ftp information in the private message area when replying to this thread and I'll go in and add the code they suggest.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...