> To build a Wix site agentically, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/business-management/dashboard/back-office-search/sample-flows.md

## Article Content:

# Back Office Search API: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

## Add dashboard search to a custom dashboard

A custom dashboard can offer the same search as the site's own dashboard, so users find tools, apps, help articles and business data without leaving your page.

To add dashboard search to a custom dashboard:

1. When the user stops typing a term of at least 2 characters, call [Search](https://dev.wix.com/docs/api-reference/business-management/dashboard/back-office-search/search.md) with the term in `searchTerm`.
1. Show each returned section in the order it comes back, with `displayName` as its heading and its `items` below it. When `pagingMetadata.hasNext` is `true`, show the count as more than `pagingMetadata.count`, for example `50+`.
1. For each section with an `allResultsPage`, show a link that opens it: `page` is a dashboard page and `url` opens in a new tab. Use `allResultsPage.label` as the link text, or the section's `displayName` when no label is returned.
1. When the user clicks a result, run its `actions` in order. Open a page or URL right away, and continue after a modal only when it closes successfully.
1. When the user settles on the term, call [Add Recent Search](https://dev.wix.com/docs/api-reference/business-management/dashboard/back-office-search/add-recent-search.md) with it, so it's offered the next time they search.

## Offer the user's recent searches

Showing the terms a user searched for before helps them repeat a search without typing it again.

To offer the user's recent searches:

1. When the user opens the search box, call [Get Recent Searches](https://dev.wix.com/docs/api-reference/business-management/dashboard/back-office-search/get-recent-searches.md) and show `searchTerms`, newest first.
1. When the user picks a term, call [Search](https://dev.wix.com/docs/api-reference/business-management/dashboard/back-office-search/search.md) with it.
1. When the user edits a term you added in the same session into a new one, call [Add Recent Search](https://dev.wix.com/docs/api-reference/business-management/dashboard/back-office-search/add-recent-search.md) with the new term in `searchTerm` and the earlier one in `replacedSearchTerm`, so the list doesn't keep both.
1. When the user chooses to clear their history, call [Clear Recent Searches](https://dev.wix.com/docs/api-reference/business-management/dashboard/back-office-search/clear-recent-searches.md).