Posted - 05/01/2024 : 12:32:41
This has taken quite some time to get replies from UPS, but I think we may have tracked down the issue. This is Tristan writing to you from the UPS Third Level Technical Support. I understand you receiving incorrect rates from the UPS Rating API. Based on the information provided, to receive the same rate returned from UPS.com for your account number, the CustomerClassification container is required in the request with a value of 05 passed to the CustomerClassification Code parameter. Please see attached. Excerpt of the Example from UPS: <RatingServiceSelectionRequest xml:lang="en-US"> <Request> <TransactionReference> <CustomerContext>Rating and Service</CustomerContext> <XpciVersion>1.0001</XpciVersion> </TransactionReference> <RequestAction>Rate</RequestAction> <RequestOption>shop</RequestOption> </Request> <CustomerClassification> <Code>05</Code> </CustomerClassification> <PickupType> <Code>01</Code> </PickupType> I modified our inccart.asp to insert this line in the XML as such: sXML="<" & "?xml version=""1.0""?><AccessRequest xml:lang=""en-US"">" & addtag("AccessLicenseNumber",upsAccess) & addtag("UserId",upsUser) & addtag("Password",upsPw)&"</AccessRequest><" & "?xml version=""1.0""?>" & _ "<RatingServiceSelectionRequest xml:lang=""en-US""><Request><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference>" & _ "<RequestAction>Rate</RequestAction><RequestOption>" & IIfVr(shipType=11,"Rate","shop") & "</RequestOption></Request> <CustomerClassification><Code>05</Code></CustomerClassification>" This tweak DID correct the issue of the negotiated rate not bring returned. All that said, I reverted the code until I can get UPS to tell me what exactly I'm indicating on that XML query ("<CustomerClassification><Code>05</Code></CustomerClassification>") and to ask Vince if this make sense to him and that maybe this needs a bug update?
|