screens
Screens of your app to open from the answer, from the routes you registered.
Where to finish the job. screens offers one to four screens of your own app: the order, the delivery settings, the payment form. Each card names the thing the way the user knows it ("Order #4821") and, under it, the screen's own title as you registered it, so where a tap goes is on the card before it is tapped.
A tap opens the screen through your app's own navigation, and the assistant shrinks into a small bubble in the corner; a tap on the bubble brings the answer back exactly as it was. The first card is also drawn lit beside the microphone.
Re-rendered in the browser from the SDK’s own scales. Not a screenshot.
Offered only to an app that registers routes (registerRoute in the SDK), and only to a build that carries out a navigate. The model sees the routes, their titles and their params; it never sees the code that opens them.
What the server checks
Before the block leaves, every navigate in it is checked against your routes: the route has to be one you registered, the params the ones it declares, of their types, the required ones present. A param you mark fromActions has to equal a field one of your actions returned in this conversation, so an order id, an amount or an IBAN the model made up, or read in the knowledge base, does not open the screen. A block that fails is shown as its fallback_text.
Props
Every block also carries type and a required fallback_text of 1 to 300 characters.
| Prop | Type | Required | Constraints |
|---|---|---|---|
items | array | Yes | 1 to 4 entries. |
items[].title | string | Yes | 1 to 80 characters. |
items[].icon | string | No | Up to 40 characters. |
items[].action | object | Yes | None |
items[].action.kind | string | Yes | None |
items[].action.route | string | Yes | 1 to 64 characters. |
items[].action.params | object | No | None |
On the wire
{
"id": "blk_52",
"type": "screens",
"fallback_text": "Open order 4821 in the app.",
"props": {
"items": [
{
"title": "Order #4821",
"icon": "package",
"action": { "kind": "navigate", "route": "order_detail", "params": { "order_id": "4821" } }
}
]
}
}Accessibility
Each card is announced by its title and the screen's title. The bubble is a button labelled "Back to the assistant".