1

This may be a long shot but Walmart's support has been completely unhelpful.

For orders containing 2 or more of the same item, Walmart breaks them out into lines of 1 quantity when working with the API. Ex:

<order
    xmlns="http://walmart.com/mp/v3/orders">
    <purchaseOrderId>xxx</purchaseOrderId>
    <customerOrderId>xxx</customerOrderId>
    <customerEmailId>xxx</customerEmailId>
    <orderDate>xxx</orderDate>
    <mart>Walmart.com</mart>
    <shippingInfo>...</shippingInfo>
    <orderLines>
        <orderLine>
            <lineNumber>1</lineNumber>
            <item>
                <productName>xxx</productName>
                <sku>xxx</sku>
            </item>
            <charges>.....</charge>
            </charges>
            <orderLineQuantity>
                <unitOfMeasurement>EACH</unitOfMeasurement>
                <amount>1</amount>
            </orderLineQuantity>
            <statusDate>2021-03-31T22:30:46.890Z</statusDate>
            <orderLineStatuses>
                <orderLineStatus>
                    <status>Acknowledged</status>
                    <statusQuantity>
                        <unitOfMeasurement>EACH</unitOfMeasurement>
                        <amount>1</amount>
                    </statusQuantity>
                </orderLineStatus>
            </orderLineStatuses>
            <originalCarrierMethod>267</originalCarrierMethod>
            <fulfillment>....</fulfillment>
        </orderLine>
        <orderLine>
            <lineNumber>1</lineNumber>
            <item>
                <productName>xxx</productName>
                <sku>xxx</sku>
            </item>
            <charges>....</charge>
            </charges>
            <orderLineQuantity>
                <unitOfMeasurement>EACH</unitOfMeasurement>
                <amount>1</amount>
            </orderLineQuantity>
            <statusDate>2021-03-31T22:30:46.891Z</statusDate>
            <orderLineStatuses>
                <orderLineStatus>
                    <status>Acknowledged</status>
                    <statusQuantity>
                        <unitOfMeasurement>EACH</unitOfMeasurement>
                        <amount>1</amount>
                    </statusQuantity>
            </orderLineStatus>
        </orderLineStatuses>
        <originalCarrierMethod>xxx</originalCarrierMethod>
        <fulfillment>...</fulfillment>
    </orderLine>
</orderLines>

In the above there are multiple line 1's.

I cannot seem to find a way to submit a shipment for the above order to close all lines at the same time.

My first idea was to submit it in the exact way that the Walmart API returns an order:

<orderShipment xmlns="http://walmart.com/mp/v3/orders">
    <orderLines>
        <orderLine>
            <lineNumber>1</lineNumber>
            <orderLineStatuses>
                <orderLineStatus>
                    <status>Shipped</status>
                    <statusQuantity>
                        <unitOfMeasurement>Each</unitOfMeasurement>
                        <amount>1</amount>
                    </statusQuantity>
                    <trackingInfo>
                        <shipDateTime>2021-04-01T11:47:40</shipDateTime>
                        <carrierName>
                            <carrier>FedEx</carrier>
                        </carrierName>
                        <methodCode>Standard</methodCode>
                        <carrierMethodCode>67</carrierMethodCode>
                        <trackingNumber>xxxx</trackingNumber>
                        <trackingURL>https://www.fedex.com/</trackingURL>
                    </trackingInfo>
                </orderLineStatus>
            </orderLineStatuses>
        </orderLine>
        <orderLine>
            <lineNumber>1</lineNumber>
            <orderLineStatuses>
                <orderLineStatus>
                    <status>Shipped</status>
                    <statusQuantity>
                        <unitOfMeasurement>Each</unitOfMeasurement>
                        <amount>1</amount>
                    </statusQuantity>
                    <trackingInfo>
                        <shipDateTime>2021-04-01T11:47:40</shipDateTime>
                        <carrierName>
                            <carrier>FedEx</carrier>
                        </carrierName>
                        <methodCode>Standard</methodCode>
                        <carrierMethodCode>67</carrierMethodCode>
                        <trackingNumber>xxxx</trackingNumber>
                        <trackingURL>https://www.fedex.com/</trackingURL>
                    </trackingInfo>
                </orderLineStatus>
            </orderLineStatuses>
        </orderLine>
    </orderLines>
</orderShipment>

However the API returns the error below:

OrderLine has more than one entry for the same lineNumber. Please check the lineNumber 1

The next thing I tried was to consolidate them into one request:

<orderShipment xmlns="http://walmart.com/mp/v3/orders">
    <orderLines>
        <orderLine>
            <lineNumber>1</lineNumber>
            <orderLineStatuses>
                <orderLineStatus>
                    <status>Shipped</status>
                    <statusQuantity>
                        <unitOfMeasurement>Each</unitOfMeasurement>
                        <amount>2</amount>
                    </statusQuantity>
                    <trackingInfo>
                        <shipDateTime>2021-04-01T11:53:48</shipDateTime>
                        <carrierName>
                            <carrier>FedEx</carrier>
                        </carrierName>
                        <methodCode>Standard</methodCode>
                        <carrierMethodCode>67</carrierMethodCode>
                        <trackingNumber>xxxxx</trackingNumber>
                        <trackingURL>https://www.fedex.com/</trackingURL>
                    </trackingInfo>
                </orderLineStatus>
            </orderLineStatuses>
        </orderLine>
    </orderLines>
</orderShipment>

However this returns a new error:

Unable to process this request. The Line: 1 of PO: xxxx doesn't have enough quantity to ship requested quantity :: 2 qtyAvailableToShip :: 1

I can't think of another approach to ship this? If anyone could shed any light I would greatly appreciate it.

Conner
  • 17
  • 5
  • That's odd. Are you sure you're getting the same order.orderLines.lineNumber in the order response (and are handling them correctly?) The orders with multiple quantities that I've been getting all have different lineNumbers. Your first idea is the way to go, IF you can use the different lineNumbers. – toastifer Apr 02 '21 at 14:25
  • @toastifer Yeah, Walmart is sending orders with the same line number if it is the same SKU. The order information is directly pulled from [the GerOrder operation](https://developer.walmart.com/api/us/dsv/orders#operation/getAnOrder). This behaviour has been documented a few places [like here](https://support.ordoro.com/why-do-my-walmart-orders-with-multiple-line-items-import-differently/) but I cannot find any information regarding shipping these orders. – Conner Apr 02 '21 at 15:40
  • I know about Walmart breaking out each unit, but we've always had a unique lineNumber for each orderLine, even when there's more than one unit of a single SKU. Every single time. If your order example is a truly accurate representation of what you're receiving, then I'd say Walmart was glitching just for you. Is it remotely possible that you're reading the same orderLine -n- times? They're essentially identical except for the lineNumber. – toastifer Apr 02 '21 at 16:29
  • @toastifer Just to ensure I wasn't reading anything incorrectly I queried all of our open orders just to make sure it wasn't an isolated case but I can confirm we are getting orders with multiple `1`. Are you also using the DSV API? – Conner Apr 02 '21 at 20:04
  • Thanks for checking! That's very odd. My experience is with the Merchant API, which is so close I didn't notice any difference. – toastifer Apr 02 '21 at 20:33

0 Answers0