Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracking multiple items error... "The data you submitted is incomplete or invalid" #700

Open
Adamyoelfc opened this issue Jan 15, 2024 · 2 comments

Comments

@Adamyoelfc
Copy link

hi there...
I'm trying to specify each item in each upload I do because I need to track shipping separately, I added a List to the OrderFulfillmentMessage object and it's uploading well. Still, anyway, I'm getting an error after... "The data you submitted is incomplete or invalid"

I'm doing this:

            int messageId = 1;

            foreach (var item in tList)
            {
                list.Add(new OrderFulfillmentMessage()
                {
                    AmazonOrderID = item["AmazonOdrId"].ToString(),
                    FulfillmentDate = item["FulfillmentDate"] + "",
                    FulfillmentData = new FulfillmentData()
                    {
                        CarrierCode = item["CarrierCode"].ToString(),
                        ShippingMethod = "Standard",
                        ShipperTrackingNumber = item["ShipperTrackingNumber"].ToString(),
                    },
                    Item = new List<Item> { new Item {
                        AmazonOrderItemCode = item["FreeTxt"]?.ToString(),
                        Quantity = Convert.ToInt32(decimal.Parse(item["Quantity"].ToString()))
                    } }
                });

                messageId++;
            }

            createDocument.AddOrderFulfillmentMessage(list);

            var xml = createDocument.GetXML();
            string xmlfilename = string.Format(@"AmzFeed/Upload/AmzShippingFeedUpload_{0}.xml", DateTime.Now.Ticks);
            
      System.IO.File.WriteAllText(xmlfilename, xml); ;
            var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_ORDER_FULFILLMENT_DATA);


updating this:

  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <OrderFulfillment>
      <AmazonOrderID>111-1111111-1111111</AmazonOrderID>
      <FulfillmentDate>2024-01-12T00:00:00</FulfillmentDate>
      <FulfillmentData>
        <CarrierCode>USPS</CarrierCode>
        <ShippingMethod>Standard</ShippingMethod>
        <ShipperTrackingNumber>487965489465483</ShipperTrackingNumber>
      </FulfillmentData>
      <Item>
        <AmazonOrderItemCode>87465486432484354</AmazonOrderItemCode>
        <Quantity>1</Quantity>
      </Item>
    </OrderFulfillment>
  </Message>

and getting this in the result file:

   {
      "MessageID": "2",
      "ResultCode": "Error",
      "ResultMessageCode": "18028",
      "ResultDescription": "The data you submitted is incomplete or invalid. For help fixing this, see http://sellercentral.amazon.com/gp/help/30721",
      "AdditionalInfo": {
        "SKU": null,
        "FulfillmentCenterID": null,
        "AmazonOrderID": "114-1111111-1111111",
        "AmazonOrderItemCode": null
      }
    },

any help with this, please?

@ThomasL1973
Copy link

ThomasL1973 commented Jan 16, 2024 via email

@Adamyoelfc
Copy link
Author

Adamyoelfc commented Jan 16, 2024

@ThomasL1973 Thank for answering this, i added MerchatFulfillmentId, and MerchantFulfillmentItemId, at this point in my code I don't have the address, I can get it but I don't think that would solve the issue (missing address at that point)... this is my new code:

            foreach (var item in tList)
            {
                list.Add(new OrderFulfillmentMessage()
                {
                    AmazonOrderID = item["AmazonOdrId"].ToString(),
                    MerchantFulfillmentID = item["DocNum"].ToString(),
                    FulfillmentDate = item["FulfillmentDate"] + "",
                    FulfillmentData = new FulfillmentData()
                    {
                        CarrierCode = item["CarrierCode"].ToString(),
                        ShippingMethod = "Standard",
                        ShipperTrackingNumber = item["ShipperTrackingNumber"].ToString(),
                    },
                    Item = new List<Item> { new Item {
                        AmazonOrderItemCode = item["FreeTxt"]?.ToString(),
                        MerchantFulfillmentItemID = item["ItemCode"].ToString(),
                        Quantity = Convert.ToInt32(decimal.Parse(item["Quantity"].ToString()))
                    } }
                });

                messageId++;
            }

I'm uploading this:

  <Message>
    <MessageID>9</MessageID>
    <OperationType>Update</OperationType>
    <OrderFulfillment>
      <AmazonOrderID>111-1111111-1111111</AmazonOrderID>
      <MerchantFulfillmentID>1234567</MerchantFulfillmentID>
      <FulfillmentDate>2024-01-15T00:00:00</FulfillmentDate>
      <FulfillmentData>
        <CarrierCode>USPS</CarrierCode>
        <ShippingMethod>Standard</ShippingMethod>
        <ShipperTrackingNumber>89746548646864567</ShipperTrackingNumber>
      </FulfillmentData>
      <Item>
        <AmazonOrderItemCode>12345678912345</AmazonOrderItemCode>
        <MerchantFulfillmentItemID>3214</MerchantFulfillmentItemID>
        <Quantity>1</Quantity>
      </Item>
    </OrderFulfillment>
  </Message>

and getting this error:

    {
      "MessageID": "10",
      "ResultCode": "Error",
      "ResultMessageCode": "18028",
      "ResultDescription": "The data you submitted is incomplete or invalid. For help fixing this, see http://sellercentral.amazon.com/gp/help/30721",
      "AdditionalInfo": {
        "SKU": null,
        "FulfillmentCenterID": null,
        "AmazonOrderID": "111-1111111-1111111",
        "AmazonOrderItemCode": null
      }
    },

I think I don't have more elements to put in there, I was thinking of the type of each variable, but it's uploading the XML like that, and I think it's right...

is there a way to upload the SKU code with this package ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants