Create custom script, allow end users to define criteria, and obtain personalized outcomes.
What are custom actions?
Custom actions make it simple to carry out a templated action or task that end users can reuse, leading to personalized outcomes based on the criteria the end user specifies. By defining criteria using workflow rules, custom actions enable users to use a custom template repeatedly.
When are they useful?
In cases where the end user wants a templated action to occur with different outcomes for different trigger criteria, they must create a separate workflow for each trigger criteria and then add a function to achieve the desired result. Consider an option in which the user doesn't have to worry about creating a new function for each criteria, but instead is provided with a custom action they can reuse by implementing workflows and simply associating the custom action to those workflows, as well as personalizing inputs.
Custom actions are extremely useful when a customized UI template and a function are made available as part of extension development. They allow the end user to create workflows and provide personalized inputs to perform and reuse the defined custom action, resulting in personalized outcomes.
Let's look at an example to understand custom actions better. Assume you have created an extension to provide your users with a customized email template that allows them to send personalized emails on various occasions. To accomplish this, you can create a custom action that includes a customized UI template for accepting an email's subject and body fields, as well as a custom script that sends an email based on the values entered for both fields in the UI.
When the end user installs the extension and creates a workflow, the custom action will now be available as an option to be associated with the workflow. The end user can define multiple workflows, each of which triggers personalized emails based on different criteria, by simply associating your custom action with the workflow.
Creating a custom action
Steps to be done by extension developer
- Create a custom action and associate a customized UI to it.
- Customize a UI to retrieve the user input.
- Define functionalities through the use of a custom script that accepts user input from the custom UI as its parameters.
Steps to be done by the end user in their Zoho CRM account
- Create a workflow rule in the Zoho CRM account and associate a custom action to it.
Custom action flow:
- The custom action consists of a custom user interface and a custom script that the developer defines as part of the extension development process.
- The end user creates the workflow in their Zoho CRM account and associates the custom action with that workflow.
- The personalized UI is displayed to the end user; the end user enters personalized inputs.
- When the workflow criteria is met, the end user inputs are passed as parameters to the custom script, which powers the script and returns personalized results.
In this post, we have talked about the steps to create a custom action and its workflow. In the next post, we'll look at a working example of how a custom action could be used efficiently. Hope you found this information useful. Keep following this space for more insights!