We are a 3PL and I’m working on creating an App to automatically pull orders to our WMS, confirm fulfillment and then update inventory quantities. Building a Fulfilment Service seems like the best option.
I have successfully Created a Fulfillment Service
My Location displays under App Locations
I am able to assign inventory to my App Location
I create a test order and it is assigned to my App Location
I never Receive fulfillment requests to the URL i configured.
I used GraphQL to request the first 10 assignedFulfillmentOrders and my order did not display.
If I go back to the Order, I can select “Request Fulfillment” and then my order moves to In Progress. If I request the assignedFulfillmentOrders via API, the order now displays.
Is there a way to automate this without affecting other locations?
If I go to Settings > General > Order Processing, I can update the account to “Automatically fulfill the order’s line items”. When I do this, it automatically does the step above, which is what I want. The problem is that my customer has other locations that are not App Locations and it automatically fulfills them. I do not want this.
Hi @MonicaG10
the logistics apis can be a bit byzantine so off the top of my head you’ll probably have to go through fulfillmentOrderSubmitFulfillmentRequest - GraphQL Admin and or need to either use:
assignedFulfillmentOrders > FULFILLMENT_UNSUBMITTED to get the locations orders
or also need to be an order management app??
Also recheck the docs and look over the fulfillment status labrythn map; or print it out even.
Note that shop.assignedFulfillmentOrders was deprecated to QueryRoot.assignedFulfillmentOrders
Alternatives to automate fulfillment requests
In some cases Fulfillment constraints may be applicable
Or set the merchant up with a automation using flow in shopify-flow(free app) to set fulfillment status for orders that meet the criteria; there is an app integration for flow
Or other automation apps like mechanic e.g. https://tasks.mechanic.dev/?q=auto-fulfill
If this doesn’t move the project forward I’d cross post this on the dev forums ,
Hi @MonicaG10 - you’re on the right track integrating as a fulfillment service. But you’ve hit a common pitfall with the “Automatically fulfill the orders line items” being too simplistic and applying to all locations.
Couple of ways I’ve seen 3PLs get around this:
- Webhook approach - You can listen to the
fulfillment_orders/order_routing_complete webhook, then call the fulfillmentOrderSubmitFulfillmentRequest mutation yourself to mimic the flow. The webhook should fire when it’s assigned even before it’s requested
- Shopify Flow - Similar to what Paul suggested above, you could use the “Fulfillment order ready to fulfill” trigger, add a condition for your location, and then “Submit fulfillment request.” Downside is this only works for Shopify Plus
Another thought. You said the orders didn’t return when you called assignedFulfillmentOrders. I’ve seen the API act funny some times when you rely on the default filters. Try adding the FULFILLMENT_UNSUBMITTED status filter explicitly and it might show up in the query. Hope this helps