Introduction
FlowOn API provides a suite of predefined actions that allow seamless interaction with data entities and business processes within Dynamics 365 and FlowOn For Dynamics. These actions are fundamental building blocks that enable users to perform essential CRUD (Create, Read, Update, Delete) operations, manage file uploads and downloads, and execute both entity-specific and cross-entity processes. Each action type is designed to fulfill a distinct role within the API, and they can be tailored to fit various business logic scenarios.
Each FlowOn API action includes a set of configuration options, allowing for detailed customization. These configurations define key aspects such as the action’s input and output parameters, data retrieval methods, authorization requirements, and any preconditions that need to be met for the action to execute successfully. This flexible approach ensures that the API actions can be adapted to a wide range of workflows, supporting complex business requirements without the need for custom development.
Action Types
| Action Type | Description |
|---|---|
| Create Action | Used to create new records for a specific entity. |
| Update Action | Allows updating existing records in an entity. |
| Read Action | Retrieves and returns entity data. |
| Delete Action | Deletes records from an entity. |
| Upload Action | Facilitates file uploads to a designated entity. |
| Download Action | Allows file downloads from a specific entity. |
| Local Process Action | A process action that is tied to a specific entity. |
| Global Process Action | A process action that works across multiple entities. |
Action Configuration
Each action is structured into various configurations to define its functionality and behavior. Below is an explanation of the configurations available for all or specific actions.
1. Definition
This is where the action’s name is defined, giving it a unique identifier within the module. For the Upload Action, additional fields like attachment name, max file size, accepted file extensions, and whether multiple file uploads are allowed are also defined.
Figure 1: Action Definition
2. Inputs
Applicable to Query, Process, Create, and Update actions.
Here, you define the inputs required for the action. These inputs can be properties from an entity or specific values that the action needs to process.
Figure 2: Action Inputs
3. Data Fetcher
This section defines the queries that will fetch specific records for the action. The fetched data can be used as input or for further processing within the action.
Figure 3: Action Data Fetcher
4. Access Control
In this section, you configure the authorization policies for the action to control who can access or execute it. The available options include:
- Demand Authenticated User: Requires the user to be authenticated.
- Demand User Role: Restricts access based on user roles.
- Demand All: Requires all listed policies to be met.
- Demand Any: Requires at least one policy to be met.
- Demand Anonymous User: Allows anonymous access without authentication.
Figure 4: Action Access Control
5. PreCondition
Allows you to define pre-conditions that must be satisfied before the action is executed. If a pre-condition is not met, an error code and a corresponding error message can be defined to handle the failure gracefully.
Figure 5: Action PreCondition
6. Entity
Used in Create, Update, and Read actions to map inputs and outputs to entity properties.
- Create and Update Actions: The inputs defined in the Input Section are mapped to entity properties.
- Read Action: Specifies which properties to return as the output.
Figure 6: Action Entity
7. Process Action
Applicable only to Local and Global Process Actions.
This section allows you to select the desired process action from Dynamics 365.
You can map the inputs to the process action’s requirements and define the expected outputs based on the process action's logic.
8. Upload-Specific Configuration
In addition to the Definition Section, the Upload Action requires specific configurations:
- Attachment Name: Defines the label for the uploaded file.
- Max File Size: Sets the maximum allowable size for an uploaded file.
- Accepted Extensions: Specifies the file types that are permitted.
- Allow Multiple: Determines whether multiple files can be uploaded in a single request.
Figure 7: Action Upload Configuration
Conclusion
FlowOn API offers a flexible set of actions that simplify interaction with Dynamics 365 entities and processes. With customizable configurations, users can easily adapt these actions to meet various business needs, streamlining data management and process automation without the need for custom code.