Manage Custom Functions

Manage Custom Functions

Custom functions allow users to develop and execute user-defined functions using Deluge. You can execute simple program snippets to automate processes, or integrate with third-party or Zoho applications.   

Business Uses for Custom Functions

  1. Custom Functions can be used to move jobs automatically to the previous or next stages when specific transitions or job updates are performed.
  2. You can also post comments, messages or updates to other applications used in your organization like Zoho Desk, Zoho Cliq, or MS Teams, using Custom Functions. 
Users can configure new custom functions or use the set of pre-defined functions available in the Function Gallery.

API Authentication for invoking custom functions

Custom functions can either be invoked within Orchestly using blueprints and business rules, or from other third-party applications using API calls. To trigger functions using API, Orchestly supports two different authentication methods:
  1. OAuth 2.0
  2. API key


OAuth 2.0 protocol is a secure mode of authentication allowing users to access the REST APIs to perform get, create, update, and delete operations in their organization. 

Learn how to authorize using OAuth 2.0 in Orchestly.

API key provides one-time authentication but is not as secure as OAuth 2.0 authentication. While OAuth 2.0 protocol demands the regeneration of access tokens every hour, API key provides a one time key for authentication. 

Use the following Request URL format to authenticate using API key: 

  1. https://orchestly.zoho.com/blueprint/<organization-name>/customfunction/executeFunction/<custom-function-ID> 
Best Practices
  1. Do not share the API key with unauthorized or external users, as any user with access to the API key can perform all operations. 
  2. We recommend that you regenerate the API key periodically to ensure security. 

OAuth 2.0 authentication
API key authentication
OAuth 2.0 protocol uses header for authentication.
API key is authenticated in the Request URL
All the custom functions in Orchestly can be authenticated using OAuth 2.0 protocol.
Only  standalone functions can be authenticated using API key.
In OAuth 2.0 authentication, the access token expires every hour. Refresh tokens are used to generate new access tokens. 
API key has to be generated just once. It  does not expire.

Business Scenarios  
  • Update your company’s website automatically with the number of open job positions once a candidate is selected in the recruitment process.

  • Calculate the total time spent by a user on each stage and email a detailed summary to the client for billing.

  • Integrate Orchestly with a calendar application and send interview invites to the shortlisted candidates.

  • Integrate Orchestly with  Jira to add a job in Orchestly for every project created in Jira. 


Create a job-based custom function

  1. Navigate to    and select  Developer   from the left panel.

  2. Click the  Add Custom Function button under  the  Custom Functions  tab.

  3. Fill in the details:

    • Module Type :   Select  Jobs if the function requires job arguments. 

    • Function Name  : Name your function.

    • Return Type  : Return type for job-based custom functions will always be void

    • Description  : Describe how the function works.

    • Arguments  : Enter the arguments that are used in the code snippet. 

    • Connections  : Configure internal or third-party integrations here. Learn more about connections.

    • Code your custom function. 

  4. Click  Save or  Save & Execute.    

  1. Job-based custom functions can only be invoked using OAuth 2.0 protocol.
  2. Only job-based custom functions can be invoked from blueprints and business rules. 
  3. Module type , once selected, cannot be edited.  



Create a standalone custom function 

  1. Navigate to       and select  Developer   from the left panel. 

  2. Click the  Add Custom Function  button under  the  Custom Functions  tab.

  3. Fill in the details:

    • Module Type  : Select  Standalone if the function requires only independent arguments. 

    • Function Name  : Name your function. 

    • Return Type  : Select a return type for the custom function. 

    • Description  : Describe how the function works.

    • Arguments  : Enter the arguments that are used in the code snippet. 

    • Connections  : Configure internal or third-party integrations here.  Learn more  about connections.

    • Code your custom function. 

  4. Click  Save  or  Save & Execute.    

  1. Standalone custom functions can be invoked using OAuth 2.0 protocol or API key. 
  2. Module Type , once selected, cannot be edited.  



Invoking standalone functions using API key  

To invoke a standalone function using API key, it has to be enabled first. Make sure that the API key is generated in the Organization Setup

  1. Hover over the custom function and click  .
  2. Select  REST   API from the dropdown.
  3. Toggle the button next to the API key to enable it.

Scheduling Custom Functions

Custom functions can be triggered periodically or at defined time intervals using Schedules in Orchestly. 

Note: 
Custom functions that are being used in Schedules cannot be deleted. 

Associate custom function with blueprints 


Custom functions can be configured to be triggered after a transition takes place in a blueprint. Learn more about blueprints.
  1. Navigate to   and select  Automation  from the left panel.

  2. Create a new blueprint or select an existing one. Learn how to create a blueprint. 

  3. Click on a transition and navigate to the  After section. 

  4. Click the   sign next to  Associate Custom Functions .

  5. Select a function from the  Function Gallery or  Configured Functions.

    • While associating a function from the gallery, click  Save as New. 

    • While associating a configured function, click  Save  or  Save & Execute.  

  6. Once the functions are configured,  Publish  the blueprint. 



A maximum of 3 custom functions can be associated with each blueprint transition.  

Associate custom function with business rules


Business rules are configured to be triggered when a job is created or updated, or when a field is updated. Learn more  about business rules here. Business rules can in turn trigger the custom functions associated with it. 
  1. Navigate to     and select  Automation   from the left panel.

  2. Under the  Business Rules tab, click  Add Business Rule button.

  3. Configure your business rule. Learn more  about adding a new business rule.

  4. In the  Actions section, click the   button next to  Associate Custom Functions .  

  5. Select a function from the  Function Gallery or  Configured Functions.

    • While associating a function from the gallery, click  Save as New. 

    • While associating a configured function, click  Save  or  Save & Execute .  

  6. Once the functions are configured, click  Save  



A maximum of 3 custom functions can be associated with each business rule.

Delete custom function


If you no longer require a custom function, you can delete it. Once a custom function is deleted, it will be removed from the associated blueprint transitions and business rules.  
  1. Navigate to     and select  Developer   from the left panel.

  2. Under the  Custom Functions  tab, mouse over the function name you want to delete. 

  3. Click   and choose  Delete.

  4. Confirm your action.  


    • Related Articles

    • Custom Functions

      Custom functions help in automation where procedural logic is required, which cannot be implemented with the default actions such as, Tasks, Webhooks, etc. With custom functions you can automatically update the data in the related Zoho Recruit ...
    • Custom Functions

      The Manage Business icon in the top menu bar is your go-to for managing all of your booking preferences. This page discusses Custom Functions. Aside from the default flow of a customer booking, you can define additional workflows at each stage of the ...
    • Custom functions

      Automate your issues workflow using Custom Functions. What Is a Custom Function? A custom function is a piece of code that can be used for automating a process. You can write your own function in Deluge and call it from one or more business rules. It ...
    • Custom Functions

      Zoho Recruit Custom functions help you to update data in related Recruit modules or third-party applications by executing simple program scripts. When a record matches the workflow criteria, workflow engine automatically triggers the custom ...
    • Custom Functions

      Super admins and admins can view and edit this information. Managers can only view this information. Staff members will not have access to this information. Custom functions help with automating actions that require procedural logic and that cannot ...