API call for partial orders through SendPro

We are using ShipHero for inventory management and SendPro for shipping. We have a custom integration in place for this. The issue we are having is specifically with orders that need to be divided into multiple shipments. For example, if an order has an item on backorder and an item in stock. We fulfill the in stock item, which works fine. But when we later scan the backorder item for fulfillment it brings the already fulfilled item into the shipping system. We need a JSON element returned in the API response that would indicate an item has been shipped already.

Hey @aperkins,

Thanks for reaching out.
Would you mind providing an example request id/order id of the instance you’re mentioning?

Let me know if there’s anything I can do to assist.

Best,

Hey @aperkins,

Would you also mind elaborating on the workflow here if possible? Trying to completely understand what is required here.

Let me know if you have any questions or concerns.

Best,
RayanP

Hi Rayan,

Thanks for your reply.

For the workflow that uses the query in my inititial post, we are picking and packing using ShipHero. When an order is packed and ready for shipment, we generate a generic shipping label. That label is scanned into SendPro, which triggers that query. Once the shipment in ShipHero is complete we have a second connector with Shopify that updates the order, marking items as fulfilled and attaching the tracking code.

An example of an order with the issue we are having is 22158-M. This order has six items. You may note that five were packed on Jan. 9 and scanned into SendPro. One item was on backorder and was not picked or packed that day. However, when the label was scanned on the 9th, it brought all six items into SendPro. Since the backordered item was listed as not fulfillible, it did not fulfill the item (item 11876), which is correct. That item was packed, scanned on Jan. 13. Again, it brought in all order items into SendPro, even though we just needed to ship the one. We shipped the single item, however, we cannot get Shopify to update with tracking. It seems to think everything has already shipped from the first round.

There is a lag time between when items are marked as fulfilled in ShipHero (when the label is generated), and when it is updated in Shopify (when it is shipped through SendPro). We need some identifier to filter items that have already been fulfilled in a partial order scenario like this. I hope this helps!

1 Like

@Rayanp I should add that this would be resolved if we can figure out how to isolate each generic label to include only the items from an order that were packed in that session. Any assistance would be appreciated!

Hey @aperkins,

Thank you for the additional information. I’ll update you as soon as I can.
Let me know if there’s anything I can do to assist in the meantime.

Best,
RayanP

Hey @aperkins

Thanks for hanging in there!

Checking the calls made I can see SendPro is using the orders query when scanning. Would adding the shipments field to that query, stop the issue when scanning that pulls in all the line items?

Also the delay when when generating a label in ShipHero and and it’s update time in Shopify is intended. This occurs when using the generic label and it takes 30 minutes.

Let me know if there’s anything I can assist with.

Best,
RayanP

Hey @Rayanp

Thanks for this, and just trying to wrap my head around your suggestion. Would you be able to send an example of the shipments field in the query?

Thanks again!
Andrew

Hey @aperkins,

Sure thing! The idea here is that the line item information is pulled from the shipments filed, as this field will only show the line items that have been shipped. It shouldn’t show the backordered item in your example.

Example query:

{
  orders(order_number: "string") {
    request_id
    complexity
    data(first: 1) {
      edges {
        node {
          id
          shipments {
            id
            line_items(first: 5) {
              edges {
                node {
                  id
                  line_item_id
                  quantity
                }
              }
            }
          }
        }
      }
    }
  }
}

Let me know if this was clear!

Best,
RayanP

Hi RayanP,

The shipment query doesn’t appear to give us any of the order/address information to update Shopify. Are you suggesting that we use a combination of shipment and order query?

Hey @aperkins,

Thanks for hanging in there!

Yes! I believe using the orders query to get all the fields that were being used while also adding in the shipments field to pull the line items that were actually shipped would work.

Please let me know if you have any questions or concerns.

Best,
RayanP