Skip to main content

Custom Actions

Custom Actions is a component within an extension. So, you’ll have to create an extension in Sigma and create a widget before you can configure the custom action. Once configured, you can publish it as an extension privately. Next, you can install the Custom Actions extension in your Zoho products organization, and it will be listed under the default Workflow Actions in Zoho products settings. Here, you can create new actions that can be associated with a workflow rule, and the action will be executed when the workflow rule’s conditions are met.

Methods

Get Customaction

The get method of the customaction module allows you to retrieve details of a specific custom action configured in your Zoho Products organization. You can use this method to fetch information such as the name, description, input parameters, entity type, and associated entities of the custom action. This is particularly useful when you want to display or utilize the custom action's details within your widget or extension.

Supported Locations :
customaction.widgetcustomaction.list.widget
Sample Code :
REQUEST DETAILS
ZFAPPS.get('customaction')
  .then(data => console.log('customaction:', data))
  .catch(err => console.error('Error:', err));
Supported Input Keys :
PropertyRequest
namename
descriptiondescription
customaction_inputcustomaction_input
entity_typeentity_type
entitiesentities

Set Customaction

The set method of the customaction module allows you to create or update a custom action in your Zoho Products organization. You can use this method to define the properties of the custom action, such as its name, description, input parameters, and associated entity type. This is particularly useful when you want to programmatically manage custom actions within your widget or extension, enabling you to automate workflows and enhance the functionality of your Zoho Products environment.

Supported Locations :
customaction.widget
Sample Code :
REQUEST DETAILS
let customActionInputData = {};

customActionInputData['message'] =  document.getElementById('message').value;
customActionInputData['subject'] =  document.getElementById('subject').value;
customActionInputData['toAddress'] =  document.getElementById('address').value;
let updateCustomActionData = {
   'name' : document.getElementById('name').value,
   'entity_type' : document.getElementById('entity').value,
   'description' : document.getElementId('descp').value,
   'customaction_input' : JSON.stringify(customActionInputData)
};

ZFAPPS.set('customaction', updateCustomActionData)
Supported Input Keys :
PropertyRequest
namename
descriptiondescription
customaction_inputcustomaction_input
entity_typeentity_type
Note:

This set method only work for 'ON_CUSTOMACTION_PRE_SAVE' event inside.