
Text Team
Insights from Text
See what's new at Text. We share updates on how we help businesses turn customer conversations into revenue, qualified leads, and measurable growth.
Shoppers don’t always search using your catalog’s terms. They can get too many results or none at all, and even a good match can leave questions about details or availability.
You can upgrade that moment with Text AI Agent. Keep your store search, but add an AI path when the results page cannot finish the decision. The shopper’s query becomes the first message in the Text Chat Widget, and the AI Agent can use your connected product catalog to recommend real products in chat.
This guide shows the practical setup: connect the website widget, give Text AI Agent access to your products, choose the product-search moments that need AI help, send the shopper’s query into chat, and test the flow before you put it in front of customers.
What the upgraded product search experience does
Customers can browse your search results and seamlessly open a chat when they want help narrowing down their options.
A flow looks like this:
A shopper searches your store for a product or use case.
Your search page shows product results and an "Ask AI" action in high-intent moments.
When the shopper clicks it, your page sends the search query into the Text Chat Widget.
Text AI Agent uses your connected product catalog to recommend relevant products in chat.
The shopper can ask follow-up questions about the products.
That solves a product discovery problem: the shopper does not have to restart in chat and explain what they were trying to find. The search query carries the first piece of context with them.
Connect the Text pieces first
Before you connect store search to chat, make sure the Chat Widget is installed, AI Agent is configured, and your product catalog is connected.
Install the Text website widget
The Text website widget gives your store the chat layer that will handle the AI conversation. If your store runs on Shopify, use the Shopify widget setup. For a custom storefront, you can add the widget with an HTML snippet, Google Tag Manager, or a framework SDK.
Turn on Text AI Agent
Set up AI Agent with the tone, answer length, languages, and transfer settings that match your store. For this use case, the key skill is product recommendation.
Connect your product catalog
Text AI Agent can recommend real products when your catalog is connected. You can use a Shopify store, a Google Shopping XML feed, or the Product Directory API for custom stores. Text uses that catalog for product recommendations and can present matches as product cards in chat.
Choose the store search moments that need AI help
Add the AI path where the shopper has already shown intent and the result page may not be enough.
No results: “Ask AI to find a similar product.”
Too many results: “Ask AI to narrow this down.”
Filter-heavy searches: “Ask AI which option fits your needs.”
Product pages with sizing, compatibility, material, or bundle questions.
You can also offer an "Ask AI" button or link on the search results page so shoppers can ask for help choosing a product.
Turn the product search query into the first message
Text gives you two practical ways to control the Chat Widget from a page element.
For fixed elements, HTML attributes can send a predefined message when a shopper clicks a button, link, image, or banner.
<button
type="button"
data-text-action="send_message"
data-text-messageText="I need help choosing the right product"
>
Ask AI
</button>Read the shopper’s query when they click your button or link and pass it to the Chat Widget with the send_message method.
const askAiButton = document.querySelector("#ask-ai");
const storeSearchInput = document.querySelector("#store-search");
askAiButton.addEventListener("click", function () {
const query = storeSearchInput.value.trim();
if (!query) return;
LiveChatWidget.call("send_message", {
text: `Can you help me find a product that matches my search for “${query}”?`,
});
});Both approaches open the Chat Widget and send the message on the shopper’s behalf. If your store uses a pre-chat form, the message sends after the shopper submits it.
Give Text AI Agent the product data it needs
The first message starts the conversation. The catalog determines how useful the recommendation can be.
For product search, prioritize attributes shoppers actually use to decide:
category and use case
size, color, material, compatibility, and variant data
availability and price
product page URLs and images
clear product descriptions that explain who the product is for
For custom stores, Text’s Product Directory expects product fields such as title, description, URL, currency, categories, images, attributes, and variants. Meaningful attributes help the AI Agent find relevant products in your catalog.
Keep the conversation close to the product decision
The AI message should describe the shopper’s task, not just repeat a keyword. The more specific the first message, the easier it is for the AI Agent to help. You can also create different messages for different page elements.
For example:
Help me find a product that matches my search:
waterproof hiking shoesI'm looking for:
linen bedding with flower patternI tried searching for
compact sidebed table, but there were no results. Can you help?Tell me more about
SunDay UV50 Sunglasses, Red
Test the product-search flow
Test the experience like a shopper who does not know your catalog.
Search with vague terms, misspellings, and use cases.
Try no-result and too-many-result searches.
Check that the Chat Widget opens with the right query.
Ask the AI Agent to recommend a product for a specific use case.
Check whether product cards, variants, and add-to-cart paths work as expected for your setup.
After launch, review the questions shoppers bring into chat from search. If they often ask whether a particular product or variant is in stock, check that its availability is up to date in your catalog.