Functions in Query Rules

Yext Query Rules provide a powerful "if-this-then-that" framework that allows you to define certain actions that will be triggered in the presence of particular criteria. Leveraging Yext Functions as actions in Query Rules enables users to ask questions about ever-changing or user-specific data that typically isn't stored in your Knowledge Graph, but rather lives in external sources. How is this possible?

When developers use Yext Functions to write custom TypeScript functions as actions in Query Rules, their custom code runs when certain criteria are met. Then, developers can design custom frontend cards to display the data that gets fetched from external sources as direct answers. This way, they can integrate real time data from external APIs to power all sorts of amazing use cases in Answers. Check out some popular uses cases below:

{$headline}
Personalized User Data

Allow users who are logged in to their account to surface personal information about their account, user history, and membership plan. Help them take that next step with curated CTAs for each type of result.

Reservation Management

Allow users to track and manage their upcoming reservations with restaurants, hotels, airlines, and more all through search.

Package Tracking

Allow your retail customers to type in their tracking number or ask questions like, "where is my package?" and get accurate status updates from your delivery provider.

Stock Prices

Pull financial information like stock prices from Finance APIs and provide your users with a real-time snapshot of the market.

Outage Detection

Allow users to search for service outages in their area, and prompt them to report one if there is no record.

Want to become a Yext Expert?

Join Hitchhikers, the new Yext training platform and community, to test your knowledge, earn badges, and engage with the experts.
Create your free account
Environmental Image

One Platform. Unlimited Solutions.

A great search experience is key to a great brand experience — on and off your website. Answer customers' questions and convert more business across digital channels with AI\-powered marketing solutions from Yext.

Explore

Answer support questions before they become support tickets. Streamline the resolution process with Yext's modern, AI\-powered customer support solutions.

Explore

Create an intuitive ecommerce search and discovery experience so you can meet your customers with direct answers every step of the way. Streamline the digital customer journey and turn your website into a conversion engine with AI\-powered ecommerce solutions from Yext.

Create an intuitive ecommerce search and discovery experience so you can meet your customers with direct answers every step of the way.

Streamline the digital customer journey and turn your website into a conversion engine with AI-powered ecommerce solutions from Yext.

Employees need company information to do their jobs. Make it easy, fast, and fun to find with AI\-powered workplace search solutions from Yext.

Employees need company information to do their jobs. Make it easy, fast, and fun to find with AI-powered workplace search solutions from Yext.

Explore

Build on the Yext platform for a fully custom AI search experience — fast. With SDKs, APIs, and robust documentation, the Yext Answers platform provides the building blocks to create a bespoke search experience.

Build on the Yext platform for a fully custom AI search experience — fast. With SDKs, APIs, and robust documentation, the Yext Answers platform provides the building blocks to create a bespoke search experience.

Explore