lineofflight / peddler

Amazon Selling Partner API (SP-API) in Ruby
MIT License
307 stars 130 forks source link

fulfillment_inbound_shipment - Labels are ALWAYS "SINGLE SKU" when i put_transport_content multiple SKUs #121

Closed blairanderson closed 5 years ago

blairanderson commented 5 years ago

i'm submitting carton contents XML feed

<?xml version="1.0" encoding="utf-8"?>
<root>
  <CartonContentsRequest>
    <ShipmentId>FBA12345</ShipmentId>
    <NumCartons>2</NumCartons>
    <Carton>
      <CartonId>FBA12345-shiptite-001</CartonId>
      <Item>
        <SKU>shiptite-001</SKU>
        <QuantityShipped>24</QuantityShipped>
        <QuantityInCase>24</QuantityInCase>
      </Item>
    </Carton>
    <Carton>
      <CartonId>FBA12345-FBA-SHIPTITE-ORB</CartonId>
      <Item>
        <SKU>FBA-SHIPTITE-ORB</SKU>
        <QuantityShipped>24</QuantityShipped>
        <QuantityInCase>24</QuantityInCase>
      </Item>
    </Carton>
  </CartonContentsRequest>
</root>
peddler.fba_submit_carton_contents(shipment.carton_contents_feed_xml)

2 submitting the packing list

package_list = shipment.carton_package_list
=> [
    {:weight=>{:unit=>"pounds", :value=>11}, :dimensions=>{:unit=>"inches", :length=>14.0, :width=>10.0, :height=>9.0}},
     {:weight=>{:unit=>"pounds", :value=>11}, :dimensions=>{:unit=>"inches", :length=>14.0, :width=>12.0, :height=>10.0}}]

peddler.fulfillment_inbound_shipment.put_transport_content(
              shipment_id,
              is_partnered = true,
              shipment_type = FulfillmentInboundShipment::SMALL_PARCEL,
              transport_details = {
                partnered_small_parcel_data: {
                  carrier_name: FulfillmentInboundShipment::UPS,
                  package_list: package_list
                }
              }
            )

3 Fetching the transport contents

get_content = peddler.fulfillment_inbound_shipment.get_transport_content(shipment_id).parse
=> {"TransportContent"=>
  {"TransportHeader"=>
    {"SellerId"=>"SOMESELLERID", "IsPartnered"=>"true", "ShipmentId"=>"FBA12345", "ShipmentType"=>"SP"},
   "TransportResult"=>{"TransportStatus"=>"ESTIMATED"},
   "TransportDetails"=>
    {"PartneredSmallParcelData"=>
      {"PackageList"=>
        {"member"=>
          [{"Weight"=>{"Value"=>"11.0", "Unit"=>"pounds"},
            "CarrierName"=>"UNITED_PARCEL_SERVICE_INC",
            "PackageStatus"=>"SHIPPED",
            "Dimensions"=>{"Width"=>"10.0", "Length"=>"14.0", "Unit"=>"IN", "Height"=>"9.0"}},
           {"Weight"=>{"Value"=>"11.0", "Unit"=>"pounds"},
            "CarrierName"=>"UNITED_PARCEL_SERVICE_INC",
            "PackageStatus"=>"SHIPPED",
            "Dimensions"=>{"Width"=>"12.0", "Length"=>"14.0", "Unit"=>"IN", "Height"=>"10.0"}}]},
       "PartneredEstimate"=>{"Amount"=>{"CurrencyCode"=>"USD", "Value"=>"10.14"}}}}}}
blairanderson commented 5 years ago

When I download the actual labels, they say "SINGLE SKU" and are MISSING the SKU number, even though they are not a single SKU.

blairanderson commented 5 years ago

i am stumped :(

yubrew commented 5 years ago

Is this behavior different than creating the label from SellerCentral for you? For a 1 SKU in 1 box, it says "SINGLE SKU" and the specific sku on the label. However, when I put multiple SKUs in a box, the label still says "SINGLE SKU", but does not have the specific sku.

For me, it works this way in SellerCentral, MWS scratchpad and with peddler; I think there's no error.

blairanderson commented 5 years ago

@yubrew are you saying that what i'm submitting looks to be OK?

When i get back the labels generated from MWS they're missing the SKU and they state "SINGLE-SKU".

I agree that SellerCentral does include both the item SKU and says "Single-SKU" but my MWS labels just say "SINGLE-SKU" without the SKU number shown beneath.

blairanderson commented 5 years ago

@yubrew i'm confirming this was submitted with the same process as shown above with 3 SKUs.

It shows 3 boxes correctly, but each shows "single sku" even though they should have the sku number written on them.

github

yubrew commented 5 years ago

@blairanderson Yes, that's what happens to me too, it shows "Single SKU" and no specific item SKU even though it is a mixed SKU package. No problems with Amazon receiving these packages.

So I think we can agree this is not a Peddler issue.

blairanderson commented 5 years ago

@yubrew how do you identify which labels are supposed to be attached to which cartons?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.