Skip to main content

Actions

Introduction

Actions within Actional buttons in FlowAgent are dynamic sets of tasks triggered based on specific conditions. These actions automate processes, manipulate data, and guide user interaction within the application. This document offers an overview of actions in Actional buttons, detailing their structure and interaction with other components.

tip

For an in-depth guide on the syntax, types, and advanced configurations of actions, please refer to the comprehensive Actions Documentation.

Purpose of Actions in Actional buttons

Actions in Actional buttons are designed to:

  1. Automate Tasks: Execute tasks like CRUD operations automatically, enhancing efficiency in data management.
  2. Enhance User Interaction: Trigger forms and display notifications, ensuring a responsive and engaging user experience.
  3. Streamline Workflows: Seamlessly integrate with system workflows, triggering necessary actions in response to user interactions with Actional buttons.

JSON Configuration

Actions are consists of conditions (if) and the tasks to be executed (then). JSON Actions are a standard concept in the Flow Platform and are used also in Forms. Below we will show what actions can be performed for Actional Buttons.

PropertyTypeDescription
crudobjectPerform CRUD operations like insert, update, relate, and delete. See CRUD Operations
showFormobjectShow a form to the user. See Show Form Action
showRelevantFormsobjectShow relevant forms to the user. See Show Relevant Forms Action
sendToastobjectSend a toast message to the user. See Send Toast Action
webhookobjectCall an external webhook. See Webhook Action
openLocationobjectOpen a location in a new window. See Open Location Action
sendEmailobjectSend an email to a user. See Send Email Action

Examples

Example 1: Perform CRUD Operations

{
"actions": [
{
"name": "Add New Customer",
"if": [
["customerName", "=", "John"]
],
"then": {
"crud": {
"insert": {
"customer": {
"moduleid": 50,
"moduleitemtype_id": "111",
"customfield": {
"cf100": "[post.name]",
"cf101": "[post.phonenumber]",
"cf102": "[post.email]",
"cf103": "[post.role]",
"cf104": "blue"
}
}
}
}
}
}
]
}