Skip to main content

SmartForm Interaction Activity

Overview​

info

Forms submitted in the SmartForms portal will initiate execution of the Pia Automation packages that are linked to them. These packages are called SmartForms Packages. Although the SmartForms packages look similar to the other packages available, they are different as they can only be triggered by submitting a SmartForm Request.

The SmartForm Interaction (smartform_interaction) Activity is a feature that allows you to link SmartForms in your package so that the package is triggered every time the linked SmartForm is submitted in the SmartForms Portal. The triggered package is then executed in a ticket which can be viewed in your ticketing system.

This feature is highly beneficial as it will allow execution of packages with minimal or zero interaction from the engineer. In some cases, the end user can submit a form which will perform the required task for them without having to wait for the engineer's approval.

The SmartForms Interaction activity is available in the Package Editor Screen under Activities Section as displayed below:

The package below is a working sample of the SmartForm Interaction Activity:


# Pia Automation Package
conditions:
- name: 'client_filter'
optMode: 'OptOut'
category: 'Hello World'

- name: 'smartform'
portal_form_title: 'My First SmartForm'
portal_form_description: 'Fill out the form below to submit your first SmartForm request'
portal_form_icon: 'fa-microchip'

steps:
- task: smartform_interaction
inputs:
form_name: 'first_smartform'

In the above example, a form with the static name "first_smartform" has been linked to the package.

When this package is enabled for clients, it will be available in the SmartForms portal. To learn how to enable a SmartForm package for a client, click here. When the SmartForm is selected in the SmartForm portal, it will be displayed in the following format:

Once the user submits the request, the above package will run in a new ticket in your ticketing system.

Activity Behaviour​

The primary behaviour of the SmartForm Interaction activity is to link a SmartForm with your package . This activity also lets you define form defaults and options inputs using input properties.

One of the things to consider when you are using the SmartForm Interaction activity is that this activity can only run if the package has been defined as a SmartForm Package. For that, you will need to add the SmartForm condition to the package. To learn how you can add the SmartForm Interaction activity in your package, refer to this article.

If the package has a Chat Interaction condition, this activity will not run as this activity only supports SmartForms Automation.

Input Properties​

Use properties to modify the behaviour of the activity.

Property Name: form_name
Property Required: Yes
Property Description: This is the static name of the form that has been created in the form editor.

Property Name: form_def
Property Required: No
Property Description: This is the default values that are defined in a Json format which will be passed into the form.

Refer to this article to learn how can use the Form Def property to pass default value and options into your SmartForm.

Output Properties​

The SmartForm Activity makes a single output property available which is:

Property Name: data
Property Description: This is a Json object containing the values of the form as submitted by the user via the SmartForms portal.