Form Automation

Automation

Table of Contents

Overview

The Automation feature enables executing certain tasks at the occurrence of the following form-related events - when a record is added or updated, or both. The tasks can be configured to be executed at all times or when certain conditions are met.

The below video shows creating a Rule to display the "Coupon code" field if the "Quantity" ordered is more than 10

Create a rule and associate tasks

Automation is defined by creating rules and associating tasks with them. A rule dictates the following:

  1. The form-related event at which the associated tasks are to be executed.
  2. Whether the associated tasks are to be executed always or when specific conditions (criteria) are met.
  3. The associated tasks (that will be executed whenever the above two points are satisfied).

To create a new rule:

  1. Edit your application
  2. Select the required form from the Dashboard -> Forms tab. You will be taken to the form builder.
  3. Click the Settings icon on top-right of the form builder, then select Automation. You will be taken to the Automation -> Rules tab.
  4. Click the Create Rule button.
  5. Define the parameters in the following sections, then scroll down and click Save.
    1. Basic Details: Here you set the rule's name and description.
    2. Execute On: Here you define the form-related event at which the associated tasks are to be executed.
    3. Criteria: Here you define the 'when' - the conditions at which the associated tasks are to be executed.
    4. Associate Tasks: The tasks to be performed when the above two (Execute On and Criteria) are satisfied.

    a. Basic Details

    1. Set Rule Name. It can contain up to 255 characters. This is mandatory for creating a rule.
    2. Set Description. It can contain up to 255 characters. This is not mandatory for creating a rule; you may use it to store the purpose of the rule.

      Rule Basic Details

    b. Execute On

    1. Select the choice Add to execute the associated tasks immediately after a new record is added through the form. If you associate any Field Tasks, they will be executed when a user accesses the form to add a record (and the rule's criteria is met).
    2. Select Update to execute the associated tasks immediately after a record (submitted through that form) is updated. If you associate any Field Tasks, they will be executed when a user accesses the form to update a record (and the rule's criteria is met).
    3. Select Add & Update to execute the associated tasks immediately after a new record is added or an existing record is updated. If you associate any Field Tasks, they will be executed when the user accesses the form (and the rule's criteria is met).

      Rule Execute Details

    c. Criteria

    By default, the associated tasks will be executed every time a record is added/updated, or both (depending on what form event you select under Execute On). To conditionally execute the associated tasks:

    1. Choose the Selected Records option.
    2. Set the required criteria by selecting the required Field and Operator, and entering the required Value, as shown below.
      • You can add multiple criteria, which you will need to relate using the AND/OR operators.
      • You can select one field per criterion.
      • When you select a field, the operators applicable to that field's type will become available in the next drop-down.
      • You need to enter a value that the selected operator will relate or compare with the selected field. String values must be enclosed with double-quotes, as shown below. Date / date-time values must be entered in the date format set in your app.
    3. Click the + button to further add a criteria. You must also select the required operator - AND/OR, to define how criteria are to be applied.
    4. (Click the - button to delete that criteria)

      The criteria set in the below image means: the value set in the Sale Type field must be 'Discount' and the value set in the Quantity field must be greater than 100
      Rule Basic Details

    d. Associate Tasks

    Each rule must have at least one task associated with it. To associate tasks to a rule:

    1. Click the + button next to the required type of Task, or click Create New Task, as shown below:

    2. Set Task Name.
    3. Click the drop-down next to Choose Task and select the required task.
    4. Configure the selected task, then click Save & Associate.

The following types of tasks can be associated with a rule:

Field tasks

  • Hide Fields: It allows you to selectively hide form fields. In case of stateless forms, it allows you to hide both fields and buttons. The fields and buttons are hid when the corresponding rule is triggered.
  • Disable Fields: It allows you to selectively disable form fields. In case of stateless forms, it allows you to disable both fields and buttons. The fields and buttons are disabled when the corresponding rule is triggered.

    Note: Disabling the subform field is currently not supported. You may instead use the hide task (in a workflow) or use the Hide Add Entry subform field task (as mentioned in this section)

  • Enable Fields: It allows you to selectively enable form fields. In case of stateless forms, it allows you to enable both fields and buttons. The fields and buttons are enabled when the corresponding rule is triggered.
  • Show Fields: It allows you to selectively show form fields. In case of stateless forms, it allows you to show both fields and buttons. The fields and buttons are shown when the corresponding rule is triggered.
  • Set Field Value: It allows you to selectively assign values to form fields. You can set values for multiple fields at once. Assigning values to fields by using pre-defined variables such as Deluge system variables is not supported by this task here. You may instead add a workflow.

Subform field tasks

These will be available only when your form contains a subform field.

  • Hide Add Entry: It allows you to selectively hide the Add New button that is displayed in the subform field. This button is displayed in the subform until the rule condition evaluates to true. When the condition is true, the button is dynamically hid.
  • Hide Delete Entry: It allows you to selectively hide the delete entry icon (X) that is displayed with each entry in the subform field. The X icon is displayed in the subform until the rule condition evaluates to true. When the condition is true, the X icon is dynamically hid.
  • Show Add Entry: It allows you to selectively show the Add New button that is displayed in the subform field. This button stays hidden in the subform until the rule condition evaluates to true. When the condition is true, the button is dynamically displayed.
  • Show Delete Entry: It allows you to selectively show the delete entry icon (X) that is displayed with each entry in the subform field. The X icon stays hidden in the subform until the rule condition evaluates to true. When the condition is true, the button is dynamically displayed.

Form tasks

  • Success Message: It allows you to display a message to the users after the concerned form event (add, update or add/update of record) occurs. This task overrides the success message configured as part of that form's properties (as mentioned in this page).
  • URL Redirection: It allows you to redirect to a web page after the concerned form event (add, update or add/update of record) occurs. You will have to set the URL of the target web page.
  • Email Notification: It allows you to send an email to a user after the concerned form event (add, update or add/update of record) occurs. You will have to do the following:
    1. Set the Task Name.
    2. Select Email Notification from the drop-down next to Choose Task.
    3. Define the From & To addresses by selecting a Deluge system variable (Admin User Id or Login User Id) or an email field present in that form.
    4. Set the Subject and Message of the email.You can incorporate Deluge system variables and field values in the subject and message of the email (by mentioning their deluge/link names; refer the following screenshot to see the format).
    5. Click Save & Associate.

  • SMS Notification: It allows you to send an message via the SMS (Short Message Service) to a phone number after the concerned form event (add, update or add/update of record) occurs. You will have to do the following:
    1. Set the Task Name.
    2. Select SMS Notification from the drop-down next to Choose Task.
    3. Select the required value from the drop-down next to Connection. You may use the default connection or select an SMS provider that you've added to your account.
    4. Enter the target phone number in the input box next to To.
      • You may either enter the number or fetch it from a field in that form (by mentioning that field's deluge/link name; refer the following screenshot to see the format).
      • The phone number must have the international calling code in it (1 for the US, 44 for the UK, etc.).
    5. Set the Message. You can incorporate Deluge system variables and field values in the SMS.
    6. Click Save & Associate.

  • Push Notification: It allows you to send a push notification to a user after the concerned form event (add, update or add/update of record) occurs. You will have to do the following:
    1. Set the Task Name.
    2. Select Push Notification from the drop-down next to Choose Task.
    3. Define how to identify the target user. This is done by setting values for the parameters Select Users based on and To.
      • If you set Select Users based on as User list, the To parameter will list the email addresses of all the users with whom that app is shared. You must select the required user from it.
      • If you set Select Users based on as Input Fields, the To paramter will list all the system variables and fields (available in that form) with which the target user can be identified. For example: Admin User, Login User, Modified User, Added User, Email. You must select the required identifier.
    4. Set the Title and Message that the push notification is to display. You can incorporate Deluge system variables and field values in them (by using their deluge/link names; refer the following screenshot to see the format).
    5. Select the required report from the drop-down next to View. The user will be taken to this report when they tap this push notification.
    6. Click Save & Associate.

Manage rules

With respect to your form automation rules, you can:

Disable / enable a rule

By default, all rules are Enabled. However, if you require that a rule be temporarly paused from being triggered, you can to Disable it. If you find that a rule is no longer required, it would be better to delete it instead of disabling it. To disable a rule:

  1. Edit your application.
  2. Select the required form from the Dashboard -> Forms tab. You will be taken to the form builder.
  3. Click the Settings icon on top-right of the form builder, then select Automation. You will be taken to the Automation -> Rules tab.
  4. Click the Enable button. It will switch to Disable and gray out.

Edit a rule

You can edit all aspects of a rule: its name, the form event and criteria on which it is to trigger, and the tasks associated with it. For this:

  1. Edit your application.
  2. Select the required form from the Dashboard -> Forms tab. You will be taken to the form builder.
  3. Click the Settings icon on top-right of the form builder, then select Automation. You will be taken to the Automation -> Rules tab.
  4. Hover over the required rule and click the edit icon (pencil) that appears.

  5. Edit the rule as required, then click Update at the bottom of the page.
    • To edit the rule's name, refer this section.
    • To modify the event at which the rule is to be triggered, refer this section.
    • To modify the criteria - the conditions at which the rule is to be triggered, refer this section.
    • With respect to the associated tasks, you can either modify or delete them as mentioned in this section.

Delete a rule

If you find that a rule is no longer required, you may delete it by clicking the delete icon as shown below. When you delete a rule, all the associated tasks are also deleted.

Manage tasks

Tasks are the actions that are executed when the specified criteria are met.

  • You can create tasks only while creating a Rule.
  • However, all the tasks you associate with the rules are displayed in the Tasks tab, from where you can edit them.
  • To delete a task, you will need to edit the corresponding rule (as mentioned in this section) and remove the task.

Code View

The Code View link displayed on the top-right corner of the Rules page. It displays the Deluge code for the created rule.
Code view

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocreator.com