Manage Custom Functions | Online Help | Qntrl | Circuit

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. Use Custom Functions to automatically move cards to the previous or next stages, when specific transitions or card 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 set of pre-defined functions available in the  Function Gallery.

API Authentication for invoking custom functions

Custom functions can either be invoked within Qntrl using blueprints and business rules, or from other third-party applications using API calls. To trigger functions using API, Qntrl 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 authorise using OAuth 2.0 in Qntrl.

API key provides you 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://core.qntrl.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  Qntrl  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 dynamically 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 Qntrl with a calendar application, and send interview invites to the shortlisted candidates.

  • Integrate Qntrl with  Jira to add a card in Qntrl for every project created in Jira. 


Create a card-based custom function

  1. Navigate to   and select Custom Functions under Advanced from the menu.

  2. Click  New Custom Function.

  3. Fill in the details:

    • Module Type :   Select  Cards  if the function requires card arguments. 

    • Function Name  : Name your function.

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

    • Description  : Describe how the function works.

    • Arguments  : Enter the arguments that are used in the code snippet. You can either use the Custom Value or choose a Form Field from the dropdown. Form fields capture dynamic values from card fields corresponding to the custom function.   

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

    • Code your custom function. 

  4. Click  Save or  Save & Execute.    

  1. Card-based custom functions can only be invoked using OAuth 2.0 protocol.
  2. Only card-based custom functions can be invoked from blueprints and business rules. 
  3. Module type , once selected, cannot be edited.  
  4. Arguments for dropdown fields can be passed using the field ID obtained via API.



Create a standalone custom function 

  1. Navigate to    and  select  Custom Functions  under  Advanced   from the menu.   

  2. Click  New Custom Function.

  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 Qntrl. 

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  Boards , hover over any specific board in the left panel and click     to choose  Manage Board . (or)
  2. Navigate to  to select a board.
  3. Navigate to  Step 2: Design Blueprint
  4. Click on a transition and navigate to the  After section in the right panel.
  5. Now, under   Instant Actions  or  Schedule Actions  , click the    icon next to  Associate Custom Functions
  6. Select a function from the  Function Gallery or  Configured Functions.
    1. While associating a function from the gallery, click  Save as New. 
    2. While associating a configured function, click  Save  or  Save & Execute .  
  7. Once the functions are configured,  Save   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 card 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  Business Rules under  Automation from the menu. (or)

  2. Navigate to board specific business rules using quick access settings. Learn more.
  3. Create a new business rule or open an existing rule.  Learn more about  business rules .
  4. Fill in the rule details and move to   Criteria & Actions.
  5. Now  ,   click the    icon next to   Instant Actions  or  Schedule Actions  and select  Custom Functions    from the dropdown.
  6. 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 .  

  7. Once the functions are configured, click  Save .  




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

Prioritize custom function 


Once a custom function is triggered in  Qntrl , it might take a minute or two to execute. However, you can choose to prioritize certain custom functions and execute it instantly.  
  1. Navigate to the associated custom function in Blueprint/Business Rule and hover over it.
  2. Click more options and check Prioritize this function’s execution .
  

Note: 
  1. Custom functions configured under Schedule Actions cannot be prioritized.
  2. Only one custom function per Instant Action block can be prioritized. 

Delete custom function


You can delete a custom function if you no longer require it. Once deleted, it will be removed from the associated blueprint transitions and business rules.  
  1. Navigate to    and  select  Custom Functions  under    Advanced   from the menu . (or)

  2. Navigate to board specific business rules using quick access settings. Learn more.


  3. Mouse over the function name you want to delete. 
  4. Click  and choose  Delete .

  5. Confirm your action.  


    • Related Articles

    • REST API

      Access Privilege API key can be generated only by the Organization Owner. An API key provides a one-time authentication for triggering API calls in Qntrl. Only the standalone custom functions can be invoked using the API key. Navigate to and select ...
    • Custom Function: Create_Job

      This custom function can be used to create a new card in any board. It can also be configured to carry forward necessary field values from the former card to the latter. Business Scenario Helen is the head of Procurement Management in her ...
    • Custom Function: Computing_Field_Values

      This custom function can be used to add two values and save the return value in a custom field. The sum will be dynamically updated in the custom field after this function is executed. Business Scenario Helen is the head of Procurement Management at ...
    • Custom Function: Create_Ticket_in_Zoho_Desk

      Zoho Desk is customer service software which allows you to address customer concerns. This custom function can be used to post a card as a ticket in Zoho Desk. Prerequisites Sign up for Zoho Desk and create a department. The ticket will be created in ...
    • Connections in Qntrl

      Qntrl allows users to integrate with internal Zoho applications and other third-party applications using Connections. Connections can be established in Qntrl by configuring the custom functions. Please create relevant custom functions before creating ...

    You are currently viewing the help articles of Qntrl 3.0. If you are still using our older version and require guidance with it, Click here.