-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating Fulfillments #142
Comments
Did you register a Fulfillment Service? If you did then the service can manage inventory and we'll fetch the updated quantities every hour. For the tracking numbers after your service has marked the fulfillment as complete we'll contact the service every hour for a week until we get tracking numbers. Otherwise if you aren't using the Fulfillment Service API (or even if you are) you can make PUT requests to the fulfillment endpoint and update the fulfillment manually. Would this work or is there a problem with the gem code to actually do this? |
Hi, I figured out the Fulfillment Service this morning. I installed one, and it showed up in the merchants fulfillment dropdown. That is all good. I made the endpoint needed and am just waiting for the merchant to test that out. In the meantime, I do not see any way the current Gem can update a fulfillment. That leaves a big hole in it. And with the Fulfillment Service polling I still see another problem. You poll once an hour and provide an order ID. I can reply with a tracking number. But very often the fulfillment company is providing a Shopify OrderID, and more specifically, they provide a tracking number WITH a line item ID and a quantity. It seems there is no capacity to match at this time. I can only provide a gross answer of this Order has a tracking number. And what about more than one? Does the polling by Shopify gobble up an answer like {"123456789": ["TZR1234455", "YTR613647734"]} or does that kill it? |
You should be able to use the Fulfillment object in the gem to make a PUT request, it won't show the methods because they are all inherited from active resource. Let us know if you are able to get that working. |
I did this.
That gave me a fulfillment object. I set the tracking number via f.tracking_number = "abcfoobizzbaz" That is an update. Unfortunately it did nothing... I notice there was an array attribute tracking_numbers, but I did not set that. Setting notify_customer=true did work and sent a notification with no tracking number... so I stopped there... what do you advise for this? |
yes we deprecated tracking number in favour of tracking_numbers I am not sure 100% why right now and I think we still haven't fully deprecated it. Sorry for the confusion, just set your tracking number as the only element of the array |
Ok.. will do. Thanks. Is there an answer to the question of how you deal with partial fulfillments? If I get a tracking number for line item ####### and a quantity of 2, when the original order was fulfilled by the merchant... will that update somehow allow me to update the 2/3 as a partial fulfillment? It seems most of the fulfillment updating is centred around an Order and not a line item. |
An order can have multiple fulfillments - the line items are divided by the fulfillment service. I totally understand why it seems that it is centered around orders but it is really centered around line item groupings. I'm not 100% sure that I am clear on your exact situation though. |
I will try and make it clear. Customer Orders
Fulfillment company ships the yellow t-shirt on Monday, with a tracking number "Hubba" I get the order ID, the line item ID of the Yellow t-shirt, and a quantity of 1 Now on Tuesday I get new information. The fulfillment company sends me this:
First off.... can I present that to the Fulfillment Service API polling endpoint or is that not going to work since it expects ONLY an order ID and a tracking number? If I decide to do the fulfillment myself... can I update the individual line items with a save? I suppose so eh? So really, I am better off not using the fulfillment service endpoint? |
When an order is fulfilled on shopify we create a fulfillment for each grouping of line items. The idea is that fulfillment services subscribe to the fulfillment/create webhook and then filter on their endpoint whether or not they need to do anything based on the service name. As far as partial fulfillments go yeah the API isn't really set up for them. You can update the fulfillment as you go but only set the status to complete once it is completely fulfilled. It sounds like what you are trying to do is in fact more complicated than the standard idea that we created the end point for but you can always augment with direct API calls to the fulfillment itself. I would recommend to keep using the service because that adds the UI element for the merchant but it sounds like you will need to make your backend more complicated and make some additional calls to the fulfilment object itself. Does that sound right? Can we close this issue? |
Makes sense. Thanks so much for all this. Indeed I learned a lot of new tricks here, and it works for me now, hence the clients are going to be happy. Close it! |
I am having a tough time with this. Client does a partial using Shopify. I capture that request and submit it to the shipper, and they ship the order and provide tracking numbers. I set the fulfillment correctly and it sits in a pending state... nothing is updated in Shopify. The only way to force the tracking numbers on the partial is to close the fulfillment. That screws up Shopify as now the merchant can no longer fulfill their remaining partial. This is chaos.... needs a fix... I now have really grumpy customers. The only way to do partials is wait till their are ALL shipped, and then complete the order... the time between partials thus is time that tracking numbers cannot be communicated. That is not ideal. |
so if I am understanding the issue correctly you are unable to add a tracking number while in the pending state? like it just won't actually save it? Maybe we need a |
Here is a short list of problems: Merchant used Shopify to partially fulfill an order (2 line items, 1 fully, 1 partially) and left another untouched. I received two tracking numbers, one for each fulfillment, and I received a quantity and line item ID of the proper fulfillments. I updated the Fulfillment record to have 2 tracking numbers, notify the customer and the quantities fulfilled. Result: A fulfillment record with status pending, 2 line items marked partial and one stayed at nil. PROBLEMS Merchant had no idea of this. Saving the record DOES NOT update Shopify Admin. Customer did not receive any tracking numbers. I decided to complete the fulfillment to see what that does. It completed the order. The order was partially fulfilled. The merchant could no longer do anything to fulfillments. One tracking number was assigned to both fulfillments, and that was that. I then manually fulfilled the rest of the order with the API since the merchant could not. How do you handle multiple Tracking Numbers? Pretty crazy stuff going on... here... :) |
we're doing our best to understand exactly what is going on - can I bug you to add some screenshots or a screencast of exactly what the fulfillment looks like before you've touched it with the API. That way we can get to the same state and try and figure out what to do. This is the state I am talking about:
|
An Order has 3 Line Items (I will just include the ID and Quantity values here... ) Merchant uses Shopify to: fulfill sku AAA, quantity = 1, sku BBB, quantity = 1 Shipper does just that. Returns to the App: Now the Fulfillment is PENDING. YAY! However, Shopify Admin shows NOTHING has been done. No tracking numbers. No fulfillments. Only the underlying API view of the Fulfillment shows anything. So now... I waited... and waited... and the customer wanted to see something... So I completed the fulfillment. And then MAGIC. One tracking number of the two was issued to both line items. The merchant could see the partial fulfillments and was happy. But, the merchant could no longer do anything to the remaining fulfillments. Is that clearer... if not, PLEASE CALL ME TO DISCUSS. I know everything about this issue. |
Okay I am seeing 2 issues that need to be addressed from this, let me know if I have this right:
|
Yes. When you save changes to a pending fulfillment, the Shopify Admin fails to reflect the changes. When providing more than one tracking number for an update to a fulfillment, there is no way to match the tracking number to the item, and it seems Shopify just uses the first one in the list for the entire update. |
Hi. So this client is very antsy... a lot of things are riding on having partials work right. Any chance of a contact and discussion to where this is all at? |
I worked through this flow today and here is what I found: Issue 1
Issue 2This one is a bit more complicated. First I'd like to bring up an important point that comes from the coupling of orders and fulfillments - Orders can be partially fulfilled but fulfillments cannot be partially completed at this time, there is no state for this. What this means is that if the merchant partially or completely fulfills an order the fulfillment service can only Anyways for the main point, when you Are you experiencing any other functional issues with multiple tracking numbers? The data is in tact but its possible that some other systems might just pull the first one like the admin UI does. Basically everything is working only our fulfillment UI doesn't handle these more rare cases very well. Issues have been created and we'll get to work on it! |
Thanks for the update! |
Hey there! I just wanted to let you know that a fix went out today so that multiple tracking numbers will now be displayed and can be edited in the admin, in the order history. |
Excellent. That is a good thing. Next up. Fixing it so that updates to pending fulfillments update the UI in the admin too. Customers do need their tracking numbers in a timely fashion... |
Did you know that when a merchant uses the admin to create a pending fulfillment, there is no way for them to cancel it? It can be cancelled using the API and a POST call, but there is no complement to that in the admin UI. |
yup we're aware |
Hi, Client is asking if Shopify has fixed this bug/feature with partial fulfillments. Is there anything new to report since August 26th on this. It is important they get some idea of the progress here. |
Bumps [sorbet-runtime](https://github.com/sorbet/sorbet) from 0.5.9531 to 0.5.9542. - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Hi,
I have a cycle to complete. Merchant is fulfilling orders using a custom fulfillment service. The act of fulfilling triggers a webhook to the fulfillment centre where they take some time to fulfill and generate a tracking number.
I need to update the existing fulfillment to reflect the tracking number and quantities actually fulfilled.
There is no way to do this with the API gem code? How does one update existing fulfillments?
The text was updated successfully, but these errors were encountered: