Actions
What is an Action?¶
Action is a response or a reaction to a trigger event. It is an activity that you perform in response to a trigger event. In the application integration context, an action can be an API call or a task performed on an application using data or characteristics of the trigger event.
In the example below, you can see the action to send an email upon an incident update in ServiceNow. In this case, the action is "Sending an email" and the trigger is an "Incident Updated" in ServiceNow.
Every ecosystem contains a set of actions that you can use while building a workflow. You can add as many actions from as many ecosystems as you wish in a single flow.
Action has the following elements that you can configure while defining it:
- Execution Condition: Allows you to define 'If-then-else' or 'Conditional logic'.
- Data Mapping and Transformation - You can map and transform data as you perform an API call or an activity on the target system.
Execution Condition¶
Once you select the ecosystem that you want to perform the Action on, you will navigate to the "Action Execution" page. This page will let you set up the conditions that will select a particular trigger event based on its characteristics to be processed by the Action node.
This function is similar to the Event Filter where you choose what trigger events will be processed by your workflow. However, the Action execution condition lets you further zoom in to the events that you want to be processed by this particular Action.
For example, assume that you have set up the event filter in ServiceNow trigger to select only the newly created incidents with category "Software" and you want to send an email for "High" urgency incidents while a Microsoft Team message for a "Medium" urgency incidents. In this case, you will set up two Actions with the following execution conditions as shown below:
-
Outlook Action to send an email notification if the incident event is "High" urgency
-
Microsoft Team Action to send a message if the incident event is "Medium" urgency
Data Mapping and Transformation¶
Data mapping and transformation is at the heart of the workflow design. Data transformation allows you to map, transform, and manipulate data elements from the incoming trigger event to the outgoing actions that make an API call or perform an operation on the target application.
As you see in the picture below, there are two sections highlighted by red and green color:
- The area highlighted in red is the "Trigger data" available for you to drag and drop to your Conditionals.
- The area highlighted in green has the Action fields to which data needs to be mapped. It also has the data "Mapping and Transformation" capabilities to manipulate trigger data as well as your own input data to generate the final value for the corresponding Action data elements.
- Connect iPaaS being targeted at business users or citizen integrators provides hundreds of "Excel Style Functions" for data mapping and transformations on the toolbar starting with "fx".
Evaluate¶
In the data mapping and transformation, sometime you will encounter scenarios that require selection of a value from the choice of available valid values. Instead of using or hardcoding one of the predefined values, you might want to dynamically derive the valid value at runtime using the data elements from the trigger event.
To achieve dynamic derivation for action fields with predefined valid values, Connect iPaaS provides a feature called "Evaluate". There is a checkbox next to the Action fields dropdown called "Evaluate". Once you click this checkbox, a text box will pop up and replace the dropdown bar. You can then drag and drop one of the trigger data elements, put a value or a constant of your choice, or use complex transformation using excel style functions.
In Figure 5 below, you can see how the Evaluate checkbox looks when there is a dropdown bar in the field mapping.
Once you click the "Evaluate" checkbox, you can derive the value with fixed text and/or trigger data elements as shown in Figure 6 below.