Managing Views
Views control where your knowledge content appears. Each view maps to a page or section in your application. When a user visits a page, Appilot detects the current view and delivers the relevant knowledge entries, controls, forms, and tools.
Accessing Views
Navigate to Apps → [Your App] → [Domain] → Views in the Backoffice.
Understanding the Views table
| Column | Description |
|---|---|
| Name | The view's display name |
| Path | Hierarchical path used for inheritance and linking |
| Detection | Icons for the configured detection rules (URL, DOM, page title, SDK) and the rule count |
| Content | Number of knowledge entries linked to this view |
| Last detected | When the runtime last matched this view in the wild (useful to spot stale or broken detection rules) |
Click a row to open the view editor.
Creating a view
- Click New view on the Views page
- Fill in the required fields:
- Name: a descriptive name (e.g. "User Registration")
- Path: hierarchical path used for inheritance and for the runtime to address this view (e.g.
zufi/online-services) - Description: free-text context the assistant reads to understand the view
- The view is created. Open it to configure detection rules and link knowledge entries.
Views are the only page detection and placement model. Link knowledge, controls, forms, and tools to view paths.
Detection rules
Detection rules tell Appilot how to recognise when a user is on a specific view. A view can have multiple rules; the first match wins, so combine rules to provide fallback coverage.
Prefer URL when your app exposes one. Open the page you want to register in a normal browser tab and look at the URL. If it changes when you navigate between the views you want to distinguish, write a URL rule. DOM rules are reserved for views the URL cannot tell apart (sub-tabs, sidebars opened inside a page, single-URL apps like Vaadin Flow). Many "SPA" frameworks (Vue Router, React Router, Nextcloud's Vue 3 router) update the URL on every navigation, so "it's a SPA" is not a reason to skip URL detection.
URL detection
Best for any application whose URL changes between views, which is the majority of modern web apps, including most SPAs.
Example: pattern **/apps/files/** detects the Nextcloud Files app across any subfolder or filter. Pattern /settings/profile detects the profile settings page.
DOM detection
Best for views the URL cannot distinguish: a sidebar or sub-tab opened inside the same page, or a legacy single-URL SPA (Vaadin Flow, applet-style apps) where the framework never updates the URL.
Configuration:
- CSS selector: target element (e.g.
h1.page-title,section[aria-label="Sharing"]) - Read mode:
innerTextreads visible text,textContentreads raw text including hidden nodes,getAttributereads an element attribute (combine with the attribute name) - Expected value: the text or attribute value that identifies this view
Tips:
- Open the page in DevTools and confirm the URL doesn't already give you the answer before reaching for DOM
- Use stable selectors (IDs, data attributes, ARIA labels) over CSS classes that may change
- Test selectors in browser DevTools:
document.querySelector('your-selector') - If you find yourself trying to assert "this element just exists" by checking its
id, switch to URL detection. That's a sign you reached for DOM when URL would have worked.
Page title detection
Useful when the document title is the most stable signal (some legacy admin tools).
SDK detection
Best when you control the application code and can report context directly.
Your application calls the Appilot SDK to report the current view path. See Views & Detection Rules for technical details.
Linking knowledge to views
Each view can have multiple knowledge entries linked to it:
- Open a view from the Views table
- Scroll to the Linked content section
- Click Add content to link existing knowledge entries, or create new ones from the Knowledge page using this view as a prefilled target
Knowledge entries inherit through the path hierarchy: content linked to zufi/ appears on all child views like zufi/online-services.
Content scoping
Knowledge entries have a scope that determines when they appear. Only these three scopes are valid:
| Scope | Appears on |
|---|---|
| Domain Global | All pages on the domain |
| App Global | All domains in the application |
| Page | Only the views explicitly linked from the entry's Views tab |
Use the Views tab on a page-scoped entry to link it to the views where it should appear.
Knowledge entry statuses
| Status | Meaning |
|---|---|
| Draft | Being written, not visible to end users |
| In Review | Ready for review, not yet published |
| Published | Live, visible to end users through the assistant |
Only Published entries are delivered to users by the AI assistant.
How views relate to controls, forms, and tools
Views are the common addressing layer for every other content primitive:
- Controls with
scope=viewcarry aview_path. They are listed under the matching view card in the Controls page. - Forms declare one or more
view_paths; the assistant emits transitions between them in fill order. - Tools with a
view_idare only offered when that view is active.
This is why the Backoffice groups Controls and Tools by view: it mirrors the model the runtime uses to decide what is reachable.
Best practices
- Start broad, then refine: Create domain-wide content first, then add view-specific details.
- Use meaningful paths: Paths like
zufi/online-services/neware clearer thanpage1/sub2. - Monitor detection health: Use the Last detected column to spot rules that no longer match (a long gap is a red flag).
- Test detection rules: Use the extension on the target page to verify detection works before publishing dependent content.
- One topic per entry: One knowledge entry per topic is easier to maintain than one large entry covering everything.
Related
- Knowledge Management: Create and manage knowledge entries.
- Managing Controls: Register the UI elements the assistant can reference.
- Managing Forms: Compose controls into fillable structures.
- Domain Configuration: Register and configure domains.