How to create the right test for microgramming Ingram?

I am trying to create an order test for an integral micron, and I have not achieved results.

This is the xml request to send:

<OrderRequest> <Version>2.0</Version> <TransactionHeader> <SenderID>123456789</SenderID> <ReceiverID>987654321</ReceiverID> <CountryCode>MD</CountryCode> <LoginID>ingram_login</LoginID> <Password>ingram_password</Password> <TransactionID>54321</TransactionID> </TransactionHeader> <OrderHeaderInformation> <BillToSuffix /> <AddressingInformation> <CustomerPO>TEST PO ONLY - DO NOT SHIP</CustomerPO> <ShipToAttention>Mrs Jones</ShipToAttention> <EndUserPO>EndUserPO_1</EndUserPO> <ShipTo> <Address> <ShipToAddress1>Red House Company</ShipToAddress1> <ShipToAddress2>1730 105TH ST</ShipToAddress2> <ShipToAddress3/> <ShipToCity>NEW RICHMOND</ShipToCity> <ShipToProvince>WI</ShipToProvince> <ShipToPostalCode>54017</ShipToPostalCode> </Address> </ShipTo> </AddressingInformation> <ProcessingOptions> <CarrierCode>F2</CarrierCode> <AutoRelease>H</AutoRelease> <ThirdPartyFreightAccount/> <KillOrderAfterLineError>N</KillOrderAfterLineError> <ShipmentOptions> <BackOrderFlag>Y</BackOrderFlag> <SplitShipmentFlag>N</SplitShipmentFlag> <SplitLine>N</SplitLine> <ShipFromBranches>10</ShipFromBranches> <DeliveryDate>20090901</DeliveryDate> </ShipmentOptions> </ProcessingOptions> <DynamicMessage> <MessageLines>Deliver to Mrs Jones</MessageLines> </DynamicMessage> </OrderHeaderInformation> <OrderLineInformation> <ProductLine> <SKU>TSXML3</SKU> <Quantity>1</Quantity> <CustomerLineNumber/> <ReservedInventory> <ReserveCode>C</ReserveCode> <ReserveSequence>01</ReserveSequence> </ReservedInventory> <CustomerPartNumber/> <UPC/> <ManufacturerPartNumber/> <ShipFromBranchAtLine>10</ShipFromBranchAtLine> </ProductLine> <CommentLine> <CommentText>TEST PO ONLY - DO NOT SHIP</CommentText> </CommentLine> </OrderLineInformation> <ShowDetail>1</ShowDetail> </OrderRequest> 

microgram integral:

 <OrderResponse> <Version>2.0</Version> <TransactionHeader> <SenderID>987654321</SenderID> <ReceiverID>123456789</ReceiverID> <ErrorStatus ErrorNumber="20196"> ERROR: One Productline can not have multiple parts in it when ShowDetail='2' </ErrorStatus> <DocumentID>{5535EC2F-DB51-4D35-B492-6425A0B9F62D}</DocumentID> <TransactionID>54321</TransactionID> <TimeStamp>2016-01-27T11:45:19</TimeStamp> </TransactionHeader> </OrderResponse> 

I tried and explored the answer of ErrorStatus and Productline , and I did not understand the solution. thank you in advance

Sorry, no ingram-micro tag

+5
source share
2 answers

Just by looking at the IM-XML documentation , I could find you have some obvious problems with the <ProductLine> section of your example:

<ManufacturerPartNumber> Number - Do not indicate whether <SKU> or <UPC> enabled

<UPC> EAN / UPC Number - Do not indicate whether <ManufacturerPartNumber> or <SKU> enabled

<SKU> Ingram Micro Product Code - Do not indicate whether <ManufacturerPartNumber> or <UPC> enabled

Apparently, you should specify only one of the above element values, in your example the values ​​for SKU and UPC are indicated

<ReservedInventory> Contains reserved inventory information. - If this is not required, do not indicate.

This is not clear to me from my brief description of the documentation when it is needed, but you specify a value for this element, and I do not see any clear instructions elsewhere in the example that would suggest why this would be required in your example. So let me answer this question "maybe."

<ShipFromBranchAtLine>

I could not find a link to this element in the documentation, so it is probably invalid. The closest match to this element that I could find was <ShipFromBranches> , which would not belong to the <ProductLine> element.

<CustomerPartNumber>

Again, no links to this that I could find in the documentation.

<RequestedPrice> Special offer price Parent: <SpecialBid>

You have <RequestedPrice> as a direct child of the ProductLine , when it should be inside the <SpecialBid> element.

So, considering all of the above, I commented on those parts that seemed wrong (or perhaps wrong, for ours, perhaps) as follows:

  <ProductLine> <SKU>NV9159</SKU> <Quantity>1</Quantity> <CustomerLineNumber/> <!-- ResvervedInventory : Unless required, do not specify <ReservedInventory> <ReserveCode>C</ReserveCode> <ReserveSequence>01</ReserveSequence> </ReservedInventory> --> <!-- CustomerPartNumber element not defined in spec. <CustomerPartNumber/> --> <!-- UPC : Do not specify if SKU included <UPC>SP-RACKTRAY</UPC> --> <!-- ManufacturerPartNumber : Do not specify if SKU included <ManufacturerPartNumber/> --> <!-- ShipFromBranchAtLine element not defined in spec. <ShipFromBranchAtLine>10</ShipFromBranchAtLine> --> <!-- RequestedPrice : parent = SpecialBid <RequestedPrice>163.36</RequestedPrice> --> </ProductLine> 

If we just pulled out these parts (provided that none of them should be there) and set them to empty elements, it might look something like this:

  <ProductLine> <SKU>NV9159</SKU> <Quantity>1</Quantity> <CustomerLineNumber/> </ProductLine> 

Finally, in a direct link to the error, you return:

A single Productline cannot have multiple parts in it when ShowDetail = '2'

I would suggest that this is due to the fact that you are setting the value for both <SKU> and <UPC> , which may confuse the system in that you are trying to include "several parts" (for example, two different part codes that maybe for two different factual parts) when specifying (illegally) a value for these two elements.

But even if this is not the case, it seems that the easiest way to try to do this, given the actual wording of this error, maybe just try to change the value of the ShowDetail element from:

 <ShowDetail>2</ShowDetail> 

to

 <ShowDetail>1</ShowDetail> 

I would recommend fixing other problems with the ProductLine element, but with an error response, to go alone, you tried changing ShowDetail to see if that changed?

+2
source

I tried to send data by installing the product line as follows:

 <ProductLine> <SKU>TSXML3</SKU> <Quantity>1</Quantity> <CustomerLineNumber/> <ReservedInventory> <ReserveCode>C</ReserveCode> <ReserveSequence>01</ReserveSequence> </ReservedInventory> </ProductLine> 

I got this answer:

 <?xml version="1.0" encoding="ISO-8859-1"?> <OrderResponse> <Version>2.0</Version> <TransactionHeader> <SenderID>987654321</SenderID> <ReceiverID>123456789</ReceiverID> <ErrorStatus ErrorNumber="21340">Order Rejected</ErrorStatus> <DocumentID>{584B79A8-E320-4183-A1BB-3DEE24CA673A}</DocumentID> <TransactionID>54321</TransactionID> <TimeStamp>2016-02-08T05:49:12</TimeStamp> </TransactionHeader> <OrderInfo> <OrderNumbers> <BranchOrderNumber></BranchOrderNumber> <CustomerPO>TEST PO ONLY - DO NOT SHIP</CustomerPO> <ShipToAttention>Mrs Jones</ShipToAttention> <ThirdPartyFreightAccount></ThirdPartyFreightAccount> <ShipToAddress1></ShipToAddress1> <ShipToAddress2></ShipToAddress2> <ShipToCity></ShipToCity> <ShipToProvince></ShipToProvince> <ShipToPostalCode></ShipToPostalCode> <AddressErrorMessage AddressErrorType=" "></AddressErrorMessage> <ContractNumber></ContractNumber> <OrderSuffix Suffix=""> <LineInformation> <ProductLine> <LineError></LineError> <SKU>TSXML3</SKU> <UnitPrice>0.00</UnitPrice> <IngramLineNumber></IngramLineNumber> <CustomerLineNumber>000</CustomerLineNumber> <ShipFromBranch>10</ShipFromBranch> <OrderQuantity>1</OrderQuantity> <AllocatedQuantity>0</AllocatedQuantity> <BackOrderedQuantity>0</BackOrderedQuantity> <BackOrderETADate></BackOrderETADate> <PriceDerivedFlag></PriceDerivedFlag> <ForeignCurrency></ForeignCurrency> <FreightRate>0.00</FreightRate> <TransitDays>0</TransitDays> <LineBillToSuffix>000</LineBillToSuffix> </ProductLine> <CommentLine> <CommentText>TEST PO ONLY - DO NOT SHIP</CommentText> <CommentLineNumber></CommentLineNumber> </CommentLine> </LineInformation> </OrderSuffix> </OrderNumbers> </OrderInfo> </OrderResponse> 

Hope this helps you.

+1
source

Source: https://habr.com/ru/post/1241737/


All Articles