Product dimensions discrepancy

Hi Community,

After creating the following product:

mutation {
  product_create(
    data: {
      customer_account_id: "QWNjb3VudDo1ODgy"
      name: "Banana"
      sku: "BANANA-001"
      price: "150.00"
      vendors: {
        vendor_id:"VmVuZG9yOjE2NzMyMw=="
        vendor_sku:"BANANA-001"
      }
      warehouse_products: [{
        warehouse_id: "V2FyZWhvdXNlOjExMjg4"
        on_hand: 0
      }]
      value: "150.00"
      barcode: "BANANA-001"
      country_of_manufacture: "FR"
      dimensions: { weight: "2", height: "25", width: "10", length: "25" }
      images: { src: "https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/apple/237/banana_1f34c.png", position: 1 }
  }
)
  {
    request_id
    complexity
    product {
      id
      sku
    }
  }
}

I ran the following query:

query {
  product(sku: "BANANA-001") {
    complexity
    request_id
    data {
      account_id
      id
      sku
      name
      dimensions {
        length
        width
        height
        weight
      }
      warehouse_products {
        id
        warehouse_id
        warehouse_identifier
        on_hand
      }
      vendors {
        vendor_id
        vendor_sku
        price
      }
    }
  }
}

And got the following response (which is correct):

{
  "data": {
    "product": {
      "complexity": 1,
      "request_id": "5e1da392ec407a68d9b07d5f",
      "data": {
        "account_id": "QWNjb3VudDo1ODgy",
        "id": "UHJvZHVjdEluZm86MjY5MjE5NTQx",
        "sku": "BANANA-001",
        "name": "Banana",
        "dimensions": {
          "length": "25.00 cm",
          "width": "10.00 cm",
          "height": "25.00 cm",
          "weight": "2.0000 kg"
        },
        "warehouse_products": [
          {
            "id": "UHJvZHVjdDozMDA1NzE0NzM=",
            "warehouse_id": "V2FyZWhvdXNlOjExMjg4",
            "warehouse_identifier": null,
            "on_hand": 0
          }
        ],
        "vendors": [
          {
            "vendor_id": "VmVuZG9yOjE2NzMyMw==",
            "vendor_sku": "BANANA-001",
            "price": "0.00"
          }
        ]
      }
    }
  }
}

The issue is I do not have the same data displayed in my Shiphero dashboard even though Iā€™m using the ā€œcentimetersā€ setting:
Capture dā€™eĢcran 2020-01-14 aĢ€ 12.35.03

Capture dā€™eĢcran 2020-01-14 aĢ€ 12.37.37

Any idea where this issue could come from? Is there some kind of unit conversion at work?

Cheers,

Paul

Hi @paul-wing !
Thanks for catching this. The Shiphero dashboard always displays units on inches.
This is:

Height (in): 9.84251969 = 25 cm
Width (in): 3.93700787 = 10 cm
Length (in): 9.84251969 = 25 cm

I already submitted a request for this to be fixed by the engineering team.
I will let you know as soon as I have an update.
Thanks!
Tom

@tomasw Can we update Height width length and weight on shiphero using graphql?

Hi @abubakartws
And welcome to the community!
Absolutely, you should be able to do so with this example Examples-mutation ā€“ Developer Resources | ShipHero

Let us know if that doesnā€™t help.
Thanks in advance!
Tom

Thank You so much @tomasw yeah I found this graphql later on actually I want to update terrif code as well, So can I do that because thatā€™s not included in give muatations

Hi @abubakartws!

Iā€™m glad it helped!
Tariff code should be there available as well, something like this:

mutation {
  product_update(
    data: {
      sku: "1122334457"
      dimensions: {
        weight: "1.00"
        height: "1.00"
        width: "1.00"
        length: "1.00"
      }
      tariff_code:"someTariffCode"
    }
  ) {
    request_id
    complexity
  }
}

In case it helps, using and IDE and navigating through the Docs might allow you to see all of those fields available (not only for this mutation but for all of them)
Reference: Getting Started ā€“ Developer Resources | ShipHero

Thanks again! And please let us know if there is anything else we could helo you with,
Tom

Yes it worked thank you so much @tomasw

1 Like