EliitmiqService
EliitmiqService.asmx
In many ways, this web service is similar to ItemInquiry web service. The difference is that EliitmiqService mostly uses PSQL transaction engine (Btrieve) while ItemInquiry mostly uses a relational engine. A transaction engine is fast if you only need to retrieve a few records by index. On the other hand, to access Elliott data through a relational engine is not limited to index columns only so it is more flexible. Generally speaking, if you need to get item information that can be accomplished with Eliitmiqservice, you will likely find that it is faster than the ItemInquiry web services.
ReadItem
This method is used to read one or multiple items, and returns corresponding item master records, invoice item records, price codes, and links. Unlike SearchItem method in ItemInquiry web service which only returns customer’s price, this method also returns price code table in addition to the customer’s price.
There are two modes of this method: transaction engine mode and relational engine mode. By default, this method uses the transaction engine. This method will use relational engine if all the following conditions are met:
1. In your web service config file, the parameter “ReplaceEllitmiqWithSqlWhenPossible” is “Y”.
2. Input “DetailLevel” is “B”, “BR”, “M”, or “MR”.
3. Input ITEM_MFG_LOC and CustomerNo are both empty.
4. Input CheckLastInvoice, CheckPriceCode, CheckImageLink, CheckSpecLink, CheckHomepageLink are all empty or “N”.
General speaking, if you try to retrieve one or few items’ information for each ReadItem method call, then the transaction engine will be faster than the relational engine. If you try to retrieve lots of items, then it is possible the relational engine can be faster. You need to test the performance threshold yourself. If you are not sure, then keep it with transaction engine and don’t change the “ReplaceEllitmiqWithSqlWhenPossible flag.
If you have a standard pricing set up in
ITEM_PRICE field, then you can simply get this price in ItemRecord and display
on your website. If you give different price to different customer, then you
should pass the CustomerNo parameter and get the price information in
CustomerPriceRecord. If you provide multiple level price break based on
quantity, then you will have to calculate customer price based on PriceCodeRecord.
You will also need to consider on sales price and display the lower price.
Since the logic to calculate Price can be quite complicated, you are advised to
discuss with Netcellent if you need to calculate price yourself based on
PriceCodeRecord.
General speaking, if you have a separate
catalog database (like in SQL) to search and produced a list of matched items,
then you can pass this list to the ItemNoDataset to find out these items’
quantity, pricing information from the Elliott’s PSQL database.
Usage:
ReadItemResult = A.ReadItem(UserName, UserPassword, ItemNoDataset, StartingRecord, NumberOfRecord, DetailLevel, ITEM_MFG_LOC, CustomerNo, CheckLastInvoice, CheckPriceCode, CheckImageLink, CheckSpecLink, CheckHomepageLink)
Parameters UserID, Password and ExtraInput are not used at this moment.
Input Parameters
Parameter Name |
Type |
Detail |
ItemNoDataset |
DataSet |
Required. This dataset contains a DataTable which has all item numbers to read. There is no limit to the number of items you can pass in ItemNoDataset. |
StartingRecord |
Integer |
Starting record to extract from the ItemNoDataset. Unlike most .Net language standard that’s zero base indexing, this one uses one base indexing: for example if the value is 5, it will start will 5th record. If you pass 0, it will convert it to 1. You may use this if you choose to implement pagination on your web page. |
NumberOfRecord |
Integer |
Maximum number of record to extract from the data set. Default to 999999999 records. You may use this if you choose to implement pagination on your web page. |
DetailLevel |
String |
The value can be “M” (default), “MR”, “B”, “BR”, “E”, and “F”. Different detail level returns different fields to ItemRecord. See “ItemRecord Structure” for more detail. |
ITEM_MFG_LOC |
String |
Item manufacturing location. If you assign a value to this field, quantity information will be based on this location. If this field is not assigned or blank (default), quantity information will be based on item default location. |
CustomerNo |
String |
This customer number is used to get invoice and price. |
CheckLastInvoice |
String |
“Y”: Return invoice items to InvoiceItemRecord if input CustomerNo is not blank. “N” or blank (default): Do not return invoices to InvoiceItemRecord. |
CheckPriceCode |
String |
“Y”: Return price codes to PriceCodeRecord if input CustomerNo is not blank. “N” or blank (default): Do not return price codes to PriceCodeRecord. |
CheckImageLink |
String |
“F” or “Y”: Return file name only without the path to ImageLinkRecord.ImageLinkContent. You will handle the path in your own program (e.g. hard code). “I”: Return path + file name to ImageLinkRecord.ImageLinkContent. The path is from webservice config file “ImageLinkPath” parameter. If your image link type setup is based on mapped drive path and all images are in one central folder, and you do not wish to hard code the path in your program, then you should use this option. “P”: Return path + file name to ImageLinkRecord.ImageLinkContent. The path is getting from link type template. If your image link type setup is based on UNC path, then this is the proper choice. “N” or blank (default): Do not return anything to ImageLinkRecord.ImageLinkContent. |
CheckSpecLink |
String |
“Y”: Return spec links to SpecLinkRecord. “N” or blank: Do not return spec links to SpecLinkRecord. |
CheckHomepageLink |
String |
“Y”: Return the URL path of the URL link to HomepageLinkRecord. “N” or blank: Do not return homepage link to HomepageLinkRecord. |
ReadItemResult Structure
The values in link records SpecLinkRecord, HomepageLinkRecord, and FImageLinkRecord are “Resolved Link”, which contains the link type’s template. For example, if the SPEC link’s variable value is “ABC.PDF”, and the template for SPEC link type is “\\server\share\folder\@@VAR1@@”, you will get “\\server\share\folder\ABC.PDF” in link content.
The values in ImageLinkRecord are based on the value of input parameter “CheckImageLink”, as stated in the previous section.
Property Name |
Type |
Detail |
ReturnCode |
Integer |
Contains return code. Zero means OK; for other return codes, please see “EliitmiqService Return Code” section. |
NumberOfRecord |
Integer |
Number of items in ItemRecord array. |
ItemRecord() |
ItemRecord |
An array of item record. See “ItemRecord Structure” for more detail. |
InvoiceItemRecord() |
InvoiceItemRecord |
See “InvoiceItemRecord Structure” for more detail. |
PriceCodeRecord() |
PriceCodeRecord |
See “PriceCodeRecord Structure” for more detail. |
CustomerPriceRecord() |
CustomerPriceRecord |
An array of CustomerPriceRecord structure, which contains the following parameters: CustomerPrice (Double) OnSaleFlag (String) DiscountPercent (Double) |
ImageLinkRecord() |
ImageLinkRecord |
An array of ImageLinkRecord, which contains one property: ImageLinkContent (String) |
SpecLinkRecord() |
SpecLinkRecord |
An array of SpecLinkRecord, which contains one property: SpecLinkContent (String) |
HomepageLinkRecord() |
HomepageLinkRecord |
An array of HomepageLinkRecord, which contains one property: HomepageLinkContent (String) which is the URL value of Elliott’s default link type “URL”. |
String |
When this method used transitional engine, this field will be empty. When this method uses relational engine, this field will display call duration for performance optimization purpose. For example, "Call Duration: 400ms". |
|
ReturnMsg |
String |
This is description of return code. For example, if return code is zero, you can expect “OK” in this field. |
ItemRecord Structure
This structure is the same as “ItemRecord Structure” in GetOneItemDetail method of ItemInquiry web service. Depending on the value of input “detailLevel”, it is possible that only some of the fields in the structure are used.
Unlike SearchItem method in ItemInquiry web services which
returns a dataset, EliitmiqService implements ItemRecord as a fixed structure.
Therefore, when you choose the detail level “F” (Full) or “M” (minimum), it
will not result in significant saving on transmitted data size due to the
nature of XML format.
When input detailLevel = “F” (full,) all fields are used.
When detailLevel = “M” (minimum,) only the following fields are
used:
· ErrorStatus
· ITEM_NO
· ITEM_MFG_LOC
· ITEM_QTY_ON_HAND
· ITEM_QTY_ALLOC
· ITEM_PRICE_UOM
· ITEM_PRICE_RATIO
When detailLevel = “MR” (Minimum + Routing No.,) the
following fields are used:
· ErrorStatus
· ITEM_NO
· ITEM_MFG_LOC
· ITEM_QTY_ON_HAND
· ITEM_QTY_ALLOC
· ITEM_PRICE_UOM
· ITEM_PRICE_RATIO
· ITEM_ROUTING_NO
When detailLevel = “B” (Brief,) the following fields are used:
· ErrorStatus
· ITEM_NO
· ITEM_DESC1
· ITEM_DESC2
· ITEM_PROD_CAT
· ITEM_USER_DEF_CD
· ITEM_MFG_LOC
· ITEM_QTY_ON_HAND
· ITEM_QTY_ALLOC
· ITEM_PRICE
· ITEM_PRICE_UOM
· ITEM_PRICE_RATIO
· ITEM_WEIGHT
· ITEM_UOM
· ITEM_PICK_SEQ
· ITEM_START_SALE_DATE
· ITEM_END_SALE_DATE
· ITEM_SALE_PRICE
· ITEM_SUBSTITUTE
· ITEM_ACTIVITY_CD
· ITEM_SERIAL_LOT_FG
· ITEM_QTY_ON_ORDER
· ITEM_NOTE_1
· ITEM_NOTE_2
· ITEM_NOTE_3
· ITEM_NOTE_4
· ITEM_NOTE_5
· ITEM_USER_DATE
· ITEM_USER_AMOUNT
· ITEM_VOLUME
When detailLevel = “BR” (Brief + Routing No.,) the following
fields are used:
· ErrorStatus
· ITEM_NO
· ITEM_DESC1
· ITEM_DESC2
· ITEM_PROD_CAT
· ITEM_USER_DEF_CD
· ITEM_MFG_LOC
· ITEM_QTY_ON_HAND
· ITEM_QTY_ALLOC
· ITEM_PRICE
· ITEM_PRICE_UOM
· ITEM_PRICE_RATIO
· ITEM_WEIGHT
· ITEM_UOM
· ITEM_PICK_SEQ
· ITEM_START_SALE_DATE
· ITEM_END_SALE_DATE
· ITEM_SALE_PRICE
· ITEM_SUBSTITUTE
· ITEM_ACTIVITY_CD
· ITEM_ROUTING_NO
· ITEM_SERIAL_LOT_FG
· ITEM_QTY_ON_ORDER
· ITEM_NOTE_1
· ITEM_NOTE_2
· ITEM_NOTE_3
· ITEM_NOTE_4
· ITEM_NOTE_5
· ITEM_USER_DATE
· ITEM_USER_AMOUNT
· ITEM_VOLUME
When detailLevel = “E” (Extended,) the following fields are
used:
· ErrorStatus
· ITEM_NO
· ITEM_DESC1
· ITEM_DESC2
· ITEM_PROD_CAT
· ITEM_USER_DEF_CD
· ITEM_MFG_LOC
· ITEM_QTY_ON_HAND
· ITEM_QTY_ALLOC
· ITEM_QTY_BO
· ITEM_AVG_COST
· ITEM_PRICE
· ITEM_PRICE_UOM
· ITEM_PRICE_RATIO
· ITEM_WEIGHT
· ITEM_UOM
· ITEM_PICK_SEQ
· ITEM_BO_FG
· ITEM_TXBL_FG
· ITEM_START_SALE_DATE
· ITEM_END_SALE_DATE
· ITEM_SALE_PRICE
· ITEM_USAGE_PTD
· ITEM_USAGE_YTD
· ITEM_SALES_PTD
· ITEM_SALES_YTD
· ITEM_COST_PTD
· ITEM_COST_YTD
· ITEM_LEAD_TIME
· ITEM_MAT_TYPE
· ITEM_SUBSTITUTE
· ITEM_LAST_COST
· ITEM_STD_COST
· ITEM_PRIME_VEND_NO
· ITEM_ORDER_MINIMUM
· ITEM_ORDER_MULTIPLE
· ITEM_PUR_UOM
· ITEM_DATE_LAST_SOLD
· ITEM_QTY_LAST_SOLD
· ITEM_ACTIVITY_CD
· ITEM_STOCKED_FG
· ITEM_CONTROLLED_FG
· ITEM_PUR_OR_MFG_CD
· ITEM_INV_CLASS
· ITEM_CYCLE_CNT_CD
· ITEM_DATE_LAST_CNTD
· ITEM_COMMODITY_CD
· ITEM_BUYER_ANALYST
· ITEM_COMM_PCT_OR_AMT
· ITEM_CALC_COMM_TYPE
· ITEM_SERIAL_LOT_FG
· ITEM_SER_WAR_DAYS
· ITEM_PUR_INV_RATIO
· ITEM_QTY_ON_ORDER
· ITEM_NOTE_1
· ITEM_NOTE_2
· ITEM_NOTE_3
· ITEM_NOTE_4
· ITEM_NOTE_5
· ITEM_USER_DATE
· ITEM_USER_AMOUNT
· ITEM_VOLUME
· ITEM_AVG_COST_2
· ITEM_STD_COST_2
· ITEM_LAST_COST_2
· ITEM_USER_LAST_ACCES
· ITEM_DATE_LAST_ACCES
· ITEM_STYLE_CODE
InvoiceItemRecord Structure
Property |
Type |
Detail |
INV_ITM_INV_NO |
Prior to V8.5: Integer V8.5 and Above: String |
|
INV_ITM_SEQ_NO |
Integer |
|
INV_ITM_ITM_NO |
String |
|
INV_ITM_INV_DATE |
Date |
|
INV_ITM_CUST_NO |
String |
|
INV_ITM_DESC_1 |
String |
|
INV_ITM_DESC_2 |
String |
|
INV_ITM_SER_LOT_NO |
String |
|
INV_ITM_SER_EFF_DATE |
Date |
|
INV_ITM_S_L_EXP_DT |
Date |
|
INV_ITM_S_L_EXP_CNTY |
Integer |
|
INV_ITM_S_L_EXP_YEAR |
Integer |
|
INV_ITM_S_L_EXP_MON |
Integer |
|
INV_ITM_S_L_EXP_DAY |
Integer |
|
INV_ITM_QTY_ORDER |
Double |
|
INV_ITM_QTY_TO_SHIP |
Double |
|
INV_ITM_UNIT_PRICE |
Double |
|
INV_ITM_DISCOUNT_PCT |
Double |
|
INV_ITM_REQUEST_DATE |
Date |
|
INV_ITM_QTY_BACK_ORD |
Double |
|
INV_ITM_QTY_RT_TO_ST |
Double |
|
INV_ITM_BACK_FLAG |
String |
|
INV_ITM_UOM |
String |
|
INV_ITM_UNIT_COST |
Double |
|
INV_ITM_UNIT_WEIGHT |
Double |
|
INV_ITM_COMM_CALA_TP |
String |
|
INV_ITM_COMM_P_O_AMT |
Double |
|
INV_ITM_PROMISE_DATE |
Date |
|
INV_ITM_TAXABLE_FLAG |
String |
|
INV_ITM_STOCKED_FLAG |
String |
|
INV_ITM_CONTROL_FLAG |
String |
|
INV_ITM_SELECT_CODE |
String |
|
INV_ITM_TOT_QTY_ORD |
Double |
|
INV_ITM_TOT_QTY_SHP |
Double |
|
INV_ITM_TAX_FLAG_1 |
String |
|
INV_ITM_TAX_FLAG_2 |
String |
|
INV_ITM_TAX_FLAG_3 |
String |
|
INV_ITM_PRICE_ORG |
Double |
|
INV_ITM_CPY_TO_BM_FG |
String |
|
INV_ITM_EXPLODE_KIT |
String |
|
INV_ITM_BM_ORDER_NO |
Prior to V8.5: Integer V8.5 and Above: String |
|
INV_ITM_MULT_FTR_FLG |
String |
|
INV_ITM_PRICE_FLAG |
String |
|
INV_ITM_NO_PACKAGE |
Integer |
|
INV_ITM_PO_XRF_SEQNO |
Integer |
|
INV_ITM_PROD_CATE |
String |
|
INV_ITM_REASON_CODE |
String |
|
INV_ITM_PRC_LVL_NO |
Integer |
|
INV_ITM_ORG_BK_ORDNO |
Prior to V8.5: Integer V8.5 and Above: String |
|
INV_ITM_ORG_BK_SEQNO |
Integer |
|
INV_ITM_STY_TMP_FLAG |
String |
|
INV_ITM_VENDOR_NO |
String |
|
FILLER_001 |
String |
|
PriceCodeRecord Structure
Property |
Type |
Detail |
PriceCodeFound |
String |
|
PRICE_CD_TYPE |
String |
|
PRICE_CD_PRICE_BASIS |
String |
|
PRICE_CD_MIN_QTY_1 |
Double |
|
PRICE_CD_PRCDSC_1 |
Double |
|
PRICE_CD_MIN_QTY_2 |
Double |
|
PRICE_CD_PRCDSC_2 |
Double |
|
PRICE_CD_MIN_QTY_3 |
Double |
|
PRICE_CD_PRCDSC_3 |
Double |
|
PRICE_CD_MIN_QTY_4 |
Double |
|
PRICE_CD_PRCDSC_4 |
Double |
|
PRICE_CD_MIN_QTY_5 |
Double |
|
PRICE_CD_PRCDSC_5 |
Double |
|
PRICE_CD_MIN_QTY_6 |
Double |
|
PRICE_CD_PRCDSC_6 |
Double |
|
PRICE_CD_MIN_QTY_7 |
Double |
|
PRICE_CD_PRCDSC_7 |
Double |
|
PRICE_CD_MIN_QTY_8 |
Double |
|
PRICE_CD_PRCDSC_8 |
Double |
|
PRICE_CD_MIN_QTY_9 |
Double |
|
PRICE_CD_PRCDSC_9 |
Double |
|
PRCE_CD_MIN_QTY_10 |
Double |
|
PRCE_CD_PRCDSC_10 |
Double |
|
PRCE_CD_EXCL_CUS_DESC |
String |
|
FILLER |
String |
|
Code Example (VB)
The following sample code will read item “ITEM001” and “ITEM002” from location “01” and return the “F” (Full) detail that includes past invoice history of this customer, pricing based on customer number “CUS01”, images, spec and item links. But the price code table will not be returned. Price code table is not necessary unless you offer pricing based on quantity break.
Dim wsItemInfo As New webServicesgetitmiq.EliitmiqService
Dim Result As New webServicesgetitmiq.ReadItemResult
Dim ItemNoDataset As DataSet = New DataSet("ItemNoDataSet")
Dim ItemNoDataTable As DataTable = New DataTable("ItemNos")
ItemNoDataTable.Columns.Add("ItemNo")
ItemNoDataTable.Rows.Add("ITEM001")
ItemNoDataTable.Rows.Add("ITEM002")
ItemNoDataset.Tables.Add(ItemNoDataTable)
Result = wsItemInfo.ReadItem("", "", ItemNoDataset, 1, 2, "F", "01", "CUS01", "Y", "N", "I", "Y", "Y")
If Result.ReturnCode = 0 Then
If Result.ItemRecord(0).ErrorStatus = "00" Then
lblResult.Text = Result.ItemRecord(0).ITEM_NO
Else
lblResult.Text = "Item Not Found"
End If
Else
lblResult.Text = "Error Getting Items (Error Code " & _
Result.ReturnCode.ToString & ")"
End If
ReadOneItem
This method is used to read one item, and returns corresponding item master record, invoice item record, price code, and links.
The difference between ReadOneItem and ReadItem is that ReadOneItem can only read one item at a time, while ReadItem can read multiple items. ReadItem method is a superset of ReadOneItem. Therefore, you can just use ReadItem method without needing to use ReadOneItem method.
There are two modes of this method: transaction
engine mode and relational engine mode. By default, this method uses
transaction engine. This method will use relational engine if all the following
conditions are met:
1. In your web service config file, the parameter “ReplaceEllitmiqWithSqlWhenPossible” is “Y”.
2. Input ITEM_MFG_LOC and CustomerNo are both empty.
3. Input CheckLastInvoice and CheckPriceCode are both empty or “N”.
We don’t believe there’s an advantage using this method with relational engine.
Usage:
ReadOneItemResult = A.ReadOneItem(UserName, UserPassword, ITEM_NO, DetailLevel, ITEM_MFG_LOC, CustomerNo, CheckLastInvoice, CheckPriceCode, CheckImageLink, CheckSpecLink, CheckHomepageLink)
Parameters UserID, Password and ExtraInput are not used at this moment.
Input Parameter
Parameter Name |
Type |
Detail |
ITEM_NO |
String |
Required. |
DetailLevel |
String |
See “Input Parameter” section in ReadItem method. |
ITEM_MFG_LOC |
String |
See “Input Parameter” section in ReadItem method. |
CustomerNo |
String |
See “Input Parameter” section in ReadItem method. |
CheckLastInvoice |
String |
See “Input Parameter” section in ReadItem method. |
CheckPriceCode |
String |
See “Input Parameter” section in ReadItem method. |
CheckImageLink |
String |
See “Input Parameter” section in ReadItem method. |
CheckSpecLink |
String |
See “Input Parameter” section in ReadItem method. |
CheckHomepageLink |
String |
See “Input Parameter” section in ReadItem method. |
ReadOneItemResult Structure
The values in link records SpecLinkRecord and HomepageLinkRecord are “Resolved Link”, which contains the link type’s template. For example, if the SPEC link’s variable value is “ABC.PDF”, and the template for SPEC link type is “\\server\share\folder\@@VAR1@@”, you will get “\\server\share\folder\ABC.PDF” in link content.
The values in ImageLinkRecord are based on the value of input parameter “CheckImageLink”, as stated in the previous section.
Property Name |
Type |
Detail |
ReturnCode |
Integer |
Contains return code. Zero means OK; for other return codes, please see “EliitmiqService Return Code” section. |
ItemRecord |
ItemRecord |
See “ItemRecord Structure” in ReadItem method. |
InvoiceItemRecord |
InvoiceItemRecord |
See “InvoiceItemRecord Structure” in ReadItem method. |
PriceCodeRecord |
PriceCodeRecord |
See “PriceCodeRecord Structure” in ReadItem method. |
CustomerPriceRecord |
CustomerPriceRecord |
See “CustomerPriceRecord Structure” in ReadItem method. |
ImageLinkRecord |
ImageLinkRecord |
Contains one property: ImageLinkContent (String) |
SpecLinkRecord |
SpecLinkRecord |
Contains one property: SpecLinkContent (String) |
HomepageLinkRecord |
HomepageLinkRecord |
Contains one property: HomepageLinkContent (String) |
ResponseText |
String |
When this method used transitional engine, this field will be empty. When this method uses relational engine, this field will display call duration for performance optimization purpose. For example, "Call Duration: 400ms". |
ReturnMsg |
String |
This is description of return code. For example, if return code is zero, you can expect “OK” in this field. |
Code Example (VB)
The following sample code will read item number “ITEM001”, customer “CUS01”, location “01”, and returns item master record, invoice item record, customer price, price code, and links.
Dim wsItemInfo As New webServicesgetitmiq.EliitmiqService
Dim Result As New webServicesgetitmiq.ReadOneItemResult
Result = wsItemInfo.ReadOneItem("", "", “ITEM001”, “F”, “01”, “CUS01”, “Y”, “Y”, “I”, “Y”, “Y”)
If Result.ReturnCode = 0
If Result.ItemRecord.ErrorStatus = "00" Then
lblResult.Text = Result.ItemRecord.ITEM_NO
Else
lblResult.Text = "Error Code for Item is:" & _
Result.ItemRecord.ErrorStatus
End If
Else
lblResult.Text = "Error Getting Item (Error Code " & _
Result.ReturnCode.ToString & ")"
End If
This method is used to read one item, and returns corresponding item master record, invoice item record, price code, and links. In this method, each location of the item will be returned to an element of ItemRecord() array.
This method is similar to “ReadOneItem”
method except that “ReadOneItem” method only returns one location for the item.
The main intention of this method is to retrieve multiple location’s quantity
for an item with a single method call. In addition, this method does not
support relational engine mode.
Usage:
Output = A.ReadItemAllLocation(UserName, UserPassword, ItemNo, DetailLevel, CustomerNo, CheckLastInvoice, CheckPriceCode, CheckImageLink, CheckSpecLink, CheckHomepageLink)
Parameters UserID, Password are not used at this moment.
Input Parameter
Parameter Name |
Type |
Detail |
ITEM_NO |
String |
Required. |
DetailLevel |
String |
See “Input Parameter” section in ReadItem method. |
CustomerNo |
String |
See “Input Parameter” section in ReadItem method. |
CheckLastInvoice |
String |
See “Input Parameter” section in ReadItem method. |
CheckPriceCode |
String |
See “Input Parameter” section in ReadItem method. |
CheckImageLink |
String |
See “Input Parameter” section in ReadItem method. |
CheckSpecLink |
String |
See “Input Parameter” section in ReadItem method. |
CheckHomepageLink |
String |
See “Input Parameter” section in ReadItem method. |
Output Structure
Property Name |
Type |
Detail |
ReturnCode |
Integer |
Contains return code. Zero means OK; for other return codes, please see “EliitmiqService Return Code” section. |
NumberOfRecord |
Integer |
Number of items in ItemRecord array. |
ItemRecord() |
ItemRecord |
An array of item record. Each item record has one item location. See “ItemRecord Structure” in ReadItem method for more detail. |
InvoiceItemRecord() |
InvoiceItemRecord |
See “InvoiceItemRecord Structure” in ReadItem method for more detail. |
PriceCodeRecord() |
PriceCodeRecord |
See “PriceCodeRecord Structure” in ReadItem method for more detail. |
CustomerPriceRecord() |
CustomerPriceRecord |
See “Input Parameter” in ReadItem method for more detail. |
ImageLinkRecord() |
ImageLinkRecord |
See “Input Parameter” in ReadItem method for more detail. |
SpecLinkRecord() |
SpecLinkRecord |
See “Input Parameter” in ReadItem method for more detail. |
HomepageLinkRecord() |
HomepageLinkRecord |
See “Input Parameter” in ReadItem method for more detail. |
ReturnMsg |
String |
This is description of return code. For example, if return code is zero, you can expect “OK” in this field. |
Code Example (VB)
The following sample code will read item number “ITEM001”, customer “CUS01” and returns item master record, invoice item record, customer price, price code, and links.
Dim wsItemInfo As New webServicesgetitmiq.EliitmiqService
Dim Result As New webServicesgetitmiq. ReadItemAllLocationResult
Result = wsItemInfo.ReadItemAllLocation("", "", “ITEM001”, “F”, “CUS01”, “Y”, “Y”, “I”, “Y”, “Y”)
If Result.ReturnCode = 0
If Result.ItemRecord.ErrorStatus = "00" Then
lblResult.Text = Result.ItemRecord.ITEM_NO
Else
lblResult.Text = "Error Code for Item is:" & _
Result.ItemRecord.ErrorStatus
End If
Else
lblResult.Text = "Error Getting Item (Error Code" & _
Result.ReturnCode.ToString & ")"
End If
This method will return substitute items of a given class. For example, if we have several brands of 60W CFL light bulbs to sell we may want to set up these items as a substitute class in ITEM_SUBSTITUE field so when customer order any one of these items that’s out of stock, we can suggest them to order another one in the same class that’s in stock.
To use this method, you must make sure “Substitute
Item Control” is turned on in Elliott global setup, or you will get error code
13.
Usage:
Output = A.ReadSubstituteItem(UserName, UserPassword, SubstituteClass, DetailLevel, ItemRecordSortBy)
Parameters UserID, Password are not used at this moment.
Input Parameter
Parameter Name |
Type |
Detail |
SubstituteClass |
String |
Required. |
DetailLevel |
String |
See “Input Parameter” in ReadItem method. |
ItemRecordSortBy |
String |
The following options can be upper or lower cases. “ITEM_QTY_AVL ASC”: Sort output ItemRecord by item quantity available in ascending sequence. “ITEM_QTY_AVL DESC”: Sort output ItemRecord by item quantity available in descending sequence. Other values: this method is not implemented with relational engine so all other sort options are not supported. |
Output Structure
Property Name |
Type |
Detail |
ReturnCode |
Integer |
Contains return code. Zero means OK; for other return codes, please see “EliitmiqService Return Code” section. |
NumberOfRecord |
Integer |
Number of records in ItemRecord array. |
ItemRecord() |
ItemRecord |
An array of ItemRecord. See “ItemRecord Structure” in ReadItem method. |
ReturnMsg |
String |
This is description of return code. For example, if return code is zero, you can expect “OK” in this field. |
Code Example (VB)
The following sample code will return all items for “CLASS001” substitute class. The quantity returned is from the default location of the item master record.
Dim wsItemInfo As New webServicesgetitmiq.EliitmiqService
Dim Result As New webServicesgetitmiq.ReadSubstituteItemResult
Result = wsItemInfo. ReadSubstituteItem("", "", “CLASS001”, “F”, “”)
If Result.ReturnCode= 0 Then
lblResult.Text = Result.ItemRecord(0).ITEM_NO
Else
lblResult.Text = "Error Getting Substitute Items(Error Code" & _
Result.ReturnCode.ToString & ")"
End If
EliitmiqService Return Code
0 = OK
1 = File Error
2 = Missing Item No (Read Item with multiple loc/Add On It)
3 = No of Item Must Provide (Read Item)
4 = Item Not Found
5 = Invalid Inv Item Flag ("Y" or "N")
6 = Customer Number Not Provided
7 = Invalid Customer Number
8 = Invalid Check Price Code Flag ("Y" or "N")
9 = Invalid Check Image Link Flag
10 = Invalid Check Spec Link Flag ("Y" or "N")
11 = Invalid Check Home Link Flag ("Y" or "N")
12 = Missing Substitute Class
13 = Global Setup Not Allowed
14 = Substitute Class Not On File
15 = Substitute Item Not Found
16 = Price By Whole Order Not Allowed
17 = AddOn Item Not Found
CLS