UPS Rates Incorrect

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
We've been running NopCommerce for years, but recently it started under-calculating the UPS rates.

When contacting UPS, they said they wanted to see the "complete XML request and response files associated with the rates. If using Web Services, include the SOAP envelope and the SOAP security header" Don't even know where to begin with that one.


nopCommerce version 3.70
UPS Gateway https://www.ups.com/ups.app/xml/Rate

Additional settings here:



Any suggestions?

Thanks!
Jason
6 years ago
Click the Tracing checkbox.  Do estimate shipping (or go through checkout to the point of getting methods/rates), and then check the system > log.

(Note:   Because log messages are not HTML formatted, they can be hard to read in the browser.  So, when viewing a System Log record, click View to see the log detail page.  Then, right click the page and "View Source".  Scroll down (a bit more than half way) until you see the plain text messages.)
6 years ago
Thanks for your help!  I've got the response below. See anything wrong there?

System.Exception:

Packing Type: PackByDimensions Package: LxHxW=9x6x3; Weight=4; Insured=0 USD. Request:

<?xml version='1.0'?><AccessRequest xml:lang='en-US'>
  <AccessLicenseNumber>XXXXX</AccessLicenseNumber>
  <UserId>XXXXX</UserId>
  <Password>XXXXX</Password>
</AccessRequest><?xml version='1.0'?><RatingServiceSelectionRequest xml:lang='en-US'>
  <Request>
    <TransactionReference>
      <CustomerContext>Bare Bones Rate Request</CustomerContext>
      <XpciVersion>1.0001</XpciVersion>
    </TransactionReference>
    <RequestAction>Rate</RequestAction>
    <RequestOption>Shop</RequestOption>
  </Request>
  <PickupType>
    <Code>06</Code>
  </PickupType>
  <CustomerClassification>
    <Code>04</Code>
  </CustomerClassification>
  <Shipment>
    <Shipper>
      <Address>
        <PostalCode>76107</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </Shipper>
    <ShipTo>
      <Address>
        <ResidentialAddressIndicator/>
        <PostalCode>75370</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipTo>
    <ShipFrom>
      <Address>
        <PostalCode>76107</PostalCode>
        <CountryCode>US</CountryCode>
      </Address>
    </ShipFrom>
    <Service>
      <Code>03</Code>
    </Service>
    <Package>
      <PackagingType>
        <Code>02</Code>
      </PackagingType>
      <Dimensions>
        <Length>9</Length>
        <Width>3</Width>
        <Height>6</Height>
      </Dimensions>
      <PackageWeight>
        <Weight>4</Weight>
      </PackageWeight>
    </Package>
  </Shipment>
</RatingServiceSelectionRequest> Response: <?xml version="1.0"?> <RatingServiceSelectionResponse>
  <Response>
    <TransactionReference>
      <CustomerContext>Bare Bones Rate Request</CustomerContext>
      <XpciVersion>1.0001</XpciVersion>
    </TransactionReference>
    <ResponseStatusCode>1</ResponseStatusCode>
    <ResponseStatusDescription>Success</ResponseStatusDescription>
  </Response>
  <RatedShipment>
    <Service>
      <Code>03</Code>
    </Service>
    <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
    <BillingWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>4.0</Weight>
    </BillingWeight>
    <TransportationCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>9.72</MonetaryValue>
    </TransportationCharges>
    <ServiceOptionsCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>0.00</MonetaryValue>
    </ServiceOptionsCharges>
    <TotalCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>9.72</MonetaryValue>
    </TotalCharges>
    <GuaranteedDaysToDelivery/>
    <ScheduledDeliveryTime/>
    <RatedPackage>
      <TransportationCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>9.72</MonetaryValue>
      </TransportationCharges>
      <ServiceOptionsCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>0.00</MonetaryValue>
      </ServiceOptionsCharges>
      <TotalCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>9.72</MonetaryValue>
      </TotalCharges>
      <Weight>4.0</Weight>
      <BillingWeight>
        <UnitOfMeasurement>
          <Code>LBS</Code>
        </UnitOfMeasurement>
        <Weight>4.0</Weight>
      </BillingWeight>
    </RatedPackage>
  </RatedShipment>
  <RatedShipment>
    <Service>
      <Code>12</Code>
    </Service>
    <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
    <BillingWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>4.0</Weight>
    </BillingWeight>
    <TransportationCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>18.36</MonetaryValue>
    </TransportationCharges>
    <ServiceOptionsCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>0.00</MonetaryValue>
    </ServiceOptionsCharges>
    <TotalCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>18.36</MonetaryValue>
    </TotalCharges>
    <GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery>
    <ScheduledDeliveryTime/>
    <RatedPackage>
      <TransportationCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>18.36</MonetaryValue>
      </TransportationCharges>
      <ServiceOptionsCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>0.00</MonetaryValue>
      </ServiceOptionsCharges>
      <TotalCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>18.36</MonetaryValue>
      </TotalCharges>
      <Weight>4.0</Weight>
      <BillingWeight>
        <UnitOfMeasurement>
          <Code>LBS</Code>
        </UnitOfMeasurement>
        <Weight>4.0</Weight>
      </BillingWeight>
    </RatedPackage>
  </RatedShipment>
  <RatedShipment>
    <Service>
      <Code>02</Code>
    </Service>
    <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
    <BillingWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>4.0</Weight>
    </BillingWeight>
    <TransportationCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>23.46</MonetaryValue>
    </TransportationCharges>
    <ServiceOptionsCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>0.00</MonetaryValue>
    </ServiceOptionsCharges>
    <TotalCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>23.46</MonetaryValue>
    </TotalCharges>
    <GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery>
    <ScheduledDeliveryTime/>
    <RatedPackage>
      <TransportationCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>23.46</MonetaryValue>
      </TransportationCharges>
      <ServiceOptionsCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>0.00</MonetaryValue>
      </ServiceOptionsCharges>
      <TotalCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>23.46</MonetaryValue>
      </TotalCharges>
      <Weight>4.0</Weight>
      <BillingWeight>
        <UnitOfMeasurement>
          <Code>LBS</Code>
        </UnitOfMeasurement>
        <Weight>4.0</Weight>
      </BillingWeight>
    </RatedPackage>
  </RatedShipment>
  <RatedShipment>
    <Service>
      <Code>13</Code>
    </Service>
    <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
    <BillingWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>4.0</Weight>
    </BillingWeight>
    <TransportationCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>37.73</MonetaryValue>
    </TransportationCharges>
    <ServiceOptionsCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>0.00</MonetaryValue>
    </ServiceOptionsCharges>
    <TotalCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>37.73</MonetaryValue>
    </TotalCharges>
    <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery>
    <ScheduledDeliveryTime/>
    <RatedPackage>
      <TransportationCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>37.73</MonetaryValue>
      </TransportationCharges>
      <ServiceOptionsCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>0.00</MonetaryValue>
      </ServiceOptionsCharges>
      <TotalCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>37.73</MonetaryValue>
      </TotalCharges>
      <Weight>4.0</Weight>
      <BillingWeight>
        <UnitOfMeasurement>
          <Code>LBS</Code>
        </UnitOfMeasurement>
        <Weight>4.0</Weight>
      </BillingWeight>
    </RatedPackage>
  </RatedShipment>
  <RatedShipment>
    <Service>
      <Code>14</Code>
    </Service>
    <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
    <BillingWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>4.0</Weight>
    </BillingWeight>
    <TransportationCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>72.35</MonetaryValue>
    </TransportationCharges>
    <ServiceOptionsCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>0.00</MonetaryValue>
    </ServiceOptionsCharges>
    <TotalCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>72.35</MonetaryValue>
    </TotalCharges>
    <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery>
    <ScheduledDeliveryTime>8:30 A.M.</ScheduledDeliveryTime>
    <RatedPackage>
      <TransportationCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>72.35</MonetaryValue>
      </TransportationCharges>
      <ServiceOptionsCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>0.00</MonetaryValue>
      </ServiceOptionsCharges>
      <TotalCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>72.35</MonetaryValue>
      </TotalCharges>
      <Weight>4.0</Weight>
      <BillingWeight>
        <UnitOfMeasurement>
          <Code>LBS</Code>
        </UnitOfMeasurement>
        <Weight>4.0</Weight>
      </BillingWeight>
    </RatedPackage>
  </RatedShipment>
  <RatedShipment>
    <Service>
      <Code>01</Code>
    </Service>
    <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
    <BillingWeight>
      <UnitOfMeasurement>
        <Code>LBS</Code>
      </UnitOfMeasurement>
      <Weight>4.0</Weight>
    </BillingWeight>
    <TransportationCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>40.93</MonetaryValue>
    </TransportationCharges>
    <ServiceOptionsCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>0.00</MonetaryValue>
    </ServiceOptionsCharges>
    <TotalCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>40.93</MonetaryValue>
    </TotalCharges>
    <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery>
    <ScheduledDeliveryTime>10:30 A.M.</ScheduledDeliveryTime>
    <RatedPackage>
      <TransportationCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>40.93</MonetaryValue>
      </TransportationCharges>
      <ServiceOptionsCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>0.00</MonetaryValue>
      </ServiceOptionsCharges>
      <TotalCharges>
        <CurrencyCode>USD</CurrencyCode>
        <MonetaryValue>40.93</MonetaryValue>
      </TotalCharges>
      <Weight>4.0</Weight>
      <BillingWeight>
        <UnitOfMeasurement>
          <Code>LBS</Code>
        </UnitOfMeasurement>
        <Weight>4.0</Weight>
      </BillingWeight>
    </RatedPackage>
  </RatedShipment>
6 years ago
Hi Jason,

Does the rates in response you get are same as calculated using Plugin?

Regards,
Krunal
6 years ago
jkergosi wrote:
...When contacting UPS, they said they wanted to see the "complete XML request and response files associated with the rates...


Find a service you offer and look at TotalCharges, to see if it matches what the customer sees - e.g.
  <RatedShipment>
    <Service>
      <Code>02</Code>
    </Service>
...
    <TotalCharges>
      <CurrencyCode>USD</CurrencyCode>
      <MonetaryValue>23.46</MonetaryValue>
    </TotalCharges>

These are the Service Codes

            {"UPS Next Day Air", "01"},
            {"UPS 2nd Day Air", "02"},
            {"UPS Ground", "03"},
            {"UPS Worldwide Express", "07"},
            {"UPS Worldwide Expedited", "08"},
            {"UPS Standard", "11"},
            {"UPS 3 Day Select", "12"},
            {"UPS Next Day Air Saver", "13"},
            {"UPS Next Day Air Early A.M.", "14"},
            {"UPS Worldwide Express Plus", "54"},
            {"UPS 2nd Day Air A.M.", "59"},
            {"UPS Saver", "65"},
            {"UPS Today Standard", "82"}, //82-86, for Polish Domestic Shipments
            {"UPS Today Dedicated Courier", "83"},
            {"UPS Today Express", "85"},
            {"UPS Today Express Saver", "86"},
            {"Saturday Delivery", "sa"},

If it does not match, then you may have some discount or similar being applied.  If it matches, and you still think it is not what is expected, then send the XML to UPS support
6 years ago
Thanks everyone again for helping. Here's the solution:

UPS read the XML output and said I needed to set the CustomerClassification Code and the PickupType Code to 01.

I needed to set two values in the UPS configuration (see image).

http://imgur.com/a/7sDmP
6 years ago
Interesting...   Your original post was "recently it started under-calculating the UPS rates."   Seems odd that "Wholesale" & "Daily Pickup" would make the rates go up.  What were those values before?

(In any case, why does UPS even need those params ...  you'd think they would know your customer type etc. from your acount number ;)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.