Custom Functions | Zoho Sprints Help | Knowledge Base

Custom Functions

Zoho Sprints comes with the capability for you to create custom functions and automate your business process.

A Custom Function is composed of a group of deluge statements that are combined to perform a certain task. This function can be invoked within an application whenever that particular task needs to be performed. Using functions, you can create modules of deluge scripts that can be used in multiple instances. Multiple functions can come together to perform a string of tasks.

Another important aspect is that functions can help your application interact with third party services, allowing you to update data in two separate applications with the script in one application. Zoho Sprints offers two types of functions: Automation and Standalone functions.

Supported Plans : Premier, Premier Trial, ZohoOne, ZohoOne Trial, Remotely, and Remotely Trial

Benefits of using custom functions

  1. Custom function is an efficient and time-saving method to perform repetitive tasks.
  2. A chunk of deluge scripts with the aim of executing a particular task are encapsulated and implemented at multiple events, making it a reusable entity.
  3. It allows you to automate certain processes like calling a webhook, sending notifications, or performing an action at the trigger of an event.
  4. The modular nature of the code makes it easier to manage and use them.
  5. Deluge comes with built-in functions to make scripting easier.
  6. Sprints provides a list of pre-built functions that allows you to execute a few default tasks.
  7. Enable Sprints to interact with third party services using a secure authentication mechanism.

Gallery functions

Gallery functions are predefined functions that are provided to enable you to start automating certain tasks. These are templates that you can start tweaking to suit your requirement and create a function. These provide solutions to specific use cases that are likely to come up during the course of your project in Sprints.



The following are the prebuilt functions:

Update Release status when an item is reopened or closed

This function is used to update the release status as Closed when all work items associated with that release are closed or to update the release status as Open when any of the associated work items are reopened.

Module: Item

Trigger Event: Item Closed, Item Reopened

Close parent item if all its subitems are closed

This function is used in the case of a parent item with multiple subitems. Executing this function will close the parent item when all its subitems are closed.

Module: Item

Trigger Event: Item Closed

Update Epic status when an item is reopened or closed

This function is used to archive an epic when all the work items associated with that epic are closed or to activate an archived epic when any of the associated work items are reopened.

Module: Item

Trigger Event: Item Closed, Item Reopened

Add status update note on linked items

This function is used to add item notes on all the linked items when an item's status is updated. Work items can be linked with one another. When the status of a work item is updated, that update can be added as an item note in the work items that are linked to it. This way, the web of work items remains up to date automatically.

Module: Item

Trigger Event: Item Updated, Item Closed, Item Reopened

Notify users mentioned in the comment via email

This function is used to automate email notifications to the email addresses of the users tagged in a comment.

Module: Item Comments, Sprint Comments, Meeting Comments

Trigger Event: Item Comment Add, Item Comment Update, ItemComment Delete, Sprint Comment Add, Sprint Comment Update, Sprint Comment Delete, Meeting Comment Add, Meeting Comment Update, and Meeting Comment Delete

Post a message on Slack Channel

This function enables you to integrate Sprints with Slack, an external office communication service. You could have messages posted on Slack at the trigger of events like closing a work item, reopening a work item, starting a sprint, and more. So when an event is triggered, you can notify your team on Slack channel that is meant for your sprint team.

Module: All modules

Trigger Event: All events

Note: Integrating with other services requires you to create a connection.
  1. Create a connection for the Slack service with the scopes "chat:write:bot".
  2. Find 'slackconnection' & replace it with the connection name you've provided.
  3. Configure valid slack channel ID in "channelId" custom parameters on the left side.
  4. Switch off Use Credentials of Login User  while creating the connection.

Post a message on Cliq Channel

This function enables you to integrate Sprints with Cliq, another Zoho service which is an office communication system. You could have messages posted on Cliq at the trigger of events like closing a work item, reopening a work item, starting a sprint, and more. So when an event is triggered, you can notify your team on Cliq channel meant for your sprint team.

Module: All modules

Trigger Event: All events

Note: Integrating with other services requires you to create a connection.
  1. Create a connection for the ZohoCliq service with the scopes "ZohoCliq.Webhooks.CREATE".
  2. Find 'cliqconnection' & replace it with the connection name you've provided.
  3. Configure valid Cliq channel name in "channelUniqueName" custom parameters on the left side.
  4. Switch off Use Credentials of Login User while creating the connection.

Function Logs

Function logs help you monitor those functions that have been deployed in your application. This will enable you to audit the status of the executed functions and the execution responses. When a function fails to be executed, you can view the execution response to understand the cause of failure and take remedial measures to fix it. A failed function provides you with three chances to retry executing it.

Function logs will be periodically updated. Logs that are older than a month will be permanently deleted from the backend.



Manage custom functions

  1. Create function
  2. Edit function
  3. Delete function
  4. Create function from gallery

Create function

To create custom function:
  1. Click on the setup icon to navigate to the Setup page.
  2. Select Automation.
  3. Select Custom Functions.
  4. Click the dropdown on the Function button.
            

  5. Select the Function. The Create Custom Functions window will appear.
  6. Enter Display Name.
  7. Enter Function Name.
  8. Note: According to the general naming convention, function name cannot contain spaces.
  9. Select Category as Automation.
  10. Select the Module in which the function needs to be executed.
  11. Select the Trigger Event at which the function needs to be executed. The trigger events are dependent on the module that you select.
  12. Provide a Description of the function.
  13. Enter Parameter Name and select the Parameter Value. Or, provide custom parameters and values.
  14. Note: A parameter is a variable assigned to a value in a function. The parameter value is the information passed in the function. In other words, the parameter name is the container and the parameter value is the information contained in it. These allow you to build a logical script into which actual input data can be passed when the function is invoked
  15. Script the function using the Deluge script builder.



  16. Click Save to complete creating the function or click Save and Execute to complete creating the function and execute it.

Edit function

To edit custom function:
  1. Go to the listing page of Custom Functions .
  2. Hover on the Function that needs to be edited. The wheel icon will appear.
  3. Click the dropdown arrow.



  4. Select Edit . The Edit Custom Action window will appear.
  5. Make the changes.
  6. Click Save to save the changes.

Delete function

To delete custom function:
  1. Go to the listing page of Custom Functions .
  2. Hover on the Function that needs to be edited. The wheel icon will appear.
  3. Click the dropdown arrow.
            


  4. Select Delete . A confirmation pop-up will appear.
  5. Select the checkbox to agree that you've been warned about the loss of related data.
  6. Click the Yes, delete button. The function will be deleted and removed from the listing page.

To create custom function using gallery functions:
  1. Click on the setup icon to navigate to the Setup page.
  2. Select Automation .
  3. Select Custom Functions .
  4. Click the dropdown arrow on the Function button.



  5. Select Gallery Function .
  6. Hover on the required function.



  7. Click the Create button. The Create Custom Function window will appear.
  8. Enter Display Name
  9. Enter Function Name .
  10. Note: According to the general naming convention, function name cannot contain spaces.
  11. Select Category as Automation .
  12. Note
    1. The Module, Description, Parameter Names, and Parameter Values are predetermined based on the logic of the probable scenarios. You can edit them if necessary.
    1. A parameter is a variable assigned to a value in a function.
    1. The parameter value is the information passed in the function. In other words, the parameter name is the container and the parameter value is the information contained in it. These allow you to build a logical script into which actual input data can be passed when the function is invoked.
  13. Select the Trigger Event at which the function needs to be executed. The trigger events are dependent on the module selected.
              


  14. Edit the existing script in the Deluge script builder to suit your requirement.
  15. Click Save to complete creating the function or click Save and Execute to complete creating the function and execute it.

Manage standalone functions

Use standalone functions to process data that are operated by external parameters. Zoho Sprints provides the ability to create functions and use REST APIs to execute them to arrive at simple business solutions. These functions can be triggered from third party services or the web.
 
Standalone functions can be executed in two ways: Creating schedule to execute the functions or using APIs to execute them.
 
Scenario 1: Execute via schedule
 
Let's assume as an admin user you need to notify users of overdue work items. To meet this requirement, you can create a standalone function to send weekly email reminders with an attached file containing the list of overdue items. You can create a recurring weekly schedule for the function to be executed periodically. With a one-time scripting effort, you could automate a critical business process.
 
Scenario 2: Execute via API
 
Let's assume you are trying to invoke a function from Zoho CRM. When you are adding a new lead to your CRM, you want to create a corresponding work item in Zoho Sprints. To achieve this, you need to pass the Item fields as custom parameters.

Create standalone function

To create a standalone function:
  1. Click on the setup icon to navigate to the Setup page.
  2. Select Automation.
  3. Select Custom Functions.
  4. Click the dropdown on the Function button.
  5. Select the Function. The Create Custom Functions window will appear.
  6. Enter Display Name.
  7. Enter Function Name.
    Note: According to the general naming convention, function name cannot contain spaces.
  8. Select Category as Standalone.
  9. Select the Recurrence Type to determine the frequency at which the function needs to be executed.
  10. Enter schedule specifications based on the recurrence type.
  11. Provide a Description of the function.
  12. Script the function using the Deluge script builder.

  13. Click Save to complete creating the function or click Save and Execute to complete creating the function and execute it.

 

Execute function using API

APIs enable you to execute a function remotely using the function's unique ID.



Access parameter

You can pass custom parameters in standalone functions. Parameter refers to the value that is passed in the function. Passing this value in the function enables you to get the required response or output. The format for the parameter is that of key value pairs.

To access param "key1" in deluge, enter value = sprintsAPIRequestMap.toMap().get("params").toMap().get("key1");




Note:
  1. You can customize the status code and send custom headers in your request.
  2. You can enter up to 25 parameters.

Define response object

Define the format in which the response of the API needs to be. The default response format in functions is JSON when the return is null. However, Sprints standalone functions support other formats like XML, HTML and Plain Text where you need to map object. The response format data has to be given to “sprintsAPIResponse" key in a map if you wish to format default response format 

Points to remember

  1. A maximum of 20 parameters can be included while creating a function.
  2. A maximum of 15 custom parameters can be included while creating a function.
  3. A function can be disabled or enabled.
  4. The name of the function cannot be modified once created.
  5. When a function execution fails continuously for 15 times, a Function Disable Alert email will be sent to the team owner and to those who created and updated the function.
  6. A function will not be executed if it is disabled.
  7. Connections enable integration with other services. To create a connection, go to Automation and select Connections.
  8. A function can be manually executed but the parameter value will only be passed with 'null' value.
  9. Functions that are executed will be recorded under Function Logs.
  10. Function logs that are older than a month will be permanently deleted.
  11. You can try to execute a failed function thrice.
  12. You cannot execute a function that was already executed successfully.


    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                    Manage your brands on social media

                                      Zoho Desk Resources

                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day


                                        Zoho Marketing Automation

                                          Zoho Sheet Resources

                                           

                                              Zoho Forms Resources


                                                Secure your business
                                                communication with Zoho Mail


                                                Mail on the move with
                                                Zoho Mail mobile application

                                                  Stay on top of your schedule
                                                  at all times


                                                  Carry your calendar with you
                                                  Anytime, anywhere




                                                        Zoho Sign Resources

                                                          Sign, Paperless!

                                                          Sign and send business documents on the go!

                                                          Get Started Now




                                                                  Zoho TeamInbox Resources



                                                                          Zoho DataPrep Resources



                                                                            Zoho DataPrep Demo

                                                                            Get a personalized demo or POC

                                                                            REGISTER NOW


                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                  • Related Articles

                                                                                                  • Custom Fields for Users

                                                                                                    Custom fields and layouts enable you to tailor the layout to your specific requirements. Zoho Sprints provides you with the list of custom fields that you can drag and drop to create your layout. To customize layout for users module: Go to Setup on ...
                                                                                                  • Install Zoho Sprints for iPhone

                                                                                                    Zoho Sprints is now available on your mobile. Install the Zoho Sprints app from your iPhone and manage your work on the go. Requirements: iOS - 13 and above Install Zoho Sprints to your iPhone You can either install it from your App Store or iTunes. ...
                                                                                                  • Install Zoho Sprints for Android

                                                                                                    Zoho Sprints mobile app is now available for Android mobiles. If you're an Android user you can download the app and manage your projects and sprints in just a tap. Requirements: Android 4.1 and above Install from play store Go to your Play Store. ...
                                                                                                  • What is the difference between Zoho Sprints and Zoho Projects?

                                                                                                    Zoho Sprints and Zoho Projects both are project management tools that helps your business manage work efficiently. If your team follows a conventional process to manage work and coordinate tasks then you can choose Zoho Projects. It follows the ...
                                                                                                  • Import your data from JIRA to Zoho Sprints

                                                                                                    As a first step, you will have to configure your JIRA account with your team in Zoho Sprints to which the data has to be imported. A few key points to know before you start to import Only a Team Owner or Admin can carry out the configuration. If you ...
                                                                                                    Wherever you are is as good as
                                                                                                    your workplace

                                                                                                      Resources

                                                                                                      Videos

                                                                                                      Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                      eBooks

                                                                                                      Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                      Webinars

                                                                                                      Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                      CRM Tips

                                                                                                      Make the most of Zoho CRM with these useful tips.



                                                                                                        Zoho Show Resources