Core concepts
A few ideas run through every part of Shoof AI. Once they click, the rest of the docs read quickly.
Workspaces and apps
Section titled “Workspaces and apps”Your account belongs to a workspace, which holds your plan, billing and usage. A workspace has one or more apps.
An app is one search index with its own settings, synonyms, rules, keys and analytics. Most people create one app per website. Create separate apps for separate sites, or for a staging copy of a site, so they never share records.
Each app has:
- a name, which you can change;
- an application ID, made from the name when the app is created (“Ali Sport
Goods” becomes
ali-sport-goods, orali-sport-goods-2if that’s taken). A name with too few Latin letters or digits, such as an Arabic name, gets a random ID. The ID never changes, because API paths, the widget and the WordPress plugin all use it; - a platform (WooCommerce, WordPress, Shopify or Custom / API), which picks sensible defaults such as the facets a blog or a store shows. Connecting the WordPress plugin sets it to WooCommerce for a shop and WordPress otherwise;
- a region, where its records and events are stored.
Records
Section titled “Records”A record is one searchable item in one language: a product, a post, a page,
a help article. It has an id, a type and a title, plus whichever of the
built-in fields fit (content, price, brand, categories, image, URL and so on)
and any custom fields you declare.
Translations are separate records linked by a group_id, so an English and an
Arabic product page are two records with the same group_id. Searches return
records in the visitor’s language.
Sending a record with an existing id replaces it. See Records
for the full format.
Every API request carries a key. There are three kinds:
| Key | Prefix | Can | Use it in |
|---|---|---|---|
| Search key | shf_pub_ |
Search, autocomplete, answers, recommendations, events | Browsers, mobile apps, anywhere |
| Admin key | shf_adm_ |
Everything a search key can, plus indexing and configuration | Your server only |
| Secured key | shf_sec_ |
What a search key can, limited to the filters it carries, until it expires | Browsers, one per user or session |
Search keys can be restricted to your own domains. Secured keys are signed by your server, so you can give each user a key that only sees what they’re allowed to. See API keys and Secured keys.
Regions
Section titled “Regions”An app’s region is where its index, events and learned signals are stored. You pick it when you create the app, and it can’t change. See Regions and data residency.
Search, then events
Section titled “Search, then events”Each search returns a queryId. When a visitor clicks a result, adds it to
their cart or buys it, you send an event with that queryId. Events power:
- analytics: click-through and revenue from search;
- click-learned ranking: results visitors pick rise;
- trending items and searches;
- products bought together.
Events carry a userToken, an anonymous ID for the visitor that you choose.
The widget and the JavaScript client create one for you. See Events.
Plans, features and toggles
Section titled “Plans, features and toggles”Your workspace’s plan sets quotas (apps, records, searches and AI answers a month) and which features are included.
Each app also has a toggle per feature (AI answers, click-learned ranking, trending, bought together, related items). A feature runs only when the plan includes it and the app’s toggle is on. For a site that only wants search, turn every toggle off with Search only in the dashboard: no AI button in the widget, and no calls to the language model.
Settings, synonyms and rules
Section titled “Settings, synonyms and rules”Each app’s relevance is shaped by three things you configure in the dashboard or through the API:
- Settings: field weights, facets, ranking signals, recency, typo tolerance, languages and feature toggles.
- Synonyms: words that should find each other.
- Rules: per-query merchandising, such as pinning a product or showing a banner.
Every change to these, and to keys and apps, is recorded in the Activity log with who made it.