Screens
Let Rendel open screens of your own app: registerRoute, values that must come from your actions, and the console's Screens page.
Some answers end on a screen the user already has: the order, the subscription, the notification settings. Instead of describing how to get there, Rendel can offer it on a screens card, or on a button, and a tap opens it through your app's own navigation. Nothing is a web view and nothing new is built: you register a screen you already have, and say when it is the right one.
A screen is not an action. Opening it changes nothing, so it never needs a confirmation card; the user finishes whatever they came for on your own screen.
Registering a screen
Your agent registers a screen with registerRoute when you ask it to (Add a screen); the call is in the Flutter SDK and Web SDK references. A screen is:
name | snake_case, up to 64 characters. What the model and the console call it |
title | 1–60 characters, in your app's words. The card shows it under the item's own name, so where a tap goes is on the card before it is tapped |
description | Up to 300 characters, telling the model when this is the right screen. Write it like an action's description |
params | Up to 8, each string, number or boolean, with description, required and fromActions |
open | Your navigation call. It gets the params the server checked |
An app registers up to 50 screens. Both calls are safe before init; screens travel in the manifest with your actions. While your screen shows, Rendel waits in a small bubble in the corner (bubbleOffset keeps it above your own bottom bar), and a tap on the bubble brings the answer back as it was.
Prefer screens that already have a route or a deep link, and skip dialogs, onboarding and sign-in. A screen the user would never ask for by name is noise in the model's choices.
Register the screen where each of your actions' results shows up too: the item's own page, or the tab of the person's profile that lists what they made. After an action publishes, sends or changes something, Rendel opens that screen, never the one for making another. A tab is a screen of its own, or a param of its screen's route.
fromActions: values the model cannot invent
A param marked fromActions: true must equal a value one of your actions returned in this conversation. The order id that opens order_detail has to have come back from get_order or list_orders first. An id the model made up, read in a knowledge source or heard from the user does not open the screen, and the card falls back to its text.
Use it for every param that identifies something: an order, a booking, an account, an amount. Leave it off for values that are safe whatever they are, such as a settings tab name.
Before a reply leaves the server, every navigate in it is checked against your registered screens: the screen must exist, its params must be the ones it declares, of their types, the required ones present, and the fromActions ones traceable to an action result. See Values the server checks.
The Screens page
The console's Screens page lists what your app registers, from its latest build:
- Registered: in the latest build, with the title, description and params as the build describes them. A param marked from an action says so.
- Planned, not registered yet: screens a setup agent said it wrote in code, which no build has registered so far. They move up once a build that registers them runs. If one stays here, the
registerRoutecall is not running at startup. - Not in your latest build: an earlier build registered these and the latest does not. Devices still on that build can open them.
How often a screen is opened
The Screens page counts opens: a user tapping a screen card, or any control in an answer that opens one of your registered routes, and the route opening. Each screen shows how many times it was opened, from how many of the answers that offered it (the share), and when last, on the key the header is set to, over the last 30 days. Under that, how often the assistant offered it and how often the server refused one it asked for.
An open is sent by the SDK (Flutter 0.46.5, web 0.23.6 and later) with the route's name, the answer and the card it came from, nothing about what the screen showed. Opens are visible to every member; offers, which are read from the answers, only to roles that read conversations.
The screen a question is asked on
Rendel also knows where the person is when they ask, so "what is this?" is answered about the screen in front of them. Every device sends the screens it shows by name, with ids taken out (/orders/:id): the web SDK reads the page by itself, and a Flutter app adds Rendel.navigatorObserver to its navigator. Each question carries its screen, Rendel reads the few before it, and Analytics › Explore › Events lists the screens people see most, each by the title it was registered with, with the questions asked on each. See Web and Flutter.
Turning a screen off
Each registered screen has a switch. Turn it off and Rendel stops offering that screen at once, on every build, with no release. Your app is unchanged: people can still open the screen themselves. Turn it back on the same way.
It is the same idea as disabling an action: what your code registers is the most Rendel may do, and the console can narrow it at any time.
Trying one
Ask for it, on the Test page or in a paired build: "show me my last order" should come back with the order's card. If Rendel answers in words instead, sharpen the screen's description — say when it is the right screen, in the words your users use.