Shopify search results for mobile app include products not visible on "mobile" channel

First of all, thank you for great service.
I’m a mobile app developer and I’m using AlgoliaSearch-Client-Swift to perform searching on products in my client’s Shopify store.
Search works perfectly except one thing – Algolia returns products that are marked as “not visible” for the mobile channel on Shopify. I’ve reviewed filtering options in mobile SDK and index creation options in Shopify admin, but have not found any way to filter out this kind of products.
Is there a way to make Algolia respect visibility status for the product? Am I missing something?

Sincerely,
Vladimir.

Hi Vladimir,

First, thanks a lot for your feedback!

About your issue, as of now, you’re right, we only index the products visibility in the Online Store sales channel.
That’s something we can definitely improve, and I’ll make sure to work on it next Monday !

Best,

Hi Vladimir,

There seems to unfortunately be no solution at the moment to this issue.
The issue is that Shopify’s API doesn’t return the visibility of products for any other channel than the Online store.
There’s a thread in Shopify forums ( https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/published_scope-doesn-t-display-correct-channels-web-global-or-mobile-273520 ) that dates from 2015 promising a fix, but that’s unfortunately all I could find about this subject.

A not clean solution would be to add a tag for those and using this tag in the mobile application as an exclude.
The good thing here is that it’s fairly easy to do in Shopify. Head to Products > Filter > Visibility > Hidden in mobile store > Bulk actions > Add tags and add for instance an algolia-mobile-ignore tag.
The bad part is that if you’re using the online store Algolia integration too, if you don’t want to have this tag displayed in the Online store version of your shop, you’ll probably have to remove tags from the active facets (or do some custom front-end code to hide it).

Best,

1 Like