Buttons & Actions

A button on a page is not just decoration — it is an action. For every portal button, what happens on click is known in advance. There are four kinds of actions in total, and the agent picks the right one when assembling the page.

The four kinds of actions

  • Link — opens an external address on the internet.
  • A step inside the portal — opens another page within the portal, without leaving it.
  • A request to the agent — sends the AI agent a ready-made request on your behalf.
  • Script — runs a calculating program on the server, and its answer drives the screen.

Link

The simplest action: a click opens the given address — your site, another service, a file to download. When useful, the link opens in a new tab so the visitor does not lose the current portal page. The button label is set by the agent.

A step inside the portal

The button leads to another portal page — for example, from a news card into the news item itself. The address is given as a path inside the portal, and variable values are substituted into it automatically. That is why the same button on a sample page leads to different addresses depending on which page the reader has opened. Details are in the Templates & Variables section.

A request to the agent

This kind of button spares the reader from typing the same requests over and over. The agent records the needed request in advance, and a click sends it straight to the chat on the clicker’s behalf — for example “add the quarterly plan” or “recalculate the estimate from this data”. The chat panel opens and the request goes out with no further steps.

Sometimes the other variant is handier: the request text is only placed into the input field and waits for the person to extend or correct it. That is also configured at assembly time.

Script

The most powerful action: a click runs a small program on the server. The program can reach into your system and bring back an answer, and the answer drives the screen. Four reactions are possible:

  • a message — a toast about success, an error or an important remark;
  • a refresh of blocks — one block or the whole page recalculates with the new data;
  • a redirect — another portal page or an external address opens;
  • a file download — the browser receives a file the script assembled.

When the script returns a human-readable error — “enter a valid email”, say — the reader sees exactly that, not a dry technical message.

Confirmation before an action

For any action except a plain link, a confirmation question can be set: first a question like “Submit the request?” appears, and the action fires only after consent. Useful where a click is hard to undo — submitting a form or a request, for example.

How many buttons fit

A block holds up to three buttons — if the agent adds more, the structure check warns it about that. A carousel can have its own buttons on every slide: “Read” on the first slide, “Sign up” on the second. More about checks is in the Page Validation section.

There are no dead buttons

A button appears on the page only when its handler exists. If a button points to a script that is not there, or a request action is configured with no agent connected, the button simply does not render. The reader never stumbles onto an element that does nothing.

Next: what can be substituted into a redirect path — in the Templates & Variables section; how forms with submission work — in Forms; how data for an action is computed — in Scripts & Dependencies.

← Back to the documentation index