Filtering public lists in useProductLists

Hi all,
Is there a way to filter only productLists that are public? According to the documentation the publicId field on the lists is <string | null>, but it seems, that private lists also come with a publicId that is not null.

Hey!

No there’s not currently a way for you to detect this from the minis sdk. I raised a ticket to get this added (internal id #89428).

It would help if you could explain a bit more about your use case for this and I’ll try to get this added.

Hi Steve thanks for your reply, but this is solved for me. It looked to me like “private” Lists would not be shareable, which is not the case. They are just not publicly listed and searchable, right?

Best, Dave

I think they would not be shareable, I believe if a different Shop user tried to load a private list by it’s id it would fail. I would be interested to know if this was not how it works though

Hi @steve-t-shopify You are right, private Lists are not accessible by other people, although they might have a publicId.

Also lists cannot be filtered by public or not and when programmatically creating a ProductList we can only create private Lists.
That currently breaks a key user flow for the mini we want to create.
Are there plans to change that?

Best, Dave

I’ve updated the ticket that is tracking this with the various issues you raised - It’s on our radar to fix but I don’t have a timeframe for that I’m afraid

Hey Dave,

Thanks for the feedback on this. We don’t support creating public lists or filtering by visibility right now.

In the meantime, you can handle this by prompting users to manually toggle their list to public in Shop’s native UI, then returning to the Mini to share.

We’ve noted this as a feature request for a future SDK update. Thanks for the feedback.

Hi @dave1 - wanted to follow up here with some updates from our most recent January Change Log.

The new privacyStatus field has been added to the ProductList type, which lets you check if a list is PUBLIC or PRIVATE. You can now filter your product lists based on this new field to get only public lists. The update also includes new actions like setProductListVisibility to programmatically toggle list visibility, and you can even set the privacy status when creating lists using the optional privacyStatus parameter in addProductList.

Hope this helps, and let me know if you have any questions going through!