Automating Workflow

Automating Workflow

You are here

Automating Workflow

Workflow management helps you to automate your sales, marketing and support. You can automatically assign tasks to users, based on the criteria defined in the rules and update certain fields.  Workflow automation consists of the following components:

  • Workflow Rules - A set of rules that are executed when specified conditions are met.
  • Workflow Alerts - Automated email notifications sent on triggering a workflow rule.
  • Workflow Tasks - Tasks that are assigned to the users when workflow rules are triggered.
  • Workflow Field Updates - Automatically updating specified field values when workflow rules are triggered.
  • Workflow Follow-ups - Automates the process of following and unfollowing records.
  • Webhooks - Communicates with third-party applications by sending instant web notification (one-way) every time an event occurs in Zoho CRM.
  • Custom Functions -  Develop a set of Deluge Scripts to receive response from other applications and update CRM modules when the workflow criteria is fulfilled.

Workflow Rules are effective only if associated with Workflow Alerts, Workflow Tasks and Workflow Field Updates. When a rule is triggered, the alerts, tasks and field updates associated to the rule will also be triggered. For example, to send email notifications to the recipients, you must always associate an alert to the rule. You can also associate workflow tasks to a rule to assign work to the users.

 

An example of the workflow rule in Zoho CRM, is the Big Deal Alert rule. This rule is executed when the Sales Amount and probability of winning the business opportunity crosses a significant value. When this rule is triggered, notification is sent to the management and other colleagues in your Sales team. You can edit this rule and its criteria to define your own big deal alert.

Benefits

  • Improves efficiency by eliminating the manual work of assigning tasks.
  • Reduces operating costs.
  • Improves business processes through standardized working methods.

Custom Functions

Zoho CRM Custom functions help you to update the data in related CRM modules or third-party applications by executing easy to program scripts. When a record matchs the workflow criteria, workflow engine automatically triggers the custom function and update the CRM records. With custom functions, you can program scripts using Deluge Script (powered by Zoho Creator), associate them to workflow rules, and automate the business process. See Also Deluge Script - Reference Guide.

 Business Scenarios

  • Roll up amount from each potential (status is closed won) to Total Revenue (custom field) to the related Account. If customer makes 10 payments, you can view the total revenue from Account page, instead of creating a report. Based on the total revenue generated from customer, you can grade them type A, type B, type C customers.
  • Create a project in Zoho Projects or any 3rd-party project management application when the potential is won and closed in CRM. Also, view the project link under an Account or Potential record to monitor the progress of the project.
  • Automatically update the address information of contacts based on the mailing address of the parent account.
  • When the potential status is "closed won", push the potential, related contact and account details to Zoho Books or any 3rd-party accounting software. Once status of the invoice is changed to "paid" in accounting software, instantly update Potential record in CRM.

Target Audience

  • CRM Administrators who set up workflow rules for Users
  • Programmers with REST API and Deluge Script skills

Availability

Profile Permission Required: Users with the "Manage Workflow" permission can access this feature.

Set Up Custom Functions

You can set up custom functions in three steps:

  • Create a custom function.
  • Associate custom function to a workflow rule.
  • Test custom functions integration.

To create a custom function

  1. Click Setup > Automation > Workflow > Custom Function.
  2. In the Custom Functions page, click the Configure Custom Function.
  3. In the Configure Custom Function page, select a function from Gallery, existing function or write a new one using Deluge Script.

    Custom Function
  4. Click Save.

To associate custom function to a workflow rule

  1. Click Setup > Automation > Workflow Rules.
  2. In the Workflow Rules page, click the Create a Workflow Rule.
  3. In the Workflow Rule page, specify workflow rule parameters.
  4. Under Workflow Actions, select the custom function to be triggered.
  5. Click Save.
Custom Function

 

To test the custom function integration

  1. Add test data in Zoho CRM according to your workflow rule criteria.
  2. Check for the data received from Zoho CRM via custom function, in your application.
  3. Modify your custom function code in Zoho CRM, if there data is not received or a data mismatch
  4. Continue this test until you obtain the required data from Zoho CRM to your Application.

Important Notes

  • You can associate up to 6 (1 Instant Action and 5 Time-Based Actions) custom functions per workflow rule.
  • You can transfer data for a maximum of 10 CRM fields from Zoho CRM to third-party applications using custom function.
  • You can retrieve data from other Apps to Zoho CRM using custom function.
  • You must update the API ticket regularly according to limits in third-party applications.
  • You will not receive any email notification, if the custom function integration stopped functioning due to any issue in a third-party API.
  • If there is any failure while connecting to Zoho Creator service, custom function will send the second notification after 15 min. Thereafter, the system will not send any notifications for that particular workflow trigger. Errors returned from Zoho Creator are shown under Reason for Failures section.
  • If you exceed the maximum count per day, the system will not send remaining custom function notifications to third-party applications and will notify the failure to Administrator. 
  • Zoho CRM will the send the data in following standard format for Date and Date Time fields to third-party applications:
    • Date: yyyy-MM-dd
    • Date Time: yyyy-MM-dd hh:mm

Business Scenario

Roll up the potential amount to parent account

Summary

Roll-up amount from each potential (status is closed won) to Total Revenue (custom field) to related Account. If Customer buys 10 times, You can see the total revenue from Account page, instead of pulling a report. Based on the Revenue from customer, later you can grade them type A, type B, or type C customers.

To configure this custom function, follow these steps:

  1. Log in to Zoho CRM.
  2. Open Setup > Automation > Workflow Rules > Create a workflow rule for the Potentials module.
    Custom Function
  3. Under the Excecute On section, select Create or Edit option.
    Custom Function
  4. Under the Rule Criteria section, set the criteria as "Stage contains closed won"
    Custom Function
  5. Under the Actions section, click Add Configure Custom Function.
    Custom Function
  6. In the Configure Custom Function page, click the Gallery link.
    Custom Function
  7. In the Gallery page, click Configure for Roll-up Potential Amount to Account function.
  8. Select Potential as your module.
  9. Specify values for the arguments as mentioned below:
    • AccountID: Choose "AccountId" column from the list of fields.
    • SumUpField: Specify the field you have in accounts module for the summation.
    • Click "Specify custom value" link and type your field name.
  10. Save the configuration to automatically update the sum of the revenue generated by all the potentials of an account in the account module.

Refer Error Codes

When the execution of custom function fails, one of the following error messages will be displayed in Zoho CRM:

HTTP Status Codes

  • 400 Bad Request - Often missing a required parameter.
  • 401 Unauthorized - No valid API key provided.
  • 402 Request Failed - Parameters were valid but request failed.
  • 404 Not Found - The requested item doesn't exist.
  • 500, 502, 503, 504 Server errors - Error in the third-party application.
  • Error Code 1 - Temporarily not able to connect to the API server. Check API server logs, firewalls settings for requests sent from CRM.

Custom Errors

  • Internal process failure - When the custom function is not executed due to errors in processing of the script.
  • Day limit reached - When the company has reached the maximum limit for the day.
  • Deluge Script - When the execution of workflow triggers fail due to errors in Deluge Script.

Workflow Rules

Workflow Rules in Zoho CRM, are a set of actions (alerts, tasks and field updates) that are executed when certain specified conditions are met. These rules automate the process of sending email alerts, assigning tasks and updating certain fields of a record when a rule is triggered. A workflow rule consists of the following elements:

  • Basic Details - Specify details on the record type for which the rule applies, rule name, description, and option to activate the rule.
  • Rule Trigger- Specify when the rule should be triggered for a record and based on what. There are two options:
    • Execute based on a record's action - Rules can be triggered when records are created, edited, created/edited, deleted or a specific fields are updated.
    • Execute based on a date field's value - For all the records matching the rule criteria, rule will be triggered either monthly or yearly based on the value of the date field that is selected.
  • Rule Criteria - List out the criteria to filter out records that meet the criteria. Workflwo rule is triggered to these records.
  • Instant Actions - Add alerts, tasks and field updates that will be triggered immediately when the rule is executed.
  • Time Based Actions - Add alerts, tasks and field updates that will be scheduled and triggered based on a specified time.

Availability

Profile Permission Required: Users with Manage Workflow permission in profile can access this feature.

Create Workflow Rules

The steps to create a workflow rule are divided into 4 parts.

Part 1 - Specify the basic details of the rule

  1. Click Setup > Automation > Workflow > Rules.
  2. In the Workflow Rules page, click Create Rule.
  3. In the New Rule page, do the following:
    • Select the Module to which the rule applies from the drop-down list.
    • Enter the Rule Name.
    • Select the Status check box if you want the rule to be active.
    • Enter the Description for the workflow rule.
  4. Click Next.

Part 2 - Select rule trigger option

There are two options based on which the rule will be triggered for a record that matched the rule criteria. One of these options need to be selected when you create a workflow rule and you cannot change it later by editing the rule. The two options from the Execute based on drop-down list are:

  • A Record Action - Rules can be triggered when records are created, edited, created/edited, deleted or a specific fields are updated.
  • A Date Field's Value -For all the records matching the rule criteria, rule will be triggered either monthly or yearly based on the value of the date field that is selected. This option is available only in the Enterprise Edition.

Execute Based on Record Action

When new leads are created in Zoho CRM you may want to automatically send an email or a series of emails at set intervals. You may also want to create tasks for these new leads. Also, sometimes when specific fields are updated, you may want to trigger a workflow. This execution option lets you specify an action based on which workflow rules will be triggered.

  1. Select one of the following:
  • Create: Executes the rule when records are created.
  • Edit: Executes the rule when existing record are modified.
  • Create or Edit: Executes the rule when records are created or existing records are modified.
  • Field Update: Executes the rule when the values of the specified fields are modified in a record.
  • Delete: Executes the rule when certain records are deleted. Only Workflow Alerts and Webhooks and be associated for such a rule. The action includes:
    • Deleting a record from the Details Page.
    • Deleting from the List View (One by one or in bulk).
    • Using the Mass Delete feature.
    • Deleting from a record's Related List. For example, deleting a contact under an Account.
  • When you select the Field Update option, do the following:

    • Choose the field name from the drop-down lists.
    • Choose one of the following:
      • Execute the rule when all the selected fields are updated.
      • Execute the rule when any selected field is updated.
  • Click Next.

Execute Based on Date Field's Value

You may want to get an email reminder a week before a deal's expected closing date, or may want to send an email to the customers reminding them of the monthly rentals or subscription renewals. In these cases, it is not necessary that the records should be created or edited for the rule to get triggered. It is plainly based on the value in the date fields. This execution option lets you pick a date field from a record and allows you to define the day for the rule to be triggered. Please note, with this option, a maximum of 3000 records will be triggered every hour. If there are more than 3000 records, the remaining records will be executed in the next hour. Please note, this option is available only in the Enterprise Edition.

  1. Choose a Date field from the drop-down list.
    All the date fields in the module for which the rule is being created will be listed.
  2. Choose On, Before or After from the drop-down list to set the Date of Execution.
    The rule can be set to trigger a maximum of 20 days Before or After the Date field specified.
  3. Specify the time of execution in hours and minutes.
    In case of DateTime fields, there is an option to trigger the rule based on the time in the field value.
  4. Select the Execution cycle as Once, Every Month or Every Year.
  5. Click Next.

Note

  • For a rule to be triggered using the Field Update option, both the rule criteria and the execution criteria must be true.
  • If your Zoho CRM account is downgraded or the subscription expired, the workflow rules will be disabled. If you renew the subscription, you will need to manually enable the rules.
  • When the Delete option is selected as the execution criteria, a workflow rule will not be triggered if records are deleted from the Recycle Bin.
  • You can configure and associate only workflow alerts and webhooks to a workflow rule with the execution criteria as Delete.
  • Workflow Rules will be triggered when records are modified using Mass Update, Macros and when ownership of records are changed.

Part 3 - Set the rule criteria

  1. In the Rule Criteria section, specify the rule criteria details.
  2. Click Add Criteria to add multiple criteria.
  3. Click Next.

Edit Criteria Patterns

Criteria Pattern Editor in the custom list view helps you to develop the advanced filters using simple logical operators like and / or.

Availability

Profile Permission Required: Users with the Manage Workflow permission in profile can access this feature.

Note

  • You can specify a maximum of 25 criteria for a list view.
To edit criteria patterns
  • Click Setup > Automation > Workflow > Rules.
  • In the Workflow Rules page, click on a workflow rule.
  • In the Edit Rule page, review your existing criteria and click the Change Pattern link.
  • In Pattern Editor box, modify filters and click the Save link.
  • Save the modified custom view.

Example:
You would like to trigger a workflow rule for all the potentials whose Type is New Business, Stage is Need Analysis or Qualification, and Amount is above $50000.

Type is New Business; Stage is Need Analysis or Qualification; and Amount > $50000
.

You can create this criteria easily using the Criteria option given below:


The criteria pattern will be automatically set as:

Since the criteria pattern does not match the requirement, you can edit it as:
You can use the following characters in the Criteria Pattern Editor:
  • Round brackets: ( )
  • and / or operators
  • Criteria Row Number

Important Notes

  • When the Change Pattern box is open, you cannot add or delete a criteria row under the Specify Criteria section.
  • The operator precedence will not be taken into account if you do not specify brackets. For example, if you specify the criteria as 1 or 2 and 3, it will be considered as ((1 or 2) and 3)
  • You can change the and or or of the criteria rows and it will be updated in the Editor below.
  • You can change the and or or condition in the pattern and it will be updated in the rows above.
  • If you specify 1 and 2 and save it, on editing the view the pattern will be shown as (1 and 2). For (1 and 2) or 3 the pattern will be shown as ( (1 and 2) or 3 )
  • If you add more rows in the editor and delete one by one there will be additional brackets displayed in the pattern. For example if there are 4 rows added and you delete the 3rd row, the criteria pattern will be as ( ( ( ( 1 and 2 ) ) ) or 3 ). If the first row is deleted then it will be shown as ( ( ( ( 1 ) ) ) or 2 ). However, on saving the criteria, it will change as ( 1 or 2 ).
  • Make sure that you do not use the following as they are invalid: (), (and), (or).
  • If the brackets do not match it will be treated as invalid.
  • There will an error message, if the number of rows and the numbers given in the pattern do not match and also, if there are any numbers missed in the pattern.
  • In case the final brackets are missing, there will be a difference in the Criteria Patterns Editor and its view mode.
    Your Criteria Pattern in Editor Your Criteria Pattern in View Mode
    ( 1 and 2 ) or ( 3 and 4 ) (( 1 and 2 ) or ( 3 and 4 ))
    1 and 2 and 3 and 4 (1 and 2 and 3 and 4 )
    ( 1 or 2 ) and ( 3 or 4 ) ( ( 1 or 2 ) and ( 3 or 4 ) )

Part 4 - Associate instant and/or time based actions

  1. In the Actions section, do the following:
    Note that you cannot save a rule without creating either an instant or a time based action.
    • Create Instant Action by associating alerts, tasks, and field updates. See Also Create Instant Actions
    • Create Time Based Actions and associate alerts, tasks, and field updates. See Also Create Time Based Actions
      A maximum of 5 time based actions can be created.
  2. Click Save.

Associate Alerts, Tasks, or Field Updates to Rules

Workflow rules are meaningful only if an alert, task, or field update is associated to the rule. These alerts, tasks and field updates are grouped under Actions that can either be Instant Actions or Time Based Actions.

Note

  • A workflow alert, task or field update can be associated with many rules.
  • For each action, you can associate a maximum of 5 alerts, 5 tasks, and 3 field updates.
  • A maximum of 5 Time Based Actions (that includes alerts, tasks, and field updates) can be created for a rule.
  • If your Zoho CRM account is downgraded or the subscription expired, the workflow rules will be disabled. If you renew the subscription, you will need to manually enable the rules.

Create Instant Actions

Instant action includes alerts, tasks, and field updates that are triggered immediately when the rule is executed. There are two options to associate alerts, tasks, and field updates.

  • Create alerts, tasks, and field updates and associate them to the rule
  • Select existing alerts, tasks, and field updates to associate to the rule

To create an instant action

If you are creating a workflow rule, directly go to step 4

  1. Click Setup > Automation > Workflow > Rules.
  2. In the Workflow Rules page, click on the rule for which you want to create an action.
  3. Click Edit to modify the rule settings.
  4. Under Instant Actions section, do the following to associate Alerts to the rule:
    • Create Alert - Click and specify the details to create an alert. See Also Create Alerts
    • Select Existing Alerts - Click to select existing alert(s) to associate it to the rule.
  5. Under the Instant Actions section, do the following to associate Tasks to the rule:
    • Create Task - Click and specify the details to create a task. See Also Create Tasks
    • Select Existing Tasks - Click to select existing task(s) to associate it to the rule.
  6. Under the Instant Actions section, do the following to associate Field Updates to the rule:
    • Create Field Update - Click and specify the details to create a field update. See Also Create Field Updates
    • Select Existing Field Updates - Click to select existing field update(s) to associate it to the rule.
  7. Click Save.

Note

  • For a workflow rule, all alerts and tasks will not be listed. If the rule is for Leads, then only the field updates, tasks and alerts created for Leads will be available for association.

Create Time Based Actions

Time Based actions include alerts, tasks, and field updates that are triggered on a specified time after the rule is executed. You can schedule the actions to be triggered based on the Rule Trigger Date, record Created Time, record Modified Time as well as other time or date fields in the module. You can see the list of scheduled actions for individual records under "Upcoming Actions".

There are two options to associate alerts, tasks, and field updates.

  • Create alerts, tasks, and field updates and associate them to the rule
  • Select existing alerts, tasks, and field updates to associate to the rule

Availability

Profile Permission Required: Users with the Manage Workflow permission in profile can access this feature.

To create time based actions

If you are creating a workflow rule, directly go to step 4

  1. Click Setup > Automation > Workflow > Rules.
  2. In the Workflow Rules page, click on the rule for which you want to create an action.
  3. Click Edit to modify the rule settings.
  4. Under the Actions section, click Add a Time Based Action.
  5. Enter a Name for the time based action.
  6. Specify the Execution Time (when the associated alerts, tasks and field updates should be triggered).
  7. Click Save.
  8. Under the Time Based Actions section, do the following to associate Alerts to the rule:
    • Create Alert - Click and specify the details to create an alert. See Also Create Alerts
    • Select Existing Alerts - Click to select existing alert(s) to associate it to the rule.
  9. Under the Time Based Actions section, do the following to associate Tasks to the rule:
    • Create Task - Click and specify the details to create a task. See Also Create Tasks
    • Select Existing Tasks - Click to select existing task(s) to associate it to the rule.
  10. Under the Time Based Actions section, do the following to associate Field Updates to the rule:
    • Create Field Update - Click and specify the details to create a field update. See Also Create Field Updates
    • Select Existing Field Updates - Click to select existing field update(s) to associate it to the rule.
  11. Click Save.

Important Notes:

  • For a workflow rule, all alerts and tasks will not be listed. If the rule is for Leads, then only the field updates, tasks and alerts created for Leads will be available for association.
  • You can create a maximum of 5 time based actions for a workflow rule.
  • Each Time Based Action can have a maximum of 5 alerts, 5 tasks and 3 field updates.
  • If the Email Opt Out option is enabled, emails will not be sent to the customers.
  • For the Workflow Management feature, the Organization's Time Zone will be considered for calculating a day. In the absence of the time zone being defined, the Primary Contact's Time Zone will be considered.
  • Time Based Actions are not minute based. There can be a delay of few minutes for the time based actions to be triggered.
  • When email alerts reach the limit for the day, any remaining emails to be sent the same day will not be sent.
  • If the Execution Time that is calculated is a time in the past, then the action will be triggered immediately. There can be a delay of few minutes for the time based actions to be triggered.
  • The scheduled actions for a records will be listed under Upcoming Actions in the Records Details Page.

Notes on Per Day Limits

  • (No. of Users * 100) or 5000, whichever is lower, will be taken as the maximum limit per day for emails to be sent using workflow alerts.
  • (No. of Users * 50) or 2500, whichever is lower will be taken as the maximum limit per day for the execution of time based actions (that includes alerts, tasks, and field updates).
  • A maximum of 300 actions will be triggered every hour. If there are more than 300 actions per hour, the remaining actions will be executed in the next hour.
  • The Primary Contact of your CRM account will be notified if the workflow email alerts limit is exceeded for the day. 
  • The per day limits (for e.g.: email limit) is calculated based on PST.

Instances when the Time Based actions will be rescheduled:

  1. The Execution Criteria for the Rule is either Edit or Create or Edit. When the rule criteria is satisfied for a record, the instant actions are triggered and time based actions are scheduled for the record.
    If a user edits the record and the rule criteria is not fulfilled, then the time based actions scheduled earlier will be deleted. If the record is edited again and the criteria is satisfied, then the time based actions will be rescheduled.
  2. For Time Based Actions, the Execution Time can also be based on the custom Date & Time field. When a rule criteria is satisfied for a record, the instant actions are triggered and time based actions are scheduled for the record.
    If a user edits the record to change the value of the date & time field, the time based actions will be rescheduled as per the new date & time value.

Instances when the Time Based actions will not be rescheduled or deleted:

  1. The Execution Criteria for the Rule is either Edit or Create or Edit. When the rule criteria is satisfied for a record, the instant actions are triggered and time based actions are scheduled for the record.
    If a user edits the record but the rule criteria is not fulfilled, then the time based actions will not be scheduled again.
  2. When a lead is converted, all the time based actions that are scheduled for the record will be deleted.
  3. When the Enterprise Edition is downgraded to the Free Edition, all the time based actions that are scheduled for the record will be deleted.
  4. When records are deleted, all the time based actions scheduled to the record will also be deleted. If the deleted records are restored, the time based actions will not be rescheduled.

Use List View & Summary View

There are two views for workflow rules that are created - the List View and the Summary View. The Summary View is available only for the workflow rules and not for the alerts, tasks and field updates. This view lists out the Criteria and Field Updates associated to the rules that will help you get a clear picture of all the rules and where they are used to avoid any confusion.

Note

  • You need to select a module to check the summary view. This view is not available when you select the "All Modules" option.
  • In the List View you can reorder the rules to change the sequence in which the rules need to be executed. The Reorder option will be available only after you select a module from the drop-down list.

To reorder the workflow rules

  1. Click Setup > Automation > Workflow > Rules.
  2. In the Workflow Rules page, select a module from the drop-down list.
    Make sure you have selected the List View and not the Summary View.
  3. Click Reorder Rules.
  4. Drag and drop the rules on the order that you want.

To use summary view

  1. Click Setup > Automation > Workflow > Rules.
  2. In the Workflow Rules page, select a module from the drop-down list.
  3. Click Summary View icon.
    All the rules for the selected module will be listed along with the Criteria and the associated Field Updates. You can click the Show More link to see the other items associated to the rule.

Delete Workflow Rules

Workflow rules can be deactivated when not in use. You can also delete the unwanted workflow rules.

Note

  • When you delete a workflow rule, all the time based actions scheduled for the records will also be deleted.

To delete workflow rules

  1. Click Setup > Automation > Workflow > Rules.
  2. In the Workflow Rules page, click the Delete icon for the corresponding rule.

FAQ

1. How can I disable workflow rules for Standard users?

2. How many emails can be sent per day using the workflow alerts?

3. Why am I not able to see the Remind Assignee option for workflow Tasks?

Workflow Tasks

Workflow Tasks are assigned to the users when the associated workflow rules are triggered. A workflow task can be associated to a workflow rule, when you want to create a task and assign it to a user, upon triggering the rule.

Availability

Profile Permission Required: Users with Manage Workflow profile permission can access this feature.

To create a workflow task

  1. Click Setup > Automation > Workflow > Tasks.
  2. In the Workflow Tasks page, click Create Task.
  3. In the New Task page, do the following:

    • Select the Module from the drop-down list.
    • Enter a Subject for the task.
    • Specify the Due Date to complete the task.
    • Select the Status of the task from the drop-down list.
    • Select the task Priority from the drop-down list.
    • Select the user from the Assigned To lookup list to assign the task.
    • Select the Notify Assignee check box to notify the task owner via email about the task.
    • Select the Remind Assignee check box to send reminder to the task owner.
      • Alert through Email - A reminder email will be sent to the task owner at the specified time.
      • Alert through Pop-up - A pop-up reminder will be initiated to the task owner at the specified time.
    • Enter the task Description.
  4. Click Save.
    A new workflow task is created, which can be associated to workflow rules.

Note

  • Workflow tasks cannot be created for records that does not support tasks in Zoho CRM, such as Solution, Forecasts etc.
  • Workflow tasks cannot be associated to a workflow rule if the Execution Criteria selected for a rule is 'Delete'.
  • If the Assigned To field is not specified, the system will automatically assign the Task to the record's owner.
  • If you select a workflow task while importing records (such as leads, accounts, contacts), Notify Assignee option (though selected for the particular workflow task) will not be applicable. See Also Import Data

Deploying Custom Functions

All custom functions programmed by your Programmers are listed in the Customized Functions page. By this way, programmers can focus on the developing Deluge Scripts where as CRM Administrators can deploy the thoroughly testing custom functions while associating with workflow rules.

You can integrate functions from the customized functions section with Workflow rules using minimal configuration and Deluge Script skils. See Also Deluge Script - Reference Guide

Target Audience

  • CRM Users with Manage Workflow permissions
  • Programmers with basic Deluge Script knowledge

Availability

Profile Permission Required: Users with the Manage Workflow permissions in can access this feature.

Use Custom Functions from Customized Functions

Using custom functions through Customized Functions section include the following steps:

  • Associate custom function to a workflow rule.
  • Test custom function integration.

To associate custom function with Workflow Rule

  1. Click Setup > Automation > Workflow > Custom Function.
  2. In the Custom Functions page, click Configure Custom Function.
  3. In the Configure Custom Function page, click the Customized Functions link. Custom Function
  4. In the Customized Functions page, move the mouse pointer to the custom function and click Configure.
  5. In the Configure Custom Functionpage, complete the following steps:
    • Select the module to be associated.
    • Under Argument Mapping section, map the argument with fieild name in CRM module.
    • Click Save.
      Now you can associate the gallery custom function with workflow rule.
  6. In the Workflow rule page, click Save.
    Now, your customized function is associated with workflow rule. When the workflow rule is triggered, custom function will be automatically executed.

To test the custom function integration

  1. Add test data in CRM according to your workflow rule criteria.
  2. In your application check for the data received from Zoho CRM via custom function.
  3. If there is an error or data mismatch, modify your custom function code in Zoho CRM.
  4. Continue this test until you obtain the required data from Zoho CRM to your Application.

Important Notes

  • You can associate up to 6 (1 Instant Action and 5 Time-Based Actions) custom functions per workflow rule.
  • You can transfer data for a maximum of 10 CRM fields from Zoho CRM to third-party applications using custom function.
  • You can retrieve data from other Apps to Zoho CRM using custom function.
  • You must update the API ticket regularly according to limits in third-party applications.
  • You will not receive any email notification, if the custom function integration stopped functioning due to any issue in a third-party API.
  • If there is any failure in the process, Custom function will send a notification first, Zoho CRM system will send a second notification after 15 min. Thereafter, the system will not send any notifications for that particular workflow trigger.
  • If you exceed the maximum count per day, the system will not send remaining custom function notifications to third-party applications and will notify thw failure to Administrator. 
  • Zoho CRM will the send the data in following standard format for Date and Date Time fields to third-party applications:
    • Date: yyyy-MM-dd
    • Date Time: yyyy-MM-dd hh:mm

Workflow Field Updates

The Field Update option helps you to automatically update certain field values in the records, when the associated workflow rule is triggered.

Availability

Profile Permission Required : Users with the Administrator profile can access this feature.

To create field updates

  1. Click Setup > Automation > Workflow > Field Updates.
  2. In the Workflow Field Updates page, click Configure Field Update.
  3. In the New Workflow Field Update page, do the following:
    • Enter a Name for the field update.
    • Select the Module from the drop-down list.
      You can also update the field values of the related parent records associated to the record selected for workflow rule. For example: While creating workflow rules for Contacts, you will be able to update the fields of the parent Account records too.
    • Select the field from the Update drop-down list that needs to be updated.
    • Specify the value for the field that you want updated.
    • Click Save.

Note

  • Workflow Field Updates cannot be associated to a workflow rule if the Execution Criteria selected for a rule is 'Delete'.
  • You can associate a maximum of 3 field updates to each action (Instant and Time Based Actions).
  • You can update the Record Owner field too using this feature.
  • From within a workflow rule, you can also create Workflow Field Updates to update parent record's fields.
    Record Type Parent Records That You Can Update
    Contacts Accounts, Vendors
    Potentials Accounts, Campaigns, Contacts
    Cases Products, Accounts, Potentials, Contacts
    Solutions Products
    Products Vendors
    Quotes Contacts, Accounts, Potentials
    Sales Order Contacts, Accounts, Potentials, Quotes
    Purchase Orders Contacts, Vendors
    Invoices Accounts, Sales Orders, Contacts

Scenario for Field Update

Scenario:

While creating leads you want to update the following field values based on some criteria.
Lead Status as Contact Immediately
The criteria is, if the lead status is Not Contacted and the email address of the lead does not contain yahoo, gmail, or hotmail, then the following fields should be updated:

Procedure:

First, you need to create Workflow Field Updates as given below:

  1. Click Setup > Automation > Workflow > Field Update.
  2. In the Workflow Field Update page, click Configure Field Update.

  3. In the New Field Update page, enter a Name for the update.
  4. Select the Module for which the field update applies.
  5. Specify the Update as Lead Status = Contact Immediately.
  6. Click Save.
    Once the field updates are created, you need to create a workflow rule with the following:
    • Module - Leads
    • Execute On - Create
    • Rule Criteria - Lead Status is Not Contacted and Email doesn't contain yahoo, gmail, hotmail.
    • Instant Action - Workflow Field Update (select the two field updates that you created)

Now, when you create a lead with an email address other than yahoo, gmail, hotmail, the Lead Type and Lead Status field values automatically get updated for the record.

Workflow Alerts

Workflow alert comprises of an email template, which is used to send email notification to all the specified recipients. This email notification is sent to the recipients when the associated workflow rule is triggered. You can associate maximum 5 workflow alerts to a rule.

Note

  • You can associate maximum 5 alerts to each action (Instant and Time Based Actions).
  • (No. of Users * 100) or 5000, whichever is lower will be taken as the maximum limit per day for emails to be sent using workflow alerts.
  • The email limit for a day is calculated based on PST.
  • For email templates, if the From Address is that of the Record Owner who is deactivated, then the Primary Contact's emails address will be replaced. In case the user who is the primary contact is also deactivated, then the first administrator's email address will be replaced.

Availability

Profile Permission Required: Users with the Manage Workflow permission in profile can access this feature.

To create workflow alert

  1. Click Setup > Automation > Workflow > Alerts
  2. In the Workflow Alerts page, click Configure Alert.
  3. In the New Alert page, under Alert Details section, do the following:
    • Enter a Name for the alert.
    • Choose a Module from the drop-down list.
    • Choose the Email template for the alert from the drop-down list.
      Only email templates created for the selected record type (module) will be listed in the drop-down field.
    • Click the Create Templates link to create a template.
  4. In the New Alert page, under Recipient Details section, choose the recipients:
  • Persons Associated to the Record - Depending on the type of record, you will have the option to select Email and Secondary Email field, Record Owner, Record Creator and the Record Owner's Manager.
  • Groups, Roles, Roles and Subordinates, and Users.
  • Specify the email address of the Additional Recipients. Use comma to separate more than one email address.
    You can add maximum 10 email addresses.
  • Click Save.
    An email based alert is created, which can be associated to the workflow rules.
  • Follow-ups

    By using the Pulse feature you can stay on top of all your sales updates. You can follow important leads, accounts, contacts and potentials to keep track of their activities and updates in close to real time. This allows you to identify the inactive records and cold prospects instantly, and take appropriate action.

    When the Pulse feature is enabled for you, the Follow and Unfollow buttons will be available for records in the Leads, Accounts, Contacts and Potentials modules. You can select the pertinent records and manually follow or unfollow them one by one. This process of following and unfollowing can also be automated based on specified criteria, by using the Workflow Follow-ups.

    Consider the following scenario:

    You want to follow and receive updates on all the important deals that have an opportunity of more than $1000. For this you can simply create a Follow-up and associate it to a workflow rule. When a record meets the criteria of the rule, the workflow rule will be triggered along with the Follow-up.

    Availability

    Profile Permission Required: Users with the Administrator profile can access this feature.

    To create workflow follow-ups

    1. Click Setup > Automation > Workflow > Follow-ups.
    2. In the Follow-ups page, click Configure Follow-ups.
    3. In the New Follow-up page, do the following:
      • Enter a Name for the follow-up.
      • Choose a Module from the drop-down list.
      • Select Follow or Unfollow to specify the type of Action that needs to be performed.
      • Select the appropriate options under Make the selected users to follow the Leads.
        The records will be automatically followed or unfollowed by the concerned users. 
    4. Click Save.

    Note

    • The modules supported in Pulse are: Leads, Contacts, Accounts and Potentials. Workflow Follow-ups can be created only for these modules.
    • Workflow Follow-ups cannot be associated to a workflow rule if the Execution Criteria selected for a rule is 'Delete'.

    Workflow Scenarios

    Following are some of the examples of workflow rules.

    Workflow Rules with Instant Actions

    Scenario - Assign leads to selected users when it is a high value deal.

    Record Type - Leads

    Execute On Create or Edit
    Rule Criteria Amount is 10,00,000
    Instant Actions A Task and Field Update
    Create a field update that updates the Lead Owner field value to a particular user. Also, create a task for the new record owner.
    Time Based Actions -

    Scenario - Notify management when a big deal is lost.

    Record Type - Potentials

    Execute On Edit
    Rule Criteria Stage is Closed Lost
    Instant Actions An Alert
    Create an email template for potentials that includes the potential details and the reason for losing the deal.
    Time Based Actions -

    Scenario - Assign demo requests that are generated from web forms to Sales Reps. You can assign the demos to the reps based on the type of product or the number of licenses needed.

    Record Type - Leads

    Execute On Create
    Rule Criteria Region is EST
    Instant Actions A Field Update
    Create a field update that updates the Lead Owner field value to a particular user. Also, create a task for new lead owner.
    Time Based Actions -

    Scenario - Set the Response Time when a case is created based on the type of customer.

    Record Type - Cases

    Execute On Create
    Rule Criteria Customer Type is Platinum
    Instant Actions A Field Update
    Create a field update that sets the Response Time to a particular value.
    Time Based Actions -

    Scenario - Assign a task to contact and qualify the lead within a specified due date.

    Record Type - Leads

    Execute On Create
    Rule Criteria Lead Status is Not Contacted
    Instant Actions A Task
    Create a task that defines the due date by which the lead should be contacted and qualified. You can calculate the due date based on any date field in the module.
    Time Based Actions -

    Scenario - Notify the record owner and management when a lead status changes to 'Qualify'.

    Record Type - Leads

    Execute On Create or Edit
    Rule Criteria Lead Status is Qualify
    Instant Actions A Task and Alert
    Create a task to convert the lead. Also, create an email template to notify the record owner and management about the lead status.
    Time Based Actions -

    Workflow Rules with Time Bases Actions

    Scenario - Notify users if the potential's closing date is tomorrow and if it is a high value opportunity.

    Record Type -
    Potentials

    Execute On Create or Edit
    Rule Criteria Amount >= 10,00,000
    Instant Actions -
    Time Based Actions Execution Time - 5 Day(s) Before Closing Date
    An Alert and Task

    Create an email alert to notify the management and the potential owner about the closing date. Also, create a task for the record owner to follow-up with the potential.

    Scenario - Assign task to the invoice owner if the invoice payment due date is nearing

    Record Type - Invoices

    Execute On Create
    Rule Criteria -
    Instant Actions -
    Time Based Actions Execution Time - 3 Day(s) Before Due Date
    An Alert and Task
    Create an email that needs to be sent to the invoice record owner as a reminder to collect payments within the due date. Also, create a task to collect the payments.

    Scenario - Send an email to users who are evaluating your product, asking them for their feedback.

    Record Type  -
    Leads

    Execute On Create or Edit
    Rule Criteria Lead Status is Product Evaluation
    Instant Actions An Alert
    Create an email that provides information on your product and lists out the help resources.
    Time Based Actions
    • Execution Time - 7 Day(s) After Evaluation Start Date
      An Alert and Task
      Create an email template to be sent to the customers, highlighting some important features in your product.

    • Execution Time - 14 Day(s) After Evaluation Start Date
      An Alert and Task
      Create an email template to be sent to the customers, asking them their feedback on your product and informing them of the evaluation period coming to an end. Also, you can assign a task for the record owner to personally call and see if the lead is interested to purchase.

    Webhooks

    Webhooks facilitates communication with third-party applications by sending instant web notifications every time an event occurs in Zoho CRM. With Webhooks, you can configure HTTP URLs and associate them in workflow rules to automate the entire notification process. For general information about Webhooks, please refer to webhooks.org.

    Scenarios

    • After closing a potential in Zoho CRM, you can push the customer information to Accounting software (e.g. Zoho Books) and automatically generate an Invoice for the Customer.
    • You can add subscribers to the mailing list in Email Marketing software (e. g. MailChimp) based on leads or contacts collected from your Website using Zoho CRM's Web forms.
    • You can trigger SMS reminders to field sales reps about customer meetings, demos and other events.
    • You can generate an estimate in your Accounting software (e.g. Zoho Books) as soon as the opportunity stage is changed from Prospecting to Price Quote.
    • After closing a potential in Zoho CRM, you can automatically calculate the commission for Sales Reps in Sales Commission Application built over Zoho Creator.

    Target Audience

    • CRM Users with Manage Workflow permissions
    • Programmers with REST API skills

    Availability

    Profile Permission Required: Users with the Manage Workflow permissions in can access this feature.

    List of Fields in Webhook

    Field Name Description Data Type Maximum Limit
    Name Specify name of the webhook. Text Alphanumeric(50)
    Description Add a description for the webhook. Text 200 characters
    URL to Notify Specify the REST API URL of the third-party application. URL 200 characters
    Method Select type of API method - POST or GET. By default, system selects POST method. Radio Button -
    Module

    Choose one of the Zoho CRM modules.

    Supported Modules:

    • CRM primary module, such as leads, accounts, contacts, potentials, etc.
    • Events and Tasks

    Note: You can not set up webhooks for Call Logs and Notes modules.

    Picklist -
    Append Entity Parameters

    Specify the Parameter Name and corresponding Parameter Value. This is the request parameters sent while triggering the webhook notification to third-party application.

    Supported Modules:

    • CRM primary modules
    • User
    • Organization
    String 3000 characters
    Append Custom Parameters Specify the CRM Parameter Name and corresponding Value for the webhook.  This is also the request parameters sent while triggering the webhook. The name and the value are as configured. This key/value pair is mainly used to send the Auth tokens, security tokens, etc. String -
    Preview URL Preview the complete webhook URL to be notified to the third-party application. Text Read-only

    Set Up Webhooks

    Setting up Webhooks includes the following three steps:

    • Create a webhook.
    • Associate webhook to a workflow rule.
    • Test webhook integration.

    To create a webhook

    1. Click Setup > Automation > Workflow > Webhooks.
    2. In the Webhooks page, click the Configure Webhook.
    3. In the Configure Webhook page, specify all necessary parameters.
    4. Click Save.

    To associate webhook to a workflow rule

    1. Click Setup > Automation > Workflow Rules.
    2. In the Workflow Rules page, click the Create a Workflow Rule.
    3. In the Workflow Rule page, specify workflow rule parameters.
    4. Under Workflow Actions, select the webhooks to be triggered.
    5. Click Save.

    To test the webhook integration

    1. Add test data in CRM according to your workflow rule criteria.
    2. In your application check for the data received from Zoho CRM via webhook notification.
    3. If there is an error or data mismatch, modify your webhook settings in Zoho CRM.
    4. Continue this test until you obtain the required data from Zoho CRM to your Application.

    Important Notes

    • You can associate up to 6 (1 Instant Action and 5 Time-Based Actions) webhooks per workflow rule.
    • You can transfer data for a maximum of 10 CRM fields from Zoho CRM to third-party applications using webhook.
    • You cannot retrieve data from other Apps to Zoho CRM using webhooks.
    • You must update the API ticket regularly according to limits in third-party applications.
    • You will not receive any email notification, if the Webhook integration stopped functioning due to any issue in a third-party API.
    • If there is any failure in the process, Webhook will send a notification first, Zoho CRM system will send a second notification after 15 min. Thereafter, the system will not send any Webhook notifications for that particular workflow trigger.
    • If you exceed the maximum count per day, the system will not send remaining Webhook notifications to third-party applications and will notify the failure to Administrator. 
    • Zoho CRM will the send the data in following standard format for Date and Date Time fields to third-party applications:
      • Date: yyyy-MM-dd
      • Date Time: yyyy-MM-dd hh:mm

    Business Scenario 1

    Calculate Sales Commission in Zoho Creator App upon closing an Opportunity in Zoho CRM.

    Purpose

    Sales Managers and the Payroll team can use the Sales Commission app to calculate the compensation for your Sales Reps according to a pre-defined formula set by your organization (for example, flat 2% of the closed contract or sales amount). This application helps you to reduce manual entries, minimize errors and save time while calculating commission for your Sales Reps. Additionally, Sales Reps can track their monthly commissions in a central location.

    Pre-requisite

    • Account in Zoho Creator Application
    • Permission to access Zoho API
    • Familiarity with Zoho Creator

    Procedure

    1. Create the Sales Commission App in Zoho Creator (Refer Zoho Creator Tutorial on Creating Apps)
    2. Configure webhook in Zoho CRM
    3. Set up Workflow Rule
    4. Test your webhook integration

    Step 1: Create Sales Commissions App in Zoho Creator

    In Zoho Creator, create the Sales Commission App with following fields:

    • Sales Rep
    • Potential Name
    • Customer Name
    • Opportunity Amount
    • Type of Business: New Business or Existing Business
    • Closing Date
    • Sales Commission

    To create an Application in Zoho Creator refer to the online help

    Step 2: Configure Webhook

    Select the following Fields from the Potentials module while setting up user-defined parameters:

    • Potential Name
    • Closing Date
    • Type
    • Record Owner
    • Amount

    In Webhook, specify the following details:
    URL to Notify:

    1. https://creator.zoho.com/api/xml/write - POST method

    User-defined Parameters (XML or JSON)

    1. <ZohoCreator>
    2.     <applicationlist>
    3.         <application name='sales-commissions'>
    4.             <formlist>
    5.                 <form name='Commissions'>
    6.                     <add>
    7.                         <field name='Name'>
    8.                             <value> ${Potentials.Potential Name} </value>
    9.                         </field>
    10.                         <field name='Closed_Amount'>
    11.                             <value> ${Potentials.Amount} </value>
    12.                         </field>
    13.                         <field name='Closing_Date'>
    14.                             <value> ${Potentials.Closing Date} </value>
    15.                         </field>
    16.                         <field name='Customer_Name'>
    17.                             <value> ${Accounts.Account Name} </value>
    18.                         </field>
    19.                         <field name='Type_of_Business'>
    20.                             <value> ${Potentials.Type} </value>
    21.                         </field>
    22.                         <field name='Sales_Rep'>
    23.                          <value> ${Potentials.Potential Owner} </value></field>
    24.                     </add>
    25.                 </form>
    26.             </formlist>
    27.         </application>
    28.     </applicationlist>
    29. </ZohoCreator>

    Note

    • In the above XML string, name represents the field in Zoho Creator App and the value for data is to be pushed from Zoho CRM.

    Custom Parameters:

    1. https://creator.zoho.com/api/xml/write?XMLString=<XMLSTRING>&apikey=XXXXXXXXXXXX&ticket=XXXXXXXXXXX&zc_ownername=XXXXX

    Note

    • To retrieve data from other apps to Zoho Creator, you must specify the username, API Ticket, and API Key of Zoho API. To generate Zoho API information, refer to the Online Help

    Step 3: Set up Workflow Rule

    Follow these steps in the Workflow Rule page:

    1. Set up workflow criteria as:
      • Type is New Business
      • Stage is Closed Won
    2. Select the webhook as an instant action.
    3. Save workflow rule.

    Workflow Rule Criteria

    Associate Webhook to Workflow Rule

    Step 4: Test your Integration

    1. Add a test potential in CRM with Type and Stage fields as a New Business and Closed Won respectively. While entering test data, ensure that Amount, Closing Data, Record Owner, Account Name and Potential Name are also entered.
    2. Open your Sales Commission App in Zoho Creator and check for the CRM data. 
      If you've not received any data, modify the webhook configuration and continue testing. After successful testing, remove test entries and roll-out this integration to your CRM users.

    Business Scenario 2

    Send SMS alerts to customers and sales reps.

    Purpose

    A payment from a customer is due today. You can send an SMS with the payment due date, customer name, and amount details to your Sales Rep by associating webhook to time-based action in workflow rule.

    Pre-requisite

    • Account in SMS gateway service
    • Permission to access Workflow Rules

    Procedure

    1. Create an account in SMS gateway service
    2. Configure webhook in Zoho CRM
    3. Set up Workflow Rule
    4. Test your webhook integration

    Step 1: Create an account in SMS gateway service

    In your SMS gateway service, create an account and get these details to configure webhook:

    • Sales Rep
    • Potential Name
    • Customer Name
    • Opportunity Amount
    • Type of Business: New Business
    • Stage: Closed Won
    • Payment Due Date (custom field)

    Currently Zoho has partnered with the following SMS Gateway providers:

    You can buy SMS credits and API details from the above vendors.

    Step 2: Configure Webhook

    Select the following Fields from the Leads module while setting up user-defined parameters:

    • IP address of SMS gateway
    • Username
    • API key

    In webhook, specify the following details:

    URL to Notify:

    1. http://<IP Address>/smsgateway/post - POST method

    User-defined Parameters (XML or JSON)

    1. <?xml version="1.0"?>
    2. <m:Library xmlns:m="http://www.screen-magic.com" xmlns="http://www.defns.com">
    3. <username>xxxx@xxxxx.com</username>
    4. <senderid>SMS-Provider</senderid>
    5. <accountid>XXXXXXX</accountid>
    6. <apikey>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</apikey>
    7. <message mobilenumber="${User.Mobile}">Hi ${User.Last Name}, Payment amount ${Potential.Amount} is due today from ${Account.Name}. Please contact ${Contact.Last Name} ASAP</message>
    8. </m:Library>

    Note

    • In the above XML string, we've used Screen Magic gateway for demonstration purpose.

    Step 3: Set up Workflow Rule

    Follow these steps in the Workflow Rule page:

    1. Set up workflow criteria as:
      • Type is New Business
      • Stage is Closed Won
    2. Select the webhook as a time-based action.
    3. Save workflow rule.

    Workflow Rule Criteria

     

    Associate Webhook to Workflow Rule

    Step 4: Test your Integration

    1. Add a test potential in CRM with Type and Payment Due Date fields as a Existing Business and Today respectively. While entering test data, ensure that Amount, Closing Data, Record Owner, Account Name and Potential Name are also entered.
    2. In your mobile phone check for the SMS alert
      If you've not received SMS, modify the webhook configuration and continue testing. After successful testing, remove test entries and roll-out this integration to your CRM users.

    Refer Error Codes

    When execution of webhook fails, one of the following error messages are displayed in Zoho CRM:

    HTTP Status Codes

    • 400 Bad Request - Often missing a required parameter.
    • 401 Unauthorized - No valid API key provided.
    • 402 Request Failed - Parameters were valid but request failed.
    • 404 Not Found - The requested item doesn't exist.
    • 500, 502, 503, 504 Server errors - Something went wrong on third-party application.
    • Error Code 1 - Temporarily not able to connect to the API server. You need to check API server logs, firewalls settings for our requests sent from CRM.

    Custom Errors

    • Internal process failure - When the webhook is not executed due to errors in processing the webhook.
    • Day limit reached - When the company reached the maximum limit for the day.

    Implementation Checklist for Workflow Management

    Summary

    • Workflow Management helps you to automate your sales, marketing and support processes. It includes the following:
      • Workflow Rules - A set of rules that are executed when certain specified conditions are met.
      • Workflow Alerts - Automated email notifications are sent upon triggering a workflow rule.
      • Workflow Tasks - Tasks that are assigned to the users when workflow rules are triggered.
      • Workflow Field Updates - Automatically updating specified field values when workflow rules are triggered.
      • Workflow Follow-ups - Automates the process of following records and opting out the records that you do not want to follow.
      • Custom Functions -  Develop a set of Deluge Scripts to receive response from other applications and update CRM modules when the workflow criteria is fulfilled.
    • While creating a workflow rule, specify the following details:
      • Basic Details - Details on the record type for which the rule applies, rule name, description, and option to activate the rule.
      • Execution Criteria - Criteria that specifies what type of records the rule should be triggered. i.e. records that are created, modified, created & modified, or records for which certain fields are updated.
      • Rule Criteria -Criteria that a record must satisfy to trigger the rule.
      • Instant Actions - Alerts, tasks and field updates that will be triggered immediately when the rule is executed.
      • Time Based Actions - Alerts, tasks and field updates that will be triggered based on a defined time.
    • An Action in a workflow rule can include workflow alerts, workflow tasks and workflow field updates, all for a particular record type such as Leads, Contacts, and Potentials.
    • There are two types of Actions in a workflow rule:
      • Instant Actions - Alerts, tasks and field updates that will be triggered immediately when the rule is executed.
      • Time Based Actions - Alerts, tasks and field updates that will be triggered based on an Execution Time that is defined.
    • Workflow Alerts are email notifications that can be sent to:
      • Customers - Using the Emails fields in the Module
      • Users within the CRM account - By selecting the Groups, Roles, Roles & Subordinates
      • Record Owners and Record Creators - By selecting the respective checkboxes
      • Other recipients - By specifying the email address in the Additional Recipients box.
    • Workflow Tasks can be assigned to the user in your organization. You can use the Remind Assignee to prompt the record owner (through email or pop-up) of the task.
    • Workflow Field Updates can be used if you want to update certain field values in the records when the associated rule is triggered.

    Checklist

    Before using workflow rules, please review the following checklist:

    Important Notes

    Per Day Limits

    Instances when Time Based Actions will be rescheduled

    Instances when Time Based Actions will NOT be rescheduled or deleted

    Important Notes:

    • When using workflow rules, all alerts and tasks will not necessarily be listed. If the rule is for Leads, then only the field updates, tasks and alerts created for Leads will be available for association.
    • You can create a maximum of 5 time based actions for a workflow rule.
    • Each Time Based Action can have a maximum of 5 alerts, 5 tasks and 3 field updates.
    • If the Email Opt Out option is enabled, emails will not be sent to the customers.
    • For the Workflow Management feature, the Organization's Time Zone will be considered for calculating a day. In the absence of the time zone being defined, the Primary Contact's Time Zone will be considered
    • Time Based Actions are not minute based. There can be a delay of few minutes for the time based actions to be triggered.
    • When the email alerts reach the limit for the day, any remaining emails for that day will not be sent.
    • If the Execution Time that is calculated is a time in the past, then the action will be triggered immediately. There can be a delay of few minutes for the time based actions to be triggered.

    Notes on Per Day Limits:

    • (No. of Users * 100) or 5000, whichever is lower will be taken as the maximum limit per day for emails to be sent using workflow alerts.
    • (No. of Users * 50) or 1000, whichever is lower will be taken as the maximum limit per day for the execution of time based actions (that includeds alerts, tasks, and field updates).
    • A maximum of 300 actions will be triggered every hour. If there are more than 300 actions per hour, the remaining actions will be executed in the next hour.
    • The Primary Contact of your CRM account will be notified if the workflow email alerts limit exceeds for the day.
    • The per day limits (for e.g.: email limit) is calculated based on PST.

    Instances when the Time Based actions will be rescheduled:

    • The Execution Criteria for the Rule is either Edit or Create or Edit . When the rule criteria is satisfied for a record, the instant actions are triggered and time based actions are scheduled for the record.
      If a user edits the record and the rule criteria is not fulfilled, then the time based actions scheduled earlier will be deleted. If the record is edited again and the criteria is satisfied, then the time based actions will be rescheduled.
    • For Time Based Actions, the Execution Time can also be based on the custom Date & Time field. When a rule criteria is satisfied for a record, the instant actions are triggered and time based actions are scheduled for the record.
      If a user edits the record to change the value of the date & time field, the time based actions will be rescheduled as per the new date & time value.

    Instances when the Time Based actions will not be rescheduled or deleted:

    1. The Execution Criteria for the Rule is either Edit or Create or Edit . When the rule criteria is satisfied for a record, the instant actions are triggered and time based actions are scheduled for the record.
      If a user edits the record but the rule criteria is not fulfilled, then the time based actions will not be scheduled again.
    2. When a lead is converted, all the time based actions that are scheduled for the record will be deleted.
    3. When the Enterprise Edition is downgraded to the Free Edition, all the time based actions that are scheduled for the record will be deleted.
    4. When records are deleted, all the time based actions scheduled to the record will also be deleted. If the deleted records are restored, the time based actions will not be rescheduled.

    Custom Gallery Functions

    Zoho CRM offers you the following ready to deploy custom functions in Gallery:

    • Roll-up Potential Amount to Account
    • Mass update of Child Contacts
    • Create Projects for Closed Potentials

    You can associate gallery functions with workflow rules using minimal configuration and Deluge Script skils. See Also Deluge Script - Reference Guide.

    Target Audience

    • CRM Users with Manage Workflow permissions
    • Programmers with basic Deluge Script knowledge

    Availability

    Profile Permission Required: Users with the Manage Workflow permissions in can access this feature.

    Use Custom Functions from Gallery

    Using custom functions through Gallery includes the following steps:

    • Associate custom function to a workflow rule.
    • Test custom function integration.

    To associate Gallery custom function with Workflow Rule

    1. Click Setup > Automation > Workflow > Custom Function.
    2. In the Custom Functions page, click Configure Custom Function.
    3. In the Configure Custom Function page, click the Gallery link.
      Custom Function
    4. In the Gallery page, move the mouse pointer to the custom function and click Configure.
    5. In the Configure Custom Functionpage, complete the following steps:
      • Select the module to be associated.
      • Under Argument Mapping section, map the argument with fieild name in CRM module.
      • Click Save.
        Now you can associate the gallery custom function with workflow rule.
    6. In the workflow rule page, click Save.
      Now, your gallery function is associated with workflow rule. When the workflow rule is triggered, gallery function will be automatically executed.

    To test the custom function integration

    1. Add test data in CRM according to your workflow rule criteria.
    2. In your application check for the data received from Zoho CRM via custom function.
    3. If there is an error or data mismatch, modify your custom function code in Zoho CRM.
    4. Continue this test until you obtain the required data from Zoho CRM to your Application.

    Important Notes

    • You can associate up to 6 (1 Instant Action and 5 Time-Based Actions) custom functions per workflow rule.
    • You can transfer data for a maximum of 10 CRM fields from Zoho CRM to third-party applications using custom function.
    • You can retrieve data from other Apps to Zoho CRM using custom function.
    • You must update the API ticket regularly according to limits in third-party applications.
    • You will not receive any email notification, if the custom function integration stopped functioning due to any issue in a third-party API.
    • If there is any failure in the process, Custom function will send a notification first, Zoho CRM system will send a second notification after 15 min. Thereafter, the system will not send any notifications for that particular workflow trigger.
    • If you exceed the maximum count per day, the system will not send remaining custom function notifications to third-party applications and will notify the failure to the Administrator. 
    • Zoho CRM will the send data in the following standard format (for Date and Date Time fields) to third-party applications:
      • Date: yyyy-MM-dd
      • Date Time: yyyy-MM-dd hh:mm

    Programming Custom Functions

    Deluge or Data Enriched Language for the Universal Grid Environment is an online scripting language integrated with Zoho Creator. It helps you to add different types of business logic to the custom function and make it more powerful. The entire database layer is abstracted and you will only map the arguments with fields, while scripting in Deluge. See Also Deluge Script - Reference Guide

    Target Audience

    • CRM Users with Manage Workflow permissions
    • Programmers with Deluge Script knowledge

    Availability

    Profile Permission Required: Users with the Manage Workflow permissions in can access this feature.

    Program Custom Functions

    Programming custom function through Deluge Script includes the following three steps:

    • Program a custom function.
    • Associate custom function to a workflow rule.
    • Test the custom function integration.

    To program a custom function

    1. Click Setup > Automation > Workflow > Custom Function.
    2. In the Custom Functions page, click the Configure Custom Function.
    3. In the Configure Custom Function page, click the Write your own function link. Writer your Custom Function
    4. In the Deluge Script page, complete the following:
      • Specify name of the function and click the Edit Arguments link.
        Custom Function
      • Edit Arguments box and map the argument with fieild name or custom value in CRM module. Custom Function
      • Click Done.
    5. Write your required function in Deluge Script builder. Click Execute Script to validate your code.
      Write your Deluge Script
      If there are no errors, your script is ready to associate with Workflow Rule.
    6. Click Save & Associate.

    To associate custom function to a workflow rule

      1. Click Setup > Automation > Workflow Rules.
      2. In the Workflow Rules page, click the Create a Workflow Rule.
      3. In the Workflow Rule page, specify workflow rule parameters.
      4. Under Workflow Actions, select the custom function to be triggered.
      5. Click Save.

    To test the custom function integration

    1. Add test data in CRM according to your workflow rule criteria.
    2. In your application check for the data received from Zoho CRM via custom function.
    3. If there is an error or data mismatch, modify your custom function code in Zoho CRM.
    4. Continue this test until you obtain the required data from Zoho CRM to your Application.

    Important Notes

    • You can associate up to 6 (1 Instant Action and 5 Time-Based Actions) custom functions per workflow rule.
    • You can transfer data for a maximum of 10 CRM fields from Zoho CRM to third-party applications using custom function.
    • You can retrieve data from other Apps to Zoho CRM using custom function.
    • You must update the API ticket regularly according to limits in third-party applications.
    • You will not receive any email notification, if the custom function integration stopped functioning due to any issue in a third-party API.
    • If there is any failure in the process, Custom function will send a notification first, Zoho CRM system will send a second notification after 15 min. Thereafter, the system will not send any notifications for that particular workflow trigger.
    • If you exceed the maximum count per day, the system will not send remaining custom function notifications to third-party applications and will notify thw failure to Administrator. 
    • Zoho CRM will the send the data in following standard format for Date and Date Time fields to third-party applications:
      • Date: yyyy-MM-dd
      • Date Time: yyyy-MM-dd hh:mm

    Understanding Deluge Script Builder

    The Deluge Script Builder helps you to program the custom functions using drag & drop user interface and execute the function within CRM. It enables you to convert the complex application logic into simple deluge code, without remembering the syntax and functions of Deluge Script. It contains the following components:

    • Delug Script Code
    • Deluge Tasks
      • Conditions
      • Miscellaneous
      • Debug
      • List Manipulation
      • Map Manipulation
      • Web Data
      • XML Manipulation
    • Code Execution

    Write your Custom Function

     List of Deluge Tasks

    Deluge Task Purpose
    Conditions
    Miscellaneous
    Debug
    List Manipulation
    Map Manipulation
    Web Data
    XML Manipulation

    Example

    Business Scenario: Roll up the amount field to parent account when the potential status is "closed won"

    Summary

    Roll-up amount from each potential (status is closed won) to Total Revenue (custom field) field of the related Account. If customer buys 10 times, you can view the total revenue from Account page, instead of pulling a report linking Potentials and Accounts. Based on the revenue from customer, later you can grade them type A, type B, or type C customers.

    Programming Steps

    void workflowspace.Rollup_the_Potential_Amount_to_Accounts(int AccountId, string SumUpField) 

    • void is the return type that will return nothing
    • workflowspace is the namespace in the creator just like a folder to group functions
    • Rollup_the_Potential_Amount_to_Accounts is the name of the function
    • AccountId is a parameter, which holds the ID of Account in CRM
    • SumUpField is another parameter, which holds the field label in Account to which the sum amount is updated while triggering the workflow rule.

    {    accountID1 = (input.AccountId).toString();

    • Here we are type casting account id to a string    

    resp = zoho.crm.searchRecordsByPDC("Potentials", ("accountid"), accountID1);

    • This is a built in method in Deluge Script, which will get the records by searching the field values.
    • Here we specified to search rgw Potential record type which matches the Account Id with the value that is passed as a parameter.    

    total = 0.0;

    • Initialising a local variable to calculate the sum of amount.

    for each rec in resp

    • Iterating all potentials returned by the above method call.

    {       

    stage = (rec.get("Stage")).toLowerCase();

    • Fetching the stage field value of each potential.

    if (stage.contains("won"))

    • Checking the stage value contains "won" for each potential. If it is true, then it will enter to the next line, otherwise go to the next potential.

    {           

    total = (total  +  (rec.get("Amount")).toDecimal());

    • Now adding the amount field's value to the local variable       

    }    }   

    updateResp = zoho.crm.updateRecord(("Accounts"), accountID1, { input.SumUpField : total });

    }

    • This method will update the record in CRM. We mentioned the record type as Account matching the field account id with the passed value with the local variable which currently holds the sum up value.

    Complete Program

    void workflowspace.Rollup_the_Potential_Amount_to_Accounts(int AccountId, string SumUpField)
    {
    accountID1 = (input.AccountId).toString();
    resp = zoho.crm.searchRecordsByPDC("Potentials", ("accountid"), accountID1);
    info resp;
    total = 0.0;
    for each rec in resp
    {
    stage = (rec.get("Stage")).toLowerCase();
    if (stage.contains("won"))
    {
    total = (total + (rec.get("Amount")).toDecimal());
    }
    }
    updateResp = zoho.crm.updateRecord(("Accounts"), accountID1, { input.SumUpField : total });
    }

    Business Scenario 2: Roll up the amount field to parent account when the potential status is "closed won"

    Summary

    Roll-up amount from each potential (status is closed won) to Total Revenue (custom field) field of the related Account. If customer buys 10 times, you can view the total revenue from Account page, instead of pulling a report linking Potentials and Accounts. Based on the revenue from customer, later you can grade them type A, type B, or type C customers.

    Programming Steps

    void workflowspace.Rollup_the_Potential_Amount_to_Accounts(int AccountId, string SumUpField) 

    • void is the return type that will return nothing
    • workflowspace is the namespace in the creator just like a folder to group functions
    • Rollup_the_Potential_Amount_to_Accounts is the name of the function
    • AccountId is a parameter, which holds the ID of Account in CRM
    • SumUpField is another parameter, which holds the field label in Account to which the sum amount is updated while triggering the workflow rule.

    {    accountID1 = (input.AccountId).toString();

    • Here we are type casting account id to a string    

    resp = zoho.crm.searchRecordsByPDC("Potentials", ("accountid"), accountID1);

    • This is a built in method in Deluge Script, which will get the records by searching the field values.
    • Here we specified to search rgw Potential record type which matches the Account Id with the value that is passed as a parameter.    

    total = 0.0;

    • Initialising a local variable to calculate the sum of amount.

    for each rec in resp

    • Iterating all potentials returned by the above method call.

    {       

    stage = (rec.get("Stage")).toLowerCase();

    • Fetching the stage field value of each potential.

    if (stage.contains("won"))

    • Checking the stage value contains "won" for each potential. If it is true, then it will enter to the next line, otherwise go to the next potential.

    {           

    total = (total  +  (rec.get("Amount")).toDecimal());

    • Now adding the amount field's value to the local variable       

    }    }   

    updateResp = zoho.crm.updateRecord(("Accounts"), accountID1, { input.SumUpField : total });

    }

    • This method will update the record in CRM. We mentioned the record type as Account matching the field account id with the passed value with the local variable which currently holds the sum up value.

    Complete Program

    void workflowspace.Mass_update_of_Child_Contacts(int accId) { accountId = input.accId.toString(); rec = zoho.crm.getRecordById(("Accounts"), input.accId); resp = zoho.crm.getRelatedRecords("Contacts", ("Accounts"), accountId); for each ele in resp { mp = map(); mp.put("Mailing Street", rec.get("Billing Street")); mp.put("Mailing City", rec.get("Billing City")); mp.put("Mailing State", rec.get("Billing State")); mp.put("Mailing Zip", rec.get("Billing Code")); mp.put("Mailing Country", rec.get("Billing Country")); mp.put("Other Street", rec.get("Shipping Street")); mp.put("Other City", rec.get("Shipping City")); mp.put("Other State", rec.get("Shipping State")); mp.put("Other Zip", rec.get("Shipping Code")); mp.put("Other Country", rec.get("Shipping Country")); contactId = ele.get("CONTACTID"); updateResp = zoho.crm.updateRecord("Contacts", contactId, mp); } 
    }

    Follow these steps to configure the custom function:

    1. Log in to Zoho CRM.
    2. Open Setup > Automation > Workflow Rules.
    3. Select Potentials from the Module drop-down.
      Custom Function
    4. Under the Excecute On section, select Create or Edit option.
      Custom Function
    5. Under the Rule Criteria section, set the criteria as "Stage" contains "closed won"
      Custom Function
    6. Under the Actions section, click Add Configure Custom Function.
      Custom Function
    7. In the Configure Custom Function page, click the Customized Functions link.
      Custom Function
    8. In the Customized Functions page, click Configure for Roll-up Potential Amount to Accountfunction.
    9. Select the Potential as your module.
    10. Specify values for the arguments as mentioned below:
      • AccountID: Choose "AccountId" column from the list of fields.
      • SumUpField: Specify the field you have in accounts module for the summation.
      • Click "specify custom value" link and type your field name.
    11. Save the configuration to automatically update the sum of the revenue generated by all the potentials of an account in the account module.
    Total votes: 0