CF 2.0 API add fullfilment status to order
Roberto Lopez
CF 2.0 API Orders do not have a property to tell us the fulfillment status.
D
David Lamoureux (Product Support Analyst)
Merged in a post:
CF 2.0 Api: Add fulfillment Id to Order response
Eric Shanks
It would be great if when fetching an existing order, if the Fulfilment id(s), or some indication of no attached fulfillment object to the order, would be in the order response.
D
David Lamoureux (Product Support Analyst)
Hey Eric Shanks Thank you for your feedback and adding this request. That's a great suggestion! We'll be sure to keep this open for our dev team for review.
Eric Shanks
Hi Hugh, thanks for the response.
- When I have an order that is fulfilled on another site, outside of clickfunnels, I want to be able to fetch and update the fulfillment status of that order. I understand that the fulfillment object is separated from the order object, but if I only have the response details from the order object I want to be able to update that order's fulfillment status/ fulfillment object. If there is a way of connecting the orders object to its fulfillment object that I have missed, please let me know.
- The information that is currently being stored in the fulfillment object such as status, tracking number, tracking code, shipping provider, etc are all great, I just need to be able to access and update this information given the order object response information.
- From querying the list fulfillment api call: "https://myworkspace.myclickfunnels.com/api/v2/workspaces/id/fulfillments, there seems to be no default fulfillment object attached to my order objects. I am assuming if I use the "pay invoice" button in clickfunnels that it will then create a fulfillment object attached to the order, but if the order is not fulfilled on clickfunnels, I need a way of checking the fulfillment status / fulfillment object. I am expecting frequent orders that will be fulfilled outside of clickfunnels.
Please let me know if this answers your questions, or if I am missing a way to connect these objects.
Thanks,
Eric
Rich Steinmetz (ClickFunnels Engineering)
Hey Eric Shanks,
Thanks you for sharing your thoughts on this! I understand that you need a way to get from an order to its fulfillments.
The crucial aspect to mention here is that an order does not have fulfillments in ClickFunnels per se. Instead, the order's invoice line items are fulfilled.
So there most probably won't be a direct connection from Orders to Fulfillments any time soon, since this would require a big remodeling.
That being said, a way of achieving what you want at the moment would be:
- Store all the fulfillments on your side first (maybe you are doing it already?).
- When you receive the order, make a request to the Orders::Invoice Fetch Order endpoint to get the invoice.
- Get the invoices line item IDs.
- Get all fulfillments from your stored fulfillments that match the invoices line item IDs.
If instead of working with orders here, you could switch to invoices, you would have one API call less to make.
We are now also thinking about adding fulfillments data to the invoice like this:
// Orders::Invoice resource 👇
{
"id": 123,
...
"line_items": {
...
"fulfillments": [
{
"id": 33,
"status": "fulfilled", // Or cancelled.
...
},
...
]
}
}
By doing that or allowing filtering by invoices line item ID on the Fulfillments list endpoint, you would not have to keep track of fulfillments on your side necessarily.
Hope that helps!
H
Hugh (Product Support Manager)
Hey Eric Shanks, thanks for your feedback! I have a few more questions for you:
- Can you provide a use case or scenario where having the Fulfilment id(s) in the order response would be beneficial?
- Are there specific data points within the Fulfilment id(s) that you are particularly interested in?
- How frequently do you encounter orders without an attached fulfillment object?
Rich Steinmetz (ClickFunnels Engineering)
Hey, Roberto Lopez. You are right; the Orders resource does not currently support calculating the fulfillment status on the fly. You could calculate the status on your side by getting the fulfillment_status value from all Orders::Invoices::LineItems. If it's true for every line item and every invoice of the order, then the order would be considered fulfilled.
Ben Jackson
Rich Steinmetz (ClickFunnels Engineering): Is there a way to set the fulfillment status by API?
Rich Steinmetz (ClickFunnels Engineering)
Hey Ben Jackson: Currently not, since it's calculated on the fly in CF, but I will double-check the feasibility of this.
Ben Jackson
Rich Steinmetz (ClickFunnels Engineering): It would be really useful for products which are sold through CF but fulfilled by an external supplier. For example, my supplier ships my CF orders and I want the order to update with the tracking number they provide. This would be easy to do if there was an endpoint to update the fulfillment status for line items.
Rich Steinmetz (ClickFunnels Engineering)
Ben Jackson: That makes a lot of sense! This is doable, but the Fulfillments API is not available yet.