Hi, I am working with GrapQL API and can not find the field ‘active’ in product objects.
When I try to get all products from inventory, I also got ‘inactive’ products, which I don’t need. Because there is no active field, I can not filter them. How can I manage it ?
Hi @khanhnc46
I wasn’t able to find a workaround to it but already submitted a request for one of our engineers to work on this so we are able to filter if it is active or not.
I will let you know as soon as I have an update on this.
Thanks for catching this!,
Tom
Hi @khanhnc46
I apologize for the delay while working on this.
You should be able to query only for active products now. You will have to include a filter active: true
Something like this:
Hi @varun
The problem with that is that you might have a product Active in a warehouse and Inactive in the other, so that filter won’t work for that case.
That is why the filter is set at a warehouse_product level
Let me know if that doesn’t help
Thanks un advance!
Tom
Hi @tomasw
Unfortunately I can’t use warehouse_product query, because I need to filter products by customer_account_id request_id: 5f2bbc965130a97fad66166f
Hi @varun
I just logged a Feature Request for this, I will let you know as soon as I get a response about this from our engineers.
The request os to be able to query the warehouse_products and filter by active + customer_account_id that would work for you, right?
Because the products query might not be able to be filtered by active right away, so we could add the customer_account_id to the other query (warehouse_products)
Hi @tomasw
I’m still not sure if it will help me, because sometimes I also need to filter product by SKU, is it possible to filter by SKU in warehouse_products query?
Hi @varun
Added that to the request as well. The good news is that this has been approved. However, we are currently working on other tasks regarding the Public API, so it might not be available in the short term.
I will try to expedite and see if this can be added soon.
I will let you know as soon as I have an update about it.
Thanks again!
Tom
Hello @tomasw
Being able to filter by SKU on warehouse_products is also a requirement for my team. Do you have a visibility about this feature ? Thank you
Hi @PierreM
Welcome to the community!
I checked the progress of this feature and it seems to be almost ready to implement.
I contacted the Engineer for a better ETA and will let you know as soon as I get a response back.
Thanks for the patience while we work on this!
Tom