Search records by tote ID/barcode

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