Boost Shopify Product Search Rankings Using Metafields in Search & Discovery

6 min setup
No coding required
Runs automatically

Enhance your product visibility in Shopify search results by using existing metafields to power the “Search & Discovery Boost Keywords” feature. This MESA workflow template triggers when a product is updated, retrieves specified metafield values, and adds them to the product’s Boost list if not empty. Automate search optimization and improve product discoverability without manual updates.

Shopify logo icon
Product Updated
Retrieve "Search Boost" Metafield
Add New Value To List Of Boosts
Shopify logo icon
Update Search Boost Metafield

You're in good company

"MESA has been a game changer for us. And, if you ever get stuck, their support team is always super helpful."

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
PetFriendly

"It's like Zapier but exactly designed for Shopify. I have been able to complete all the workflows that I've needed."

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
Zailys

"The MESA team has been amazing at helping us set up our automations. We would highly recommend this app!"

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
Rothy's

How it works

6 steps to automatically push your custom keywords into Shopify's Search & Discovery app every time a product is updated

Shopify logo icon

Product Updated

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: This is what starts the workflow. Without it, nothing runs — every other step depends on the product data this trigger captures and passes forward.

This step watches your Shopify store for any product update and kicks off the workflow the moment one is detected. It captures the full product record, including the product ID that every subsequent step needs to locate the right metafields. No configuration is required — the trigger fires automatically on every product save, whether you're editing a title, price, description, or anything else. If you only want it to fire for specific products, you can add a filter step after this one.

Retrieve Product Metafield

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step fetches the boost keywords you've stored on the product — it's the source of truth for what terms you want to add to Search & Discovery. Without it, the workflow has no new keywords to work with.

This step looks up a specific metafield on the updated product using the namespace custom and the key boost_keywords. That metafield is where you store the search terms you want this product to rank for — for example, a list like ["waterproof jacket", "rain gear", "outdoor coat"]. If the metafield doesn't exist yet on a product, this step will return an empty value, which the next step will catch. You'll need to make sure this metafield exists on your products before the workflow can do anything useful — you can add it directly in the Shopify product editor under "Metafields."

If Value Isn't Empty (Filter)

App connector: Filter • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step acts as a gatekeeper. If a product has no boost keywords stored, there's nothing to add — this filter stops the workflow early so you don't accidentally overwrite or corrupt your existing Search & Discovery data with a blank value.

This filter checks whether the boost_keywords metafield retrieved in the previous step actually contains a value. If it's empty, the workflow stops here and no changes are made to the product. If it contains keywords, the workflow continues to the next step. No configuration is needed — the filter is already set up to check for an empty value. This is especially useful for stores with large product catalogs where only some products have boost keywords defined.

Retrieve "Search Boost" Metafield

App connector: Shopify • Time to complete: 1 minute
Why this matters: Before adding new keywords, the workflow needs to know what's already in Search & Discovery — otherwise you'd overwrite existing boosts every time a product is saved. This step fetches the current list so the next step can merge old and new together.

This step reads the existing search boost data from Shopify's native Search & Discovery metafield, stored under the namespace shopify--discovery--product_search_boost and the key queries. This is the same metafield that Shopify's Search & Discovery app reads when ranking products in search results. The value is a list of search terms already associated with this product. This step runs automatically and requires no configuration — the namespace and key are fixed values defined by Shopify.

Add New Value To List Of Boosts

App connector: Transform • Time to complete: 1 minute
Why this matters: This is where the actual merging happens. It combines your new custom keywords with the existing Search & Discovery boosts into a single, deduplicated list — so nothing gets lost and nothing gets repeated.

This step runs a custom JavaScript script that takes the existing boost terms from Step 4 and the new keywords from Step 2, combines them into one list, removes any duplicates, and filters out blank entries. The result is a clean, comma-separated string ready to be written back to Shopify. No configuration is needed — the logic runs automatically. Here's the full script for reference:

const Mesa = require('vendor/Mesa.js');

module.exports = new class {
  script = (payload, context) => {
    const vars = context.steps;

    // Parse existing boost values from Retrieve Search Boost Metafield step
    let boostValues = (JSON.parse(vars.shopify_2.value) || [])
      .map(v => String(v).trim());

    // Parse new boost values from Retrieve Product Metafield step
    let newValues = (JSON.parse(vars.shopify_1.value) || [])
      .map(v => String(v).trim());

    // Combine, deduplicate, and filter empty strings
    boostValues.push(...newValues);
    boostValues = [...new Set(boostValues)].filter(Boolean);

    // Pass comma-separated result to the next step
    Mesa.output.next(boostValues.join(', '));
  }
}
Shopify logo icon

Update Search Boost Metafield

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: This is the step that actually changes what Shopify sees. Without it, all the merging and deduplication in the previous step would produce a result that goes nowhere.

This step writes the combined keyword list back to the product's Search & Discovery metafield — the same one Shopify's search algorithm reads when ranking results. It targets the shopify--discovery--product_search_boost namespace and queries key, and stores the value as a list of single-line text entries. This runs automatically using the output from the previous step, so no configuration is required. Once this step completes, your product's search boost terms are live and Shopify's Search & Discovery app will reflect the update.

Ready to set this up? It only takes 6 minutes.

Our support team will even help you personalize this workflow for free.

Get started →

Make it your own!

Customize this workflow even further:

Filter by product type or tag
Add a filter step right after the trigger to only run this workflow on specific products — for example, only products tagged "seasonal" or belonging to a certain collection. This keeps your boost keywords targeted and prevents the workflow from touching products that don't need it.
Remove outdated search terms automatically
Create a separate scheduled workflow that reviews search boost metafields and removes terms that haven't resulted in conversions over a set time period, keeping your boost list focused on effective keywords.
Notify your team when boosts are updated
Connect a Slack or email step at the end of the workflow to send a confirmation whenever a product's search boosts are successfully updated. Include the product name and the full list of active boost terms so your merchandising team always knows what's live.
Log every boost update to a table
Add a MESA Data table step at the end to record each update — including the product ID, the keywords added, and a timestamp. Over time, this gives you a searchable history of every boost change made across your catalog, useful for audits or performance analysis.

Common questions

What types of search terms work best for boosting?

Will this remove existing search boost terms I've manually added?

Can I use this workflow to boost multiple search terms at once?

What happens if a keyword already exists in the Search & Discovery boost list — will it get added twice?

Do I need the Shopify Search & Discovery app installed for this workflow to work?

Where do I add the boost_keywords metafield to my products?

Ready to automatically push your custom keywords into Shopify's Search & Discovery app every time a product is updated?

7-day free trial • 6 min setup • Cancel anytime

Need help? Our automation experts will help you personalize this workflow for free. Contact support