Create order invalid warehouse_id

I am trying to test the mutation order_create in my https://sfapp.shiphero.com/ test account. I have created a product successfully but the create order is failing. I have double checked the warehouse_id on my account and it is correct.

Could I get some help as to why this is failing please?

order_create(
    data: {
      order_number: "11223344"
      fulfillment_status: "pending"
      order_date: "2021-09-22"
      shipping_address: {
        first_name: "John"
        last_name: "Johnson"
        company: "The Johnson Co"
        address1: "2543 Duck St."
        address2: "Apt. 2"
        city: "Oklahoma"
        state: "Oklahoma"
        state_code: "OK"
        zip: "73008"
        country: "US"
        country_code: "US"
      }
      line_items: {
        sku: "testSKU12345"
        partner_line_item_id: "282960815"
        quantity: 2
        price: "150.00"
        product_name: "Example Product"
        fulfillment_status: "pending"
        quantity_pending_fulfillment: 2
        warehouse_id: "V2FyZWhvdXNlOjc2Nzk2"
      }
      required_ship_date: "2021-09-26"
    }
  )

Error message returned

{
      "message": "Invalid warehouse_id in order line item with sku testSKU12345",
      "operation": "order_create",
      "field": "order_create",
      "request_id": "614c38e7c3ced2a89e775eba",
      "code": 3
    }

If I take out warehouse_id I still get an error

      "message": "Unexpected Error",
      "operation": "order_create",
      "field": "order_create",
      "request_id": "614c38c0d3891266fc2cac0e",
      "code": 22
    }

We have updated this to a trial. Please try again, with the warehouse id you originally had

Hi Theresa,

I am still getting the same error message.

      "message": "Invalid warehouse_id in order line item with sku testSKU12345",
      "operation": "order_create",
      "field": "order_create",
      "request_id": "6151778c67b994db5f01b0ee",
      "code": 3

Get product by id result:

    "name": "Test product",
    "sku": "testSKU12345",
    "barcode": "495456475",
    "country_of_manufacture": "US",
    "created_at": "2021-09-22T11:24:43",
    "warehouse_products": [
      {
        "warehouse_id": "V2FyZWhvdXNlOjc2Nzk2",
        "warehouse_identifier": "Primary",
        "on_hand": 200,
        "inventory_bin": "",
        "inventory_overstock_bin": " ",
        "reserve_inventory": 0,
        "replenishment_level": 0,
        "reorder_amount": 1,
        "reorder_level": 0,
        "custom": false
      }

Can you please tell me the correct warehouse_id that I can create an order with on my account?

@Theresa What does updating my account to a trial account do? Is that the same as a develop test account?

You will need to go to https://app.shiphero.com/dashboard/users and add a third-party developer account.

Hi @Theresa my account is a fulfilment account - https://sfapp.shiphero.com/ and I do not have that option in my UI to add third party developers

I have generated a new access token for my user on that account and ran the mutation again. Still getting the same error message.

  "message": "Invalid warehouse_id in order line item with sku testSKU12345",
  "operation": "order_create",
  "field": "order_create",
  "request_id": "6152bc30f5041f35ab7b02bd",
  "code": 3

I have been able to create product and run other queries with my access token. Could you try to run the query on my account on your side please?

I was able to send you a developer token and refresh token to the email you are registered with. Give that a go!

Hi Theresa,

Thanks for the access token. I am still unable to create an order.
“request_id”: “6153831309fd7c885c082b7e”,

Could you please try create an order on my account?

I’ve also tried the Upload CSV to upload orders but I am getting the error:
Warehouse primary is invalid. Valid warehouses are:
Which suggests that there is no valid warehouses on my account.

I have tried to create a shipping plan too and getting the error

      "message": "Shipping plans can only be created for ShipHero Fulfillment warehouses.",
      "operation": "shipping_plan_create",
      "field": "shipping_plan_create",
      "request_id": "615409ee5b8c5d79f344088a",
      "code": 7
    }

Mutation details

mutation {
  shipping_plan_create(
    data: {
      subtotal: "0.00"
      shipping_price: "0.00"
      total_price: "0.00"
      warehouse_id: "V2FyZWhvdXNlOjc2Nzk2"
      line_items: [
        { 
          product_name: "Test product",
          sku: "testSKU12345", 
          quantity: 100 
        }
      ]
    }
  ) {
    request_id
    complexity
    shipping_plan {
      id
      account_id
      fulfillment_status
      warehouse_id
    }
  }
}

It seems like the warehouse is not configured correctly on my account. Could you and the fulfilment team please help update my warehouse so that I can create an order?

Would you be available for a screenshare?

We need the ability to create orders on Thursday with out live account. I haven’t been able to create an order with this test account, I am a bit nervous that when I try the same thing on our live site I still won’t be able to create an order. Is there a way to test creating orders on the live site?

I emailed you a 3rd party developer token. Did you get it? Let me check on the best way to do a test on a live fulfillment account.

Hi Theresa,

I got the 3rd party developer token and used it to try the create_order mutation. I got the same error message.

I’ve also tried the Upload CSV to upload orders but I am getting the error:
Warehouse primary is invalid. Valid warehouses are:

Which suggests the warehouses are not configured correctly on my account.

Thanks Theresa, look forward to hearing from you on how to test on a live fulfilment account

Hi Shannen,
You could create an order in the production account with a hold.

Hi Theresa,
What do you mean by with a hold? What parameter is that on the create_order mutation?

in the order_create mutation, you can send in data for holds:

mutation {
  order_create(
    data: {
      order_number: "1234"
      shipping_address: { first_name: "Joe", last_name: "Smith" }
      holds: { operator_hold: true }
    }
  ) {
    request_id
    complexity
    order {
      line_items {
        edges {
          node {
            sku
            barcode
          }
        }
      }
    }
  }
}

Brilliant thanks Theresa. I will try that on our live site.
Is it still possible to get my test site configured correctly, with the warehouse updated, so I can test out different calls please?

Thanks for your help,
Shannen

I have successfully been able to create an order on our production site that is on operator hold :tada:

@Theresa Could you help get my test account set up the same as this fulfilment account so that I can test what happens when I remove it from operator hold please?

1 Like

Yes, this is a bit trickier than original expectations but still working through it!

Thanks @Theresa look forward to hearing from you

Hi Shannen,
I did not forget about your question. I am not sure that we can get it set 100% so the test order will come through in a fulfillment account, because of the unique nature of the warehouse. As soon as I get more information, I can pass it on!

1 Like