I am working on a solution to the following for someone:
"One of the biggest issues is that you’re not able to Receive product into inventory unless it was part of a purchase order generated in the system, but having to upload manual CSVs for all the stocking POs.
Supposedly, you’re to be able to add a webhook to the Ultimate Purchase Orders shopify app that can be used with a ShipHero API in order to somewhat automatically send these purchase orders to the ShipHero system."
The person relayed that their ShipHero implementation team mentioned to possibly having use an intermediary like make.com to make sure that the data is translated or assigned correctly.
From tinkering around in make.com, the ShipHero module does not have an easy way to do this. Closest way is the GraphQL option. Is that limited to queries or can mutations be done?
If mutations are allowed, then I have some questions from reviewing the api doc for purchase_order_create:
Is warehouse_id required and if so, where do I obtain it? Not sure if they’re appending the warehouse id to the export, if that’s a selection during the import process, or sets it to that behind the scenes when the data is imported.
Is vendor_id required and if so, how do I obtain that? In the Ultimate export it lists it as Supplier, but I was told they use that for Vendor. I haven’t witnessed the importing process so haven’t seen how this gets handled.
The GraphQL option in Make.com does allow for mutations, so triggering it with a webhook would be a good option for you. For the purchase_order_create mutation the warehouse_id is a required field in the call, and can be obtained using account query and including warehouses in the result. The vendor_id is not a required input and if left blank the field will read “multiple vendors” in the UI. If you want to find the vendor_id for a given vendor you can do this in a similar manner by users the vendors query and matching the name value with the id value.
I found the account query and experimented in Altair. I see it returning multiple lists of warehouses. Is there a way to limit it down to choose one. With the vendor one is there a way to filter down by name similar to filtering of sku for products?
How does the CSV import feature in ShipHero, determine which warehouse to use for that?
The purchase order import menu in Shiphero has a dropdown menu to select the warehouse. The queries for vendors and accounts don’t currently have any optional arguments to use for filtering the requests in the way you are suggesting, you would need to perform those filters in whatever endpoint you are using to receive the webhook. Make.com has several such tools you could use to select the values you need to pass into the mutation.
From what I was told this is what data they are passing during the import:
PO Number
Vendor
SKU
Quantity
Kinda curious how they’re reconciling the Vendor, as that is just their name and not it’s id in their CSV file. From looking at the purchase create mutation only see the ID.
So with the endpoint, the idea is it’s going to get triggered by the Ultimate Shipping App in shopify. So am restricted a bit in what I can pass along to Make. Searching for the vendor won’t seem to be an issue, I think. The only sticking point is the warehouse since that can be selectable.