Automation

Table of Contents

Overview

The “Automation” feature is used to perform automated tasks at required events(on adding records, updating records, or both in a Form) when a specified criteria(optional) is met. This is achieved using Rules and Tasks.

Screen shot of the Automation page of a Product Sales Form with list of rules and associated tasks
Rule List

A short video that creates a Rule to display the "Coupon code" field if the "Quantity" ordered is more than 10

Rules

A rule defines the tasks to be triggered at the specified Form event(while adding a record, updating a record, or both) when the optional criteria is met. If you do not associate any task to the rule, the task is not triggered. Hence, all the Rules and Tasks needs to be associated with each other to work. To create a new Rule, navigate to Form Settings -> Automation. The automation page comprises of Rules and Tasks tab, with Rules tab selected by default. 

Rules comprise of the following:

  • Basic Details: Rule Name and Description.
  • Execute On: The event(while adding a record, updating a record, or both) when the specified task will be executed.
  • Criteria(Optional): Criteria based on which the specified task will be executed. 
  • Associate Tasks: The tasks to be performed when the optional criteria is met.

a. Basic Details 

Use this panel to assign a name and description to the rule.

  • Enter the name of the rule. Maximum character limit is 255. Example: Send confirmation email.
  • Enter a description for this rule. The description should include the purpose of the rule. Maximum character limit is 255.

Screen shot of the Basic Details panel of a Rules page
Rule Basic Details

b.Execute on

The Execute on panel defines the specific event when the associated task will be executed.

These events are explained below:

  • Add - Select the Add option to trigger associated tasks after a new record is added to the database. Associated field tasks will be triggered when a new record is being entered into the Form.
  • Update - Select the Update option to trigger associated tasks after an existing record is modified in the database. Associated field tasks will be triggered when records are being updated.
  • Add & Update - Select the Add & Update option to trigger associated tasks after a new record is added or existing record is modified in the database. Associated field tasks will be triggered when records are being added or updated.

Screen shot of the Execute On panel of a Rules page
Rule Execute Details

c. Criteria

The Criteria panel defines the rule condition or criteria.

A criteria comprises of:

  • Criteria field  - Name of the Form field to check the value against.
  • Operator - The operator to evaluate the field value. The types of operator depends on the criteria field type. The operator for each field type is given below.
    • Number: equals, not equal to, less than, less than or equal to, greater than, greater than or equal to
    • Date & Time: equals, not equal to, before, after
    • Others: equals, not equal to, starts with, ends with, contains, does not contain
  • Value - The data the user must enter in order to meet the criteria. The possible values that can be used depends on the criteria field.

Multiple Criteria

At the end of each condition or criteria you will find the + button that allows you to add multiple criteria for each rule with AND/OR operator. When you click on the + button to the right of the first condition, this will display a logical operator dropdown to state whether the rule requires all of the conditions to be true (AND) or at least one of the conditions to be true (OR), before the tasks will be executed.

Screen shot of the Criteria panel of a Rules page 
Rule Basic Details

d. Associate Tasks

The Associate Tasks panel is used to create new tasks and associate existing tasks to a rule. You can define new tasks directly from this panel or from the Tasks tab and associate it to Rules. Refer to the Tasks section to define new tasks.

Screen shot of the Associate Tasks panel of a Rules page
associate tasks

Tasks

Tasks are the actions performed when the specified criteria is met. You can create tasks while creating a Rule or directly from the Tasks tab and then associate it with Rules.

Screen shot of the Automation page with list of tasks and associated rules
Task List

Tasks are further classified into three types:

a. Field Tasks

Field tasks allow you to show/hide or enable/disable Form fields and buttons(refers to buttons in Subforms and Stateless forms) based on the value specified in another field. Field tasks are executed before the Form is submitted.

The following field tasks are supported.

  • Hide Fields - The Hide Field task allows you to selectively hide fields and buttons in your Form. The target field or button is displayed in the Form until the hide rule condition evaluates to true. When the condition is true, the field or button is dynamically hidden in the Form.
  • Show Fields - The Show Field task allows you to selectively display fields and buttons in your Form. The target field or button stays hidden in the Form until the show rule condition evaluates to true. When the condition is true, the field or button is dynamically displayed in the Form.
  • Disable Fields - The Disable field task allows you to selectively disable fields and buttons in your Form. The target field or button will be available for viewing and editing, until the disable rule condition evaluates to true. When the condition is true, the field or button is dynamically disabled and cannot be edited.
  • Enable Fields - The Enable Field task allows you to selectively display fields and  buttons in your Form. The target field or button stays hidden in the Form until the show rule condition evaluates to true. When the condition is true, the field or button is dynamically displayed in the Form.

    Screen shot of the Enable Fields task that enables the field named "Online_Payment", when the rule condition is true
    Task Show Fields

  • Set field Value Task - The Set Field Value task allows you to assign a value to a Form field. Click on Add Field, select the required fields and specify the value you want to assign. To execute this task, it must be associated with a rule and an optional criteria. You can set values for multiple fields at once. Pre-defined variables such as Zoho variables and user defined variables are not allowed to set as field values using this task.

                               Screenshot displaying the Set Field Value task

    .
    In the above example image, when the Form is loaded, the email field gets set with the given value "john@zillum.com"

    To create new field task

    1. Click on Automation -> Tasks.
    2. Click on Create Task button.
    3. Specify the task name
    4. Select the required field task from the list of supported tasks
    5. A list of all the fields in the Form and the Form button names will be displayed below.
    6. Select the target field from the list.
    7. Click on Save to add the task to the task list.

b. Form Tasks

Form tasks allow you to perform various tasks like sending email/sms/push notifications to your Application users, displaying a customized success message after the Form submission and redirecting users to a different website after the Form submission. Form tasks are executed after the Form is submitted.

Form tasks are of three types:

  • Email/SMS/Push Notifications Task - The Notifications task allows you to send email/sms notifications to an email address or group of email addresses if the rule condition evaluates to true, after the Form data is submitted.

    To add a new email notification task:

    1. Click on Automation -> Tasks.
    2. Click on Create Task button.
    3. Specify the task name
    4. Choose Email notification task from the list
    5. Specify the From/To address.  You can also assign the admin/login user email ids as the From address. To do this, mouse over the From/To address field and select the zoho variable from the list.
      • zoho.adminuserid assigns the email id of the admin user
      • zoho.loginuserid assigns the email id of the login user
    6. Specify the subject and notification message to be sent.
    7. Click on Save to add the task to the task list.

      Screen shot of the Email Notification task that sends an email on form submit, when the rule condition is true
      Task Send mail

    To add a new sms notification task,

    1. Click on Automation -> Tasks.
    2. Click on Create Task button.
    3. Specify the task name
    4. Choose SMS Notifications task.
    5. Click on Default connection. 
    6. Specify the mobile number with the country code in the To field. For default connection, the mobile number has to start with country code without the + sign. For example, 91xxxxxxxxxx, where "91" is the country code of India. 
    7. Specify the message to be sent in the Message text box, if the rule condition evaluates to true.
    8. Click on Save to add the task to the task list.

      Screen shot of the SMS Notification task that sends an sms on form submit, when the rule condition is true
      Task Send mail

    To add a new push notification task:

    1. Click on Automation -> Tasks.
    2. Click on Create Task button.
    3. Specify the task name
    4. Choose Push notification task from the list
    5. From the Select Users based on drop-down, select Users list or Input Fields. Based on the selected option, the To field will display the following options:
      • If User list is selected, the To field will display the email address of the Application users 
      • If Input Fields is selected, the To field will display the fields present in the Form along with other Zoho variables.
    6. Specify the Title and notification message to be sent.
    7. From the View drop-down, select the Report to be sent
    8. Click on Save to add the task to the task list.

      Screen shot of the Send Push Notification task that sends a push notification on form submit, when the rule condition is true
      Task push notification

  • Success Message Task - The Success Message task allows you to display custom confirmation message to users, if the rule condition evaluates to true, after the Form data is submitted. If the success message rule meets the condition after the Form data is submitted, users will see the custom message otherwise your Form will display the standard message specified in Form Properties.

    To add a new custom message task,

    1. Click on Automation -> Tasks.
    2. Click on Create Task button.
    3. Specify the task name.
    4. Specify the custom message to be displayed if the rule condition evaluates to true.
    5. Click on Save to add the task to the task list.

    Screen shot of the Success Message task that displays the specified message on form submit, when the rule condition is true
    Task Success Message

  • Next URL Task - The Next URL task allows you to redirect the Form to another page, post Form submisison.

    To add a new next url task,

    1. Click on Automation -> Task
    2. Click on Create Task button.
    3. Specify the task name.
    4. Specify the url of the page to be displayed if the rule condition evaluates to true. For example, "www.zoho.com".
    5. Click on Save to add the task to the task list.

    Screen shot of the URL redirection task that redirects users to the specified webpage on form submit, when the rule condition is true
    Task Redirect

c. Subform Tasks

Subform tasks allow you to hide/show the subform Add-Entry/Delete-Entry buttons based on the value specified in the main Form. Subform tasks are executed before the Form is submitted.

The following subform tasks are supported.

  • Hide Add Entry - The "Hide Add Entry" task allows you to selectively hide the Add New button displayed in your subform. The target button is displayed in the subform until the rule condition evaluates to true. When the condition is true, the button is dynamically hidden in the subform.
  • Hide Delete Entry - The "Hide Delete Entry" task allows you to selectively hide the "X" icons displayed for each entry in your subform. 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 hidden in the subform.
  • Show Add Entry - The "Show Add Entry" task allows you to selectively show the Add New button displayed in your subform. The target button stays hidden in the subform until the rule condition evaluates to true. When the condition is true, the button is dynamically displayed on the subform.
  • Show Delete Entry - The "Show Delete Entry" task allows you to selectively show the "X" icons displayed for each entry in your subform. 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 in the subform.

To create new subform task,

  1. Click on Automation -> Tasks.
  2. Click on Create Task button.
  3. Specify the task name
  4. Select the required subform task from the list of supported tasks
  5. A list of all the subform fields in the form will be displayed below.
  6. Select the target field from the list.
  7. Click on Save to add the task to the task list.

Screen shot of the Hide Delete Entry task that hides the "X" icon, when the rule condition is true
Task Show Fields

Screen shot of the Rules page which associates the above subform task
Rule Subform

Code View 

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

Modify and Delete Rules

The Rules tab, will display the list of rules created. To modify an existing rule, click on the specific rule name.

To delete a rule, click on the Remove link displayed for each rule.

Enable and Disable Rules

The first time you save your rules in a form, they will be enabled by default. You can disable this setting by clicking on the “Enabled” status button displayed for each rule listed in the automation page.