El2getfrService

El2getfrService.asmx

This web service provides methods for calculating freight amounts based on Elliott freight calculation logic. It allows  you to quote freight amounts to your customers on the website if the freight policy is not straightforward. It replaces the old web service EligetfrService, which is still available for backward compatibility.

GetFrtByOrder

By providing an order number, this method returns the order’s freight amount, ship-via code and description, total sales amount, and weight.

Usage:

GetFrtByOrderResult = A.GetFrtByOrder(UserName, UserPassword, int OrderNo, ExtraInput)

Parameters UserID, Password and ExtraInput are not used at this moment.

 

Input Parameter

Parameter

Length

Type

Detail

OrderNo

6

Prior to V8.5: Integer

V8.5 and above: String

Required. This is the order number to get freight amount.

 

GetFrtByOrderResult Structure

Property Name

Type

Detail

ReturnCode

Integer

Zero means OK; for other return codes, please see the “El2getfrService Return Code” section.

ReturnMsg

String

This is a description of the return code. For example, if return code is zero, you can expect “OK” in this field.

ShipViaDesc

String

The order’s ship via description.

FreightAmount

Double

The order’s freight amount.

TotalSaleAmount

Double

The order’s total sales amount.

Weight

String

The order’s total weight.

ShipViaNo

String

The order’s ship via code.

ExtraOutput

String

Not used for now.

 

Code Example (VB)

The following sample codes will get the freight amount for order number 123456.

Prior to V8.5: 

Dim Service As New webServicesgetfr.El2getfrService

Dim Result As New webServicesgetfr.GetFrtByOrderResult

Result = Service.GetFrtByOrder(“”,“”,123456,“”)

If Result.ReturnCode = 0 Then

  lblFreight.Text = Result.FreightAmount.ToString

Else

  lblFreight.Text = Result.ReturnMsg

  lblErrorFlag.Text = Result.ReturnCode.ToString

End If

V8.5 and Above:

Dim Service As New webServicesgetfr.El2getfrService

Dim Result As New webServicesgetfr.GetFrtByOrderResult

Result = Service.GetFrtByOrder(“”,“”,"123456",“”)

If Result.ReturnCode = 0 Then

  lblFreight.Text = Result.FreightAmount.ToString

Else

  lblFreight.Text = Result.ReturnMsg

  lblErrorFlag.Text = Result.ReturnCode.ToString

End If 

GetFrtByCusAndItem

By providing customer number and item number, return correspoding freight amount, ship-via code and description, total sales amount, and weight.

Usage:

GetFrtByCusAndItemResult = A.GetFrtByCusAndItem(UserName, UserPassword, CustomerNo, ItemNo, Quantity, TotalSaleAmount, ShipViaCode, ShipTo, City, State, ZipCode, Country, TermsCode, ExtraInput)

Parameters UserID, Password and ExtraInput are not used at this moment.

 

Input Parameters

Parameter

Length

Type

Upper

Detail

CustomerNo

6

String

Y

Required

ItemNo

15

String

Y

Required. System will look up the item weight based on ItemNo.

Quantity

9.3

Double

 

Zero will be converted to one automatically.

TotalSaleAmount

7.2

Double

 

Total sales amount. If freight is calculated based on sales amount, it is obvious that you need to pass this information correctly. If freight is caculated based on weight, this information is also important for calculating insurance amount. It is important to pass the TotalSaleAmount.

ShipViaCode

2

String

Y

Default to customer’s ship-via code.

ShipTo

2

String

Y

Default to customer’s ship-to.

City

15

String

Y

Default to customer’s city.

State

2

String

Y

Default to customer’s state.

ZipCode

10

String

Y

Default to customer’s zip code.

Country

20

String

Y

Default to customer’s country.

TermsCode

2

String

Y

Default to customer’s terms code. COD terms code may add additional charges to the freight amount.

 

GetFrtByCusAndItemResult Structure

Property Name

Type

Detail

ReturnCode

Integer

Zero means OK; for other return codes, please see “El2getfrService Return Code” section.

ReturnMsg

String

This is description of return code. For example, if return code is zero, you can expect “OK” in this field.

ShipViaDesc

String

 

FreightAmount

Double

 

TotalSaleAmount

Double

The value here will be the same as input TotalSaleAmount.

Weight

String

This is the item weight * quantity.

ShipViaNo

String

 

ExtraOutput

String

Not used for now.

 

Code Example (VB)

The following sample codes will get the freight amount for customer number “000001” and item number “049.”

 

Dim Service As New webServicesgetfr.El2getfrService

Dim Result As New webServicesgetfr.GetFrtByCusAndItemResult

Dim CustomerNo As String = “000001”

Dim ItemNo As String = “049”

Result = Service.GetFrtByCusAndItem(“”, “”, CustomerNo, ItemNo, 0, 0, “”, “”, “”, “”, “”, “”, “”, “”)

If Result.ReturnCode = 0 Then

  lblFreight.Text = Result.FreightAmount.ToString

Else

  lblFreight.Text = Result.ReturnMsg

  lblErrorFlag.Text = Result.ReturnCode.ToString

End If

 

GetFrtByCusAndWeightOrAmt

This method returns freight amount by providing customer number and total weight/total sales amount. The freight calculation can be by either weight or sales amount depending on the setup of ship-via code. If the ship-via’s freight calculation method is “A” (amount), you should provide TotalSaleAmount in input. Otherwise, you should provide TotalWeight in input. If you are not sure, you should provide both TotalWeight and TotalSaleAmount.

Usage:

GetFrtByCusAndWeightOrAmtResult = A.GetFrtByCusAndItem(UserName, UserPassword, CustomerNo, TotalWeight, TotalSaleAmount, ShipViaCode, ShipTo, City, State, ZipCode, Country, TermsCode, ExtraInput)

Parameters UserID, Password and ExtraInput are not used at this moment.

 

Input Parameters

Parameter

Length

Type

Upper

Detail

CustomerNo

6

String

Y

Required.

TotalWeight

7.2

Double

 

Required if ship-via’s freight calculation method is NOT “A” (amount).

TotalSaleAmount

7.2

Double

 

Required if ship-via’s freight calculation method is “A” (amount).

ShipViaCode

2

String

Y

Default to customer’s ship-via code.

ShipTo

2

String

Y

Default to customer’s ship-to.

City

15

String

Y

Default to customer’s city.

State

2

String

Y

Default to customer’s state.

ZipCode

10

String

Y

Default to customer’s zip code.

Country

20

String

Y

Default to customer’s country.

TermsCode

2

String

Y

Default to customer’s terms code.

 

GetFrtByCusAndWeightOrAmtResult Structure

Property Name

Type

Detail

ReturnCode

Integer

Zero means OK; for other return codes, please see “El2getfrService Return Code” section.

ReturnMsg

String

This is description of return code. For example, if return code is zero, you can expect “OK” in this field.

ShipViaDesc

String

 

FreightAmount

Double

 

TotalSaleAmount

Double

The value here will be the same as input TotalSaleAmount.

Weight

String

If input TotalWeight is not zero, this will be the same as input TotalWeight.

 

ShipViaNo

String

 

ExtraOutput

String

Not used for now.

 

Code Example (VB)

The following sample codes will return the freight amount that corresponds to customer “000001” with total weight equal to 30 and amount equal to 359.28.

 

Dim Service As New webServicesgetfr.El2getfrService

Dim Result As New webServicesgetfr.GetFrtByCusAndWeightOrAmtResult

Dim CustomerNo As String = “000001”

Dim TotalWeight As Double = 30

Dim TotalSaleAmount As Double = 359.28

Result = Service.GetFrtByCusAndItem(“”, “”, CustomerNo, TotalWeight, TotalSaleAmount, “”, “”, “”, “”, “”, “”, “”, “”)

If Result.ReturnCode = 0 Then

  lblFreight.Text = Result.FreightAmount

Else

   lblFreight.Text = Result.ReturnMsg

  lblErrorFlag.Text = Result.ReturnCode.ToString

End If

 

 

El2getfrService Return Code

 0 = OK

 1 = File Error

 2 = Data Missing (Customer No Missing)

 3 = Order Not On File

 4 = Data Missing (Both Item & Weight Missing)

 5 = Ship Via Not On File

 6 = Order Line Item Not On File

 7 = Customer Not On File

 8 = Ship To Not On File

 9 = Item Not On File

10 = No Carrier Exist In This Ship Via

11 = Carrier Code Not On File

12 = Carrier Mode Not On File

13 = Freight Zone Not On File

14 = Freight Rate Not On File

15 = No Service Available

CLS


 

Developer Documentations

  1. Received Code 9999 with Web Services Call
  2. Received Return Status Code 3 When Using Elilogin Login Method
  3. Elliott Web Service Requirements
  4. Elliott eStore Checklist
  5. LN API
  6. FN API
  7. RN API
  8. IN and DF API Change (V9.0)
  9. FA API Changes (V9.0)
  10. VA API Changes (V9.0)
  11. CartService
  12. EliarachService
  13. ElicshtxService
  14. EliattrbService
  15. ElisyscdService
  16. EliNoteService
  17. El2rstimService
  18. EliOrderService
  19. ItemInquiry
  20. EliitmiqService
  21. EliShiptoService
  22. El2getfrService
  23. Steps Required to Test ReportWriter in V8.2
  24. Installation of ElliottService, NETcellent’s Web Services for Elliott
  25. ResellerFinder
  26. EliaptrxService
  27. VendorInquiry
  28. EliloginService
  29. ElislsmnService
  30. EliserhsService
  31. EliatpobService
  32. ElievprcService
  33. ElihdtrxService
  34. ElicuswlService
  35. QueryTurnaround
  36. InvoiceInquiry
  37. ElicustmService
  38. EligetcdService
  39. OrderInquiry
  40. EliordiqService
  41. EliecontService
  42. EliautdpService
  43. El2CrCrdService
  44. Log-Timer / ElliottTimer.Ini Support
  45. Alpha Document Number Support (V8.5/V9.0)
  46. ElliottService System.TypeInitializationException
  47. Feature - Printing API to Dynamically Set Number of Copies
  48. The Values and Meanings of Distribution Types - ARDISFIL, APDISFIL, IMDISFIL, BMDISFIL
  49. DD API Changes (V9.0)
  50. PA API (V9.0)
  51. Validate License API
  52. AP API
  53. TP API: Temporary Path
  54. Data Structures for Report Desk Defaults and Enforcements
  55. COBOL to VB Interface Programs
  56. IN API: Option to Support Files and Folders Validation
  57. FF API: File Functions
  58. ID API
  59. LK: Links API
  60. FFLNearYou
  61. Report Desk Developing and Debugging
  62. Report Desk Groups
  63. Developing a New Elliott V8.5 Report Desk User Defined Report (UDR)
  64. Feature - Report Desk Report Footer Lines
  65. Report Desk Resolution of Pervasive.Data.SqlClient.dll

Feedback and Knowledge Base