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
- Use Custom Functions to automatically move cards to the previous or next stages, when specific transitions or card updates are performed.
- 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:
- OAuth 2.0
- 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:
Best Practices
- Do not share the API key with unauthorized or external users, as any user with access to the API key can perform all operations.
- 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
Navigate to
and select Custom Functions under Advanced from the menu.
Click New Custom Function.
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.
Click Save or Save & Execute.
- Card-based custom functions can only be invoked using OAuth 2.0 protocol.
- Only card-based custom functions can be invoked from blueprints and business rules.
- Module type , once selected, cannot be edited.
- Arguments for dropdown fields can be passed using the field ID obtained via API.
Create a standalone custom function
Navigate to
and select Custom Functions under Advanced from the menu.
Click New Custom Function.
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.
Click Save or Save & Execute.
- Standalone custom functions can be invoked using OAuth 2.0 protocol or API key.
- 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 .
- Hover over the custom function and click
.
- Select REST API from the dropdown.
- 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.
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.
Navigate to
and select Business Rules under Automation from the menu. (or)
- Navigate to board specific business rules using quick access settings. Learn more.
- Create a new business rule or open an existing rule. Learn more about business rules .
- Fill in the rule details and move to Criteria & Actions.
- Now , click the
icon next to Instant Actions or Schedule Actions and select Custom Functions from the dropdown.
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 .
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.
- Navigate to the associated custom function in Blueprint/Business Rule and hover over it.
- Click more options and check Prioritize this function’s execution .
Note:
- Custom functions configured under Schedule Actions cannot be prioritized.
- 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.
Navigate to
and select Custom Functions under Advanced from the menu . (or)
Navigate to board specific business rules using quick access settings. Learn more.
-
Mouse over the function name you want to delete.
Click
and choose Delete .
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 ...
Configure Outbound REST Web Service
Early Access This feature is not enabled for all users. If you’d like to try it out, please email our support team for early access. Outbound REST Web Services enables users to interact with external web services by sending HTTP requests to retrieve, ...
Custom Module
Early Access Custom Module is not enabled for all users. If you’d like to try it out, please email our support team for early access. The predefined modules in a Bridge may help you reach a DB/App server/AD and accomplish your tasks. However, to meet ...
Functions
Early Access Functions are not enabled for all users. If you have enabled Circuit in your organization, all your custom functions will be migrated as functions. If you’d like to try out Circuit, please email our support team for early access. ...
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 ...