> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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/dashboard-favorite-list/sample-flows.md

## Article Content:

# Sample Flow

This article presents a sample use case your service might support. You are not limited to this exact flow, but it can serve as a good starting point to help you plan your service's implementation.

## Provide quick access to a nested dashboard page

A Wix app provides a service that includes multiple [dashboard page extensions](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/dashboard-extensions/about-dashboard-extensions.md), some nested in others.

To increase app usage and allow the user to quickly access its main features, add an **Add to Favorites** / **Delete From Favorites** button to its main dashboard pages:

1. Add an **Add to Favorites** button to your app's [dashboard pages](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/dashboard-extensions/about-dashboard-extensions.md). To create an intuitive user experience, consider using the [Wix Design System](https://dev.wix.com/docs/build-apps/develop-your-app/design/about-the-wix-design-system.md).
2. When the user clicks the button on one of the pages, your app sends that page's details to the [Add User Favorite](https://dev.wix.com/docs/rest/business-management/dashboard/dashboard-favorite-list/add-user-favorite.md) endpoint. Make sure to [include the page ID](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/dashboard-extensions/find-a-dashboard-extension-id.md#extension-types-and-their-ids) and optional navigation parameters. You can also add a custom page title that appears in the UI:

    The request body looks like this:

    ```json
      "favorite": {
          "pageId": "3893d33b-9fm4-474b-80b0-dd7c32e20bfc",
          "relativeUrl": "/limited-edition/analytics",
          "title": "Limited Edition Products Analytics"
      }
    ```

    The endpoint creates a favorite page with the dashboard page's details, adds it to the list, and responds with the updated list of favorite dashboard pages. The response looks like this:

    ```json
    {
      "favoriteList": {
        "id": "b8216af7-cf7c-4860-8014-54e4824a1745",
        "revision": "2",
        "createdDate": "2024-05-19T13:05:45.684Z",
        "updatedDate": "2024-05-20T14:46:50.126Z",
        "favorites": [
          {
            "id": "cc5a0ad9-dbc8-4139-b4e2-3c59678a7d77",
            "pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
            "title": "Existing favorite page"
          },
          {
            "id": "10b007d6-1d67-4deb-9adf-32813f580bab", // The ID of the favorite page created
            "pageId": "3893d33b-9fm4-474b-80b0-dd7c32e20bfc",
            "relativeUrl": "/limited-edition/analytics",
            "title": "Limited Edition Products Analytics"
          }
        ]
      }
    }
    ```

3. Your app might now replace the **Add to Favorites** button with a **Remove from Favorites** button. When the user clicks it, your app calls the [Delete User Favorite](https://dev.wix.com/docs/rest/business-management/dashboard/dashboard-favorite-list/delete-user-favorite.md) endpoint with the favorite `id` appended to the endpoint base URL: `https://www.wixapis.com/dashboard/v1/user-favorite-list/delete-favorite/10b007d6-1d67-4deb-9adf-32813f580bab`

    The endpoint removes the page from the list of favorites and returns the updated list. The response looks like this:

    ```json
    {
      "favoriteList": {
        "id": "b8216af7-cf7c-4860-8014-54e4824a1745",
        "revision": "3",
        "createdDate": "2024-05-21T13:05:45.684Z",
        "updatedDate": "2024-05-22T14:46:50.126Z",
        "favorites": [
          {
            "id": "cc5a0ad9-dbc8-4139-b4e2-3c59678a7d77",
            "pageId": "3893d33b-24a1-474b-80b0-dd7c32e20bfb",
            "title": "Existing favorite page"
          }
        ]
      }
    }
    ```