Search records by tote ID/barcode

Hello,

We are working on implementing a shipping platform for a ShipHero user, and it has been requested that we load data in using the tote ID/barcode, since they are picking the orders in SH and there is no current paperwork being generated that a user can use to load the order by (all the shipper has is their tote). Is there a way to query the tote_history API to retrieve records that match the barcode on the tote? I’ve tried the following request, however I am not getting any data:

{“query”:“query tote_history ($sort: String, $before: String, $after: String, $first: Int, $last: Int, $tote_name: String, $tote_id: String, $date_from: ISODateTime, $date_to: ISODateTime, $analyze: Boolean) {\n tote_history (tote_name: $tote_name, tote_id: $tote_id, date_from: $date_from, date_to: $date_to, analyze: $analyze) {\n request_id\n complexity\n data (sort: $sort, before: $before, after: $after, first: $first, last: $last) {\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n edges {\n node {\n tote_name\n tote_id\n action\n created_at\n }\n cursor\n }\n }\n }\n}”,“variables”:{
“sort”: “”,
“before”: “”,
“after”: “”,
“first”: 0,
“last”: 0,
“tote_name”: “”,
“tote_id”: “”,
“date_from”: “8-30-2021”,
“date_to”: “9-1-2021”,
“analyze”: true
}}

1 Like

Hi @bbeuerlein,
Welcome!
I am not 100% sure I understand. Are you wanting to get a list of the orders in a tote?

We need to call an order data taking the tote as a reference, is for shipping label processing purposes through API, since we don’t have the order number printed anywhere the only barcode available is the tote one. So that we need to correlate the data from the tote number

1 Like

This will get the tote pick from the order line item history. Will this help?

query{
  order(id:"<order id here>"){
    request_id
    complexity
    data{
      order_history{
            order{
          line_items{
            edges{
              node{
                tote_picks{
                  tote_id
                }
              }
            }
          }
        }
      }
    }
  }
}

Unfortunately not, we actually need the inverse (to get the order from the tote itself). So something like:

query{
  totes(id:"<tote id/barcode here>"){
    request_id
    complexity
    data{
            order{
                 id
                 ...
              }
         }
     }
}

We are essentially needing this because the user does not know what the order is when they are shipping the box; all they have is the tote id/barcode. In SH today, the user can scan this tote barcode and SH pulls in the necessary information to allow the user to ship the order.

Let me know if you need anything further on this.

3 Likes

Thank you for the clarification, I will look into it.

Checking in… any update on this topic?

I have it in for a feature request, apologies for the update delay. I do not have any new information. I will refresh this when I get more feedback.

Hi @bbeuerlein
You can access this information in the UI here: https://app.shiphero.com/dashboard/totes and in the bottom of the page, put in the tote and it will tell you all the orders that are in the tote. In order to go ahead with the request, I would need a use case for having this in the API.
What would be the use case for not using the UI?

Hi Theresa,

I’m not the original poster, but a use case for us is that we have users that aren’t always in a place where they can stop and go to the UI to look it up, but they have Slack on their tablets, so we wanted to build it into a slack bot so that they could request a tote ID (our user facing ID, like “Green-42”, not the internal ShipHero tote ID) and have it give them a list of what’s in it.

2 Likes

Thank you! I will post any new updates.

Hello!

I just wanted to check on the status of this request. I know it’s been more than a year since this has been updated, but we still have processes where it would be easier to script a way for the user to look up a tote via the API rather than sending them to a computer with the ShipHero UI.

Thanks,
Jeremy

1 Like

Hey @jeremyw,

I’ll go ahead and pass along your feedback to the team.

Thank you!

Best,
RayanP

1 Like

There is an endpoint already to query totes tote_history, but it’s not returning a lot:

and you also have to query it using a tote_uuid which is not really convenient.

On that note, tote_id is not consistent across the API sometimes it expects the tote_name, the tote_id, or the tote_uuid you have to try and error.

+1 for this feature request.

We would like to use the new inventory_transfer mutation to transfer all the items that were picked to a single location after a tote_cleared event. This will allow us to speed up the process of emptying totes after they were cleared and not have to put back items in each location right away without messing up the inventory.

But with the current API, I can’t see a way to trace down which locations were picked. We would like something exactly like this private API endpoint (located at https://app.shiphero.com/dashboard/totes):

Just add more queriable information to the tote_history endpoint maybe?

Thank you,

3 Likes

I was going to +1 this feature as well, but I might have found the solution.

I was desperately looking for ways to optimise our workaround for the lack of this feature, when I came across a (new?) query.

Unfortunately, there is not much documentation available on it outside the schema, so not entirely sure what the data returned is in fact meant to be, but after playing around with it a bit, I managed to integrate it into our workflow in a dev env. It seems to cover our use case perfectly!

Currently, it only filters by barcode but if you don’t routinely create new totes, you could keep a dictionary of all totes that are in use if you want to search by tote_id or tote_name.

An example query:

query {
  tote(barcode: "4*******0") {
    request_id
    complexity
    data {
      orders {
        order_number
        line_items {
          edges {
            node {
              sku
              quantity
            }
          }
        }
      }
      picks {
        sku
        quantity
      }
    }
  }
}

and response:

{
  "data": {
    "tote": {
      "request_id": "63987dd58817625211e2de09",
      "complexity": 102,
      "data": {
        "orders": [
          {
            "order_number": "T********5",
            "line_items": {
              "edges": [
                {
                  "node": {
                    "sku": "S*******1",
                    "quantity": 1
                  }
                },
                {
                  "node": {
                    "sku": "S******1",
                    "quantity": 1
                  }
                },
                {
                  "node": {
                    "sku": "T********4",
                    "quantity": 1
                  }
                }
              ]
            }
          }
        ],
        "picks": [
          {
            "sku": "T********4",
            "quantity": 1
          },
          {
            "sku": "S******1",
            "quantity": 1
          },
          {
            "sku": "S*******1",
            "quantity": 1
          }
        ]
      }
    }
  },
  "extensions": {
    "throttling": {
      "estimated_complexity": 102,
      "cost": 5,
      "cost_detail": {
        "tote": {
          "items_count": 4,
          "cost": 1,
          "total_cost": 5,
          "fields": {}
        }
      },
      "user_quota": {
        "credits_remaining": 1997,
        "max_available": 2002,
        "increment_rate": 30
      }
    }
  }
}

I hope this will be useful for others following this thread as well!

Could someone from ShipHero reading this forum confirm that this query is ready to be used in production?

1 Like

Hi @Gergely,

This is definitely new (or I didn’t refresh in a long time)!

Good catch and thanks for sharing!

Before:

After refreshing:

This will not solve my issue because the tote is already empty after a cleared_tote event but fantastic to see that shiphero is working on releasing new endpoints!

Thank you,