Home » Shopify Apps » How to Use SavedSearch Query in Shopify to Apply Search in the Admin

How to Use SavedSearch Query in Shopify to Apply Search in the Admin

Introduction

A saved search is a representation of a search query saved in the Shopify admin search. One helpful tool is the Shopify SavedSearch feature, which lets you save commonly used search criteria. This makes it easier to filter and find specific products or customers.

Shopify search queries are made simpler with the Shopify search functionality provided by the platform. Shopify provides an API that allows developers to interact with various parts of the platform programmatically. The SavedSearch application in Shopify admin is available through the Shopify search API with the Admin GraphQL API, which lets you access and use saved searches in your applications or custom integrations. You can access your saved searches from the sidebar in the respective section (Products, Customers, or Orders).

Creating a Saved Search in Shopify

savedSearchCreate:

The savedSearchCreate mutation allows you to create a new saved search in Shopify admin query.

Request :

savedsearch-1

Input :

Response :

savedsearch-3
savedsearch-4

Updating a Saved Search in Shopify

savedSearchUpdate: 

Updates a saved search.

The provided mutation example updates an existing saved search in Shopify using the savedSearchUpdate mutation. This is part of the SavedSearch guide for Shopify for developers looking to implement Admin search filters in Shopify.

Request :

savedsearch-5

Input :

Response :

savedsearch-7
savedsearch-8

Updates the Saved Search: This mutation changes the saved search with the ID 2672130392277 to have a new name “Test” and a new Shopify search query that filters products by their handle containing “OSC”.

Deleting a Saved Search in Shopify

savedSearchDelete: 

Delete a saved search.

The provided mutation is used to delete a saved search in Shopify using the savedSearchDelete mutation.

Request :

savedsearch-5

Input :

savedsearch-9

Response :

savedsearch-10
savedsearch-11

Deletes the Saved Search: This mutation deletes the saved search associated with the specified ID. Once executed, the saved search with ID 672130392277 will be permanently removed from the Shopify admin query.

Retrieving Product Saved Searches in Shopify

Returns a list of the shop’s product saved searches.

The productSavedSearches query in Shopify’s Admin GraphQL API returns a list of saved product searches in your store. These saved searches let you quickly filter and find products based on criteria you’ve set up before, such as Shopify search syntax or shopify collection filter code.

Request:

savedsearch-12
savedsearch-13

Retrieving Products Using SavedSearch Criteria

The provided GraphQL query retrieves a list of products in Shopify that match the criteria of a specific saved search, leveraging Shopify search & discovery capabilities. This allows you to find products based on various criteria, including shopify search products and shopify all products url.

Request :

savedsearch-14

Response :

savedsearch-15
savedsearch-17

Conclusion

Saved Searches in Shopify help you manage your store more easily. You can create and use saved searches to quickly find products, customers, or orders based on certain criteria. When used with the Shopify Admin API, saved searches can also help automate tasks, making store management more efficient. By using SavedSearch in Shopify, you can enhance your SavedSearch application in Shopify admin to better utilize Shopify search products and other features.

Looking for custom Shopify app development? We can develop the ideal app for your store. Contact us to get started!

Leave A Comment