SmartIQ Actions incorporate the ability to pass eForm data and generated documents to third-party systems, data stores or trigger specific events based on business rules. SmartIQ includes several Actions that covers the majority of everyday tasks.
If for any reason the required event is not covered by the Out of the Box Actions, please check our Ecosystem.
Here a simple guide that explains how to add and configure Actions in SmartIQ.
Create or open an existing project in Design.
Ensure 'Action' is available in the toolbox.
- There are two ways to add an action to your project:
- Click Action and drag onto the Finish page in the 'Question set'.
- Select Finish in the 'Question set' and double click Action in the Toolbox.
- Adding Actions to Workflow Transitions
- The 'Select Action' window will display.
- By default, SmartIQ adds the following actions:
- Add Message to Management Console
- Call SQL Stored Procedure
- Copy Project Results to SQL
- Data Parse
- Data Store Delete Selected Rows Action
- Display Message
- Form Summary
- PDF Stitch
- Post to Webhook
- Push Notification
- Save to Oracle Database
- Send Email
- Sent to REST Service
- Set Project Property
- SmartIQ API
- SmartIQ User
- Writable Data Object Overrride
Drag and drop an action from the list on the Finish page.
The action you selected will now be added to the Finish page. The added action can now be configured by adding the parameters in Design.
Retry On Failure
Clicking Retry On Failure checkbox allows user to specify the number of retries and wait between retries.
Actions can only be added to the 'Finish' page in the design window, an action can also be added to a transition in a workflow. (refer to How to add actions to workflow transitions article).
You can have more than one of the same action type on the Finish Page of a project.
If your action is a Finish action (it was added to the 'Finish' page), the form will always finish before that action runs. If the form is expected to finish when the call is successful, a run action button can be used. For more information see Run Action Button.
Because Actions run after the project answers have been saved, Actions cannot be used in workflow transitions to update project properties.
Actions can be added to transitions in a workflow, for this you will need to know how SmartIQ Workflow works. For more information see Workflows.
Open a project with a valid workflow in design.
Click the Workflow button.
Select a transition.
Click the Actions button.
The Actions list will pop up.
- Drag and drop the action you would like to add to the transition. In this example, we are using the Redirect action. The action will now be added in between the state that transition was going to.
- Click to select the Redirect action.
- Once configured, this action will occur on transition from
SmartIQ allows for the creation of nested actions which can reference the output value of the parent action. A nested action can reference that newly created ID and run another action. An action can only be the child of another action if the parent is a repeater.
The following example shows how to create a [Send Email] action nested with a Save to SharePoint Document Library action. The goal is to save files to document library and nesting an email action which sends email notifications containing the location to different users.
- Create a repeating section File Saver with a text field for entering the document save location.
- Create a text field for entering the email addresses of the receivers.
- Add a Save to SharePoint Document Library action and set the following properties:
When adding a nested action, the parent action needs to be a valid repeating action.
- Drag and drop a new action to the parent action and click OK. A confirmation message appears:
- Click OK. The Send Email action will be nested on the Save to SharePoint Document Library action.
- Save the project.
You can trigger generated documents on your action(s). This is useful for those situations when specific actions generate specific documents.
This example will demonstrate how to set up a project that has generated documents.
In Design, create a new project.
Add another Word template.
Change the name of both document templates to
Add an email action to the Finish page.
Configure the Send email action.
Select the Send Email action and select the Documents tab on the right hand of the screen.
Within the Action Documents screen, select the Custom option and from the 'Document' drop-down menu select
Doc1then click Add.
Once the project has been run (generated) in Produce, Doc1 will be sent to the email address configured in the email action.
Designers can also specify the order of documents.
Files that have been uploaded to the form can be sent via actions to other systems as action documents. Each action document format can can have different formats in Design.
There are different formats available for the type of document selected. If the format selected is Default/None, the document will be generated in the default format selected in the publish options in Manage. By choosing other formats, the documents are generated accordingly to the selected format, for example, Microsoft Word Docx/Docm.
For both a word and PowerPoint template, the populated formats are similar to the ones in Manage > Publish project page.
Additionally, attaching images provides the ability to:
- Display a preview of the image in the form after it has been uploaded, wherein a document file would not.
- Allow the user to rotate the image.
- Maintain separate versions of the original and edited files.
- Include/exclude the edited/original files as custom action documents.
Once a document and format are selected, the List view will display both of these in two separate columns. A selected document and format cannot be selected more than once. Otherwise, the Add button will get disabled.
When the project is executed in Produce and if specific documents have been selected, the document will only be sent to the action in that format.
The action document format works for both Project Level Actions and Transition Actions.
The ‘Run/Show Action When’ attribute allows the user to specify if, and when, they would like the action to run or show.
This option can be found in the Properties tab of the action:
|Always||If this option is selected, the action will run at all times.|
|Never||If this option is selected, the action will never be executed.|
|On Failure||If this option is selected, the action will only run when a generation error occurs.|
|On Success||If this option is selected, the action will run when no generation errors occur when the form is generated.|
Once a form is submitted for a workflow transition or completion, SmartIQ will perform a set of tasks in a specific order. Designers can specify when exactly an Action will be triggered, changing the behavior of it.
- Submit: Run as early as possible after the user submits the form.
- Document Generation: Run after documents are created, still happens even if there are no templates in the project.
- Workflow Assignment (only available when the action is added in a workflow transition): Run after the workflow has been assigned to the next user/group, only available on transition actions. Will run before workflow escalations have been set up and also before transition emails have been sent.
- Finish: Run after everything else, this is the default.
See the Workflow Transitions section for a detailed discussion of what each stage of the workflow generation process entails.
An action will return a result as described below. If the result is a failure, an error message will be available in Manage on the Management screen. These result types can be referenced and used as conditions.
- Success – The action ran successfully without error.
- Fail – The action ran and returned an error.
- NotRun – If conditions set on the action prevented it from running, it will return this result.
Action results can be used to control logic in subsequent actions. For example, an email action can be configured to execute in the event of failure.
For actions that contain outputs, these will appear as a expandable set of outputs in the tree view of Design. These can be referenced directly much like any other variable and answer using the Reference picker or selected from the Actions Input menu for an Action in Workflow.
Additionally, they can also be referenced directly using the
[Action.Output] notation. In the example above, the REST service response can be referenced as
[Send to REST Service.Response].
Actions can also be referenced to a repeating page or section. In the below example we will be showing you how to configure an email action to send to multiple recipients entered in by the user.
- Create a new project.
- Add a section and a Column.
- Make the section repeating.
- Then add a text field question, name it
- Add an Email action on the Finish page.
- Select the Email action and navigate to the Email Action Properties on the right hand of the window.
Ensure the Repeat check-box is checked, which enables the repeat function for the action.
- From the Repeat Source drop-down menu select the repeat section. For example,
Email: Section 1. This enables you to be able to select the particular source you want the data to be referenced from.
- There are two ways you can reference the Email Recipient Text Field to the email action:
- Select Fixed Value type from the drop-down and use the reference tool.
- Select Answer Value type from the drop-down and select the question and answer.
- Configure the remaining required email attributes.
- Save and publish the project.
Action Repeat Inputs
Actions can also define their inputs as being repeated. This works similar to fragment repeating input.
Updated 5 months ago