Skip to main content
Version: Next

Actions

An action is a function that users start with a button on an entity. Example: entities of the type Address have the button Stamp, which sends the address to a service that prints a stamp.

Background and API details are in Actions & Hooks.

What an Action Runs​

An action runs one of two kinds of operation:

KindMenu entryWhat it does
Script (executable_script)Administration → Behaviors → Actions › ScriptsA Lua script that runs inside EP. It can read and change entities; all changes are saved together.
Webhook (service_function)Administration → Behaviors → Actions › WebhooksCalls an external service at the address in endpoint.

Create the script or webhook on its search page with the + button, like any entity. Scripts are edited with the same Lua editor as key and label scripts.

Add an Action to an Entity Type​

Example: how the Stamp action is attached to Address.

  1. Open the entity type Address and switch to the tab Actions.

  2. Click Link existing and select the operation — here the webhook print_stamp.

  3. Fill in the Relationship Properties:

    FieldExampleNotes
    nameprint_stampRequired, unique within the type. Name of the action in the API.
    labelStamp / BriefmarkeRequired. Text of the button, per language.
    descriptionDescription of the action.
    iconLucide:QrCodeIcon of the button. Without an icon, is shown.
  4. Click Submit.

Actions tab of Address The action print_stamp on the tab Actions of the entity type Address

New addresses show the button at once. Existing addresses show it after their upgrade.

How the Button Appears​

Address with the Stamp button An address with the Stamp button in the header — and the orange Upgrade Entity Type button, because the type has changed since (style Classic; in the style Modern it is in a blue banner above the header)

  • On the overview page of the entity, in the action buttons of the header — after Merge into … and before the graph button. The button shows the icon and the label. It has no tooltip.
  • In the right-click menu of a row on the search page, below a separator.

Several actions appear in the order of their relationships. There are no settings for the order, for conditions under which an action is visible, or for a confirmation prompt. The button is disabled during time travel and while the action is running. A read-only lifecycle status does not disable it.

Actions are not inherited by child types, in contrast to hooks.

Input and Output Masks​

An action can show a dialog before it runs (to ask for input) and after it ran (to show the result). Build these dialogs in the Mask Designer: choose the entity type and the action, then the phase pre or post.

The input mask (pre) shows the hint Fill in the values and submit to run the action. Nothing is saved before that.

  • The values are not saved before the user submits the mask. Cancel changes nothing.
  • Required fields block submission: the message Fill in the required fields first. lists the missing fields.

Results​

What users see after the action depends on what the operation returns:

ResultDisplay
HTML tableDialog Action Result and the message Action completed
PDF or imageDialog Result
FileDownload
Text or JSONMessage
result, infos, warnings, errorsOne message each

If the action refuses to run — a business refusal, not a technical failure — users see the message of the action instead of a technical error.

After a successful action, the overview page reloads.

Testing

There is no separate test run. Try the action on a test entity of the type.