# Functions -------------------------------------------------------------------------------- title: "Introduction" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.638Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/introduction/" service: "Serverless" -------------------------------------------------------------------------------- # Functions ### Introduction Functions is a Catalyst Serverless component that are custom-built coding structures which contain the intense business logic of your application. Functions allow you to store the functionality of the application in a centralized and secure place, rather than storing it within the application's main code. The application uses APIs to invoke functions from the Catalyst servers when needed. Catalyst offers support to develop server-side functions in three programming environments: 1. {{%bold%}}Java{{%/bold%}} 2. {{%bold%}}Node.js{{%/bold%}} 3. {{%bold%}}Python{{%/bold%}} You can refer to {{%link href="/en/sdk/java/v1/overview/" %}}Java SDK documentation{{%/link%}}, {{%link href="/en/sdk/nodejs/v2/overview/" %}}Node.js SDK documentation{{%/link%}} and {{%link href="/en/sdk/python/v1/overview" %}}Python SDK documentation{{%/link%}} to learn about these SDK packages. Catalyst Functions is one of the {{%link href="/en/cli/v1/project-directory-structure/introduction/" %}} basic project components of a Catalyst application{{%/link%}}, along with the client. You can seamlessly access Catalyst components with functions and provide the powerful backend that the application or microservice requires. You can use them to automate tasks, perform memory-intensive computations, integrate with third-party services, and more. You can create five types of server-side functions in Catalyst for different purposes. All five types of functions can be created in Java, Node.js and Python programming environments. * {{%bold%}}Basic I/O Functions:{{%/bold%}} Simple functions used for basic input and output operations, passing a String as the I/O parameter * {{%bold%}}Advanced I/O Functions:{{%/bold%}} Advanced HTTP functions that support Headers, and Native Request and Response objects * {{%bold%}}Event Functions:{{%/bold%}} Event-driven functions that are invoked by specific events configured using {{%link href="/en/cloud-scale/help/event-listeners/introduction/" %}}Event Listeners{{%/link%}} * {{%bold%}}Cron Functions: {{%/bold%}} {{%link href="/en/cloud-scale/help/cron/introduction/" %}}Cron{{%/link%}} based functions that are invoked one time or periodically, based on the cron job's configured schedule * {{%bold%}}Integration Functions:{{%/bold%}} Functions that enable you to integrate with other Zoho services and write backends for them easily {{%note%}}{{%bold%}}Note:{{%/bold%}} * The main function file in Java, Node.js and Python are initialized with different default code for each function type, such as including different modules, when the function is created. Therefore, you must avoid copying code from a different function type. You must ensure that you initialize the appropriate modules for each function type. * Integration functions is currently not available to Catalyst users accessing from the EU, AU, IN, or CA data centers.{{%/note%}} Catalyst provides various components and tools to manage functions and view their performance statistics: * {{%link href="/en/serverless/help/security-rules/introduction/" %}}**Security Rules{{%/link%}}:** Default security configuration of your Basic I/O and Advanced I/O functions that enables you to define their invocation and access rules * {{%link href="/en/cloud-scale/help/api-gateway/introduction/" %}}**API Gateway{{%/link%}}:** Enables you to create APIs for your Basic I/O and Advanced I/O functions, and handle the routing, throttling, authentication of client requests * {{%link href="/en/devops/help/logs/introduction/" %}}**Logs{{%/link%}}:** Provides logs of all function executions along with details of log levels, responses, statuses, and other information * {{%link href="/en/devops/help/apm/introduction/" %}}**Application Performance Monitoring{{%/link%}}:** Provides in-depth stats and performance reports of all function executions that enable you to identify and resolve bugs * {{%link href="/en/serverless/help/circuits/introduction/" %}}**Circuits{{%/link%}}:** Workflow automation tool that enables you to design and orchestrate Basic I/O function executions, and handle data flow between multiple functions You can either work with functions using the Catalyst CLI and an external IDE, or work with them directly from the Catalyst web console. This document explains the concepts related to functions and working with them from the Catalyst web console. To learn about working with them in a local environment, refer to {{%link href="#steps-to-work-with-functions-from-a-local-environment" %}}the next section{{%/link%}} for links to relevant CLI help pages. {{%note%}}{{%bold%}}Note:{{%/bold%}} Catalyst Java and Python functions can only be created and coded using the Catalyst CLI and an external editor, and deployed or uploaded to the web console. You cannot code them directly in the web console as of now. {{%/note%}} ### Steps to work with Functions from a Local Environment You can create, build, and deploy a function from the local environment as described below. Refer to the links given in each step for detailed help on the CLI actions. 1. {{%bold%}}Initialize the function from the CLI:{{%/bold%}} When you {{%link href="/en/cli/v1/initialize-resources/initialize-functions/" %}}initialize a function from the CLI{{%/link%}}, the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}function directory{{%/link%}} and the boilerplate code structure for each file are created based on its stack, type, and whether you chose to install the Catalyst SDK. 2. {{%bold%}}Set up the function in your project directory any time:{{%/bold%}} You can choose to {{%link href="/en/cli/v1/working-with-functions/set-up-functions/" %}}set up the function{{%/link%}} any time after you initialize the project from the CLI. 3. {{%bold%}}Code the function using an external editor:{{%/bold%}}If you initialize the function from the CLI, you can code it using an external editor. You can also {{%link href="/en/serverless/help/functions/implementation/#create-a-function" %}}upload a function's bundle to the Catalyst console{{%/link%}} any time and code it using Catalyst's editor. 4. {{%bold%}}Test the function in the CLI:{{%/bold%}} You can test and debug functions of all types, except Advanced I/O functions, by {{%link href="/en/cli/v1/working-with-functions/functions-shell/" %}}launching a Node shell{{%/link%}} for it from the CLI. 5. {{%bold%}}Serve the function from a local host:{{%/bold%}} Besides launching a Node shell, you can also {{%link href="/en/cli/v1/serve-resources/introduction/" %}}serve a Basic I/O or an Advanced I/O function{{%/link%}} from a local host, and test its execution.<br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} You will not be able to serve functions of the other types, as they are invoked internally.{{%/note%}} 6. {{%bold%}}Deploy the function to the Catalyst console:{{%/bold%}} You can then {{%link href="/en/cli/v1/deploy-resources/introduction/" %}}deploy the function{{%/link%}} from your local machine to the Catalyst remote console from the CLI. 7. {{%bold%}}Delete the function from the CLI:{{%/bold%}} You can also {{%link href="/en/cli/v1/working-with-functions/delete-functions/" %}}delete the function remotely from the CLI{{%/link%}}. This will delete it from the console as well. {{%note%}}{{%bold%}}Note:{{%/bold%}} * You can also work on a Catalyst function independently without initializing it in the Catalyst CLI, and upload it to the Catalyst remote console directly. In this case, you must ensure that you create the required configuration files in the function's directory manually, and include the necessary code in them in the standard structure. You can refer to the {{%link href="/en/cli/v1/project-directory-structure/introduction/" %}}Project Directory Structure help page{{%/link%}} for details. * You can also deploy functions to the Catalyst remote console from your GitHub repository directly. To learn more, refer to the {{%link href="/en/devops/help/github-integration/introduction/" %}}GitHub Integration help page{{%/link%}}. {{%/note%}} Check out {{%link href="/en/tutorials/" %}}Catalyst tutorials{{%/link%}} to practice working with Functions. -------------------------------------------------------------------------------- title: "Functions Stack" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.651Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/stack/" service: "Serverless" -------------------------------------------------------------------------------- # Functions Stack As mentioned earlier, Catalyst supports three programming environments to develop the server-side functions in: Java,Node.js and Python. ### Java Functions Catalyst provides a rich Java SDK containing classes and methods that includes the definitions of each Catalyst component. Catalyst supports the following versions of Java: * **Java 8** * **Java 11** * **Java 17** When you initialize a Java function in the CLI, the Java SDK will be downloaded and installed in your local system. You can learn more about Java classes and writing a Java function in detail from the {{%link href="/en/sdk/java/v1/overview/" %}}Java SDK documentation{{%/link%}}. You can also manually {{%link href="/en/getting-started/set-up-a-catalyst-project/developer-tools/" %}}download the Java SDK bundle{{%/link%}} from the Catalyst console and add it in your function's directory. A Java function's directory is set up with three basic components by default, when you initialize the function: 1. The main {{%badge%}}.java{{%/badge%}} function file 2. The {{%badge%}}catalyst-config.json{{%/badge%}} configuration file 3. The JAR library files in a folder named {{%badge%}}lib{{%/badge%}} You can learn about these in detail from the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}**Project Directory Structure help page**{{%/link%}}. ### Node.js Functions Catalyst provides an efficient Node.js SDK package containing methods and other necessary elements that define the behavior of the Catalyst components in the Node.js environment. Catalyst supports the following versions of Node.js: * **Node.js 20** * **Node.js 18** * **Node.js 16** * **Node.js 14** * **Node.js 12** (This runtime has reached its EOL) The SDK package is installed as a part of the node modules folder, which also contains several Node packages with individual library files, license files, and configuration files, that are essential for the execution of your Node.js functions. You can learn more about the Node.js SDK package and writing a Node.js function from the {{%link href="/en/sdk/nodejs/v2/overview/" %}}Node.js SDK documentation{{%/link%}}. When you initialize a Node.js function from the CLI, or create it from the console, you can choose to include the Node module dependencies. If you create the function without the dependencies, the function's directory will contain: 1. The main {{%badge%}}.js{{%/badge%}} function file 2. The {{%badge%}}catalyst-config.json{{%/badge%}} configuration file 3. {{%badge%}}{{%link href="https://docs.npmjs.com/files/package.json" %}}package.json{{%/link%}}{{%/badge%}} If you create the function with dependencies, the function's directory will contain: 1. The main {{%badge%}}.js{{%/badge%}} function file 2. The {{%badge%}}catalyst-config.json{{%/badge%}} configuration file 3. {{%badge%}}{{%link href="https://docs.npmjs.com/files/package.json" %}}package.json{{%/link%}}{{%/badge%}} 4. Node modules 5. {{%badge%}}{{%link href="https://docs.npmjs.com/configuring-npm/package-lock-json.html" %}}package-lock.json{{%/link%}}{{%/badge%}} You can learn about these in detail from the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}Project Directory Structure help page{{%/link%}}. You can also manually install the latest Node.js SDK package any time by executing this CLI command: {{%cli%}}npm install zcatalyst-sdk-node{{%/cli%}} You can also install a specific supported version in this way: {{%cli%}}npm install zcatalyst-sdk-node@2.1.1{{%/cli%}} ### Python Functions Catalyst provides an efficient {{%link href="/en/sdk/python/v1/overview" %}}Python SDK package{{%/link%}} containing modules and classes that define the behaviour of the Catalyst components in the Python environment. Catalyst supports the following versions of Python: * **Python 3.9** On initialization of a Python function, the Python SDK package is automatically installed in the functions directory of your Catalyst project. When the package is installed, an entry is made in the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/#requirementstxt-file" %}}{{%badge%}}requirements.txt{{%/badge%}}{{%/link%}} file present within the functions directory. This file also contains the list of other installed dependencies that are mandatory for the execution of certain Python modules and classes. You can learn more about the Python SDK package and writing a Python function in detail from the {{%link href="/en/sdk/python/v1/overview" %}}Python SDK documentation{{%/link%}}. The function's directory will contain the following files : 1. The {{%badge%}}main.js{{%/badge%}} function file 2. The {{%badge%}}catalyst-config.json{{%/badge%}} configuration file 3. {{%badge%}}{{%link href="/en/cli/v1/project-directory-structure/functions-directory/#requirementstxt-file" %}}requirements.txt{{%/link%}}{{%/badge%}} You can learn about these in detail from the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/#python-modules-and-function-dependencies" %}}Project Directory Structure{{%/link%}} help page. You can also manually install the Python SDK package any time by executing this CLI command : {{%code class="language-python"%}}pip install zcatalyst-sdk{{%/code%}} -------------------------------------------------------------------------------- title: "Basic I/O Functions" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.651Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/basic-io/" service: "Serverless" -------------------------------------------------------------------------------- # Basic I/O Functions ### Introduction Basic I/O functions are used to perform basic input and output operations, computations, and simple HTTP operations between the various Catalyst components. Basic I/O functions process inputs and outputs in the JSON format. The endpoint of a Basic I/O function is directly accessible through its {{%link href="#function-url" %}}Function URL{{%/link%}}. The function URL is generated when the function is created, and it enables you to directly access the function and test it in different conditions. You can {{%link href="/en/serverless/help/functions/implementation/#create-a-function" %}}create a Basic I/O function from the Catalyst console{{%/link%}}, code and test it there, or {{%link href="/en/serverless/help/functions/introduction/#steps-to-work-with-functions-from-a-local-environment" %}}use the CLI to initialize the function{{%/link%}} and deploy it to the console after testing it. The CLI also enables you to test Basic I/O functions through a Node shell or by serving the function through a localhost. You can use various tools to manage your Basic I/O functions and view their performance statistics such as Logs, Application Performance Monitoring, or API Gateway, as mentioned in the {{%link href="/en/serverless/help/functions/introduction/" %}}Functions introduction page{{%/link%}}. You can refer to {{%link href="/en/tutorials/microservice/java/introduction/" %}}this tutorial to practice working with Basic I/O functions.{{%/link%}} <br /> ### Function Structure The main function file of Java, Node.js and Python are initialized with different default code and modules for each function type, when the function is created. As mentioned in the {{%link href="/en/serverless/help/functions/stack/" %}}Function Stack section{{%/link%}}, the function structure of a Java, Node.js or Python function generally contains a main function file along with dependencies and configuration files. While creating the Basic I/O function in the Node.js environment, you can choose to create it with or without the Catalyst Node.js SDK. If you include it without the SDK, the Node modules and other Node dependency files will not be added. Refer to the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}Project Directory Structure help page{{%/link%}} for details about the generic function directory structure and the configuration files of Catalyst functions. Before we discuss the modules that a Java, Node.js or Python main function contains, let's take a look at the default code the function is initialized with. Catalyst initializes a {{%bold%}}Basic I/O Java function{{%/bold%}} with the following default code of a simple input and output operation. <br /> A {{%bold%}}Basic I/O Node.js function{{%/bold%}} also includes a default code containing a simple input and output operation. <br /> A {{%bold%}}Basic I/O Python function{{%/bold%}} includes the following default code containing a simple input and output operation. {{%code class="language-javascript"%}}def handler(context, basicio): basicio.write('Hello from {{_MAIN_}}') basicio.get_argument('name') context.log('Successfully executed basicio function') context.close(){{%/code%}} ### Java, Node.js and Python Modules A Catalyst Basic I/O function contains two modules in the {{%bold%}}Node.js{{%/bold%}} and {{%bold%}}Python{{%/bold%}} platforms: {{%badge%}}context{{%/badge%}} and {{%badge%}}basicIO{{%/badge%}}. The {{%badge%}}{{%bold%}}context{{%/bold%}}{{%/badge%}} module in Node.js and Python includes the following built-in methods: 1. {{%badge%}}{{%bold%}}context.close(){{%/bold%}}{{%/badge%}}: To indicate the end of the function. You must use this at the end of the function. 2. {{%badge%}}{{%bold%}}log(*args){{%/bold%}}{{%/badge%}}: This method is used to print the set of arguments passed in the function. To fetch the remaining execution time and maximum execution time of the event function, the {{%badge%}}{{%bold%}}context{{%/bold%}}{{%/badge%}} module includes the following methods : **Node.js:** 1. {{%badge%}}{{%bold%}}context.getRemainingExecutionTimeMs(){{%/bold%}}{{%/badge%}}: This can be used to fetch the remaining execution time of a function. 2. {{%badge%}}{{%bold%}}context.getMaxExecutionTimeMs(){{%/bold%}}{{%/badge%}}: This method can be used to get the maximum execution time of a function, which is a constant value of **30 seconds**. {{%note%}}{{%bold%}}Note:{{%/bold%}} In Python, we have the methods {{%badge%}}{{%bold%}}context.get_remaining_execution_time_ms(){{%/bold%}}{{%/badge%}} and {{%badge%}}{{%bold%}}context.get_max_execution_time_ms(){{%/bold%}}{{%/badge%}} for the above mentioned functionalities respectively.{{%/note%}} The {{%badge%}}basicIO{{%/badge%}} module in Node.js and Python includes the following built-in methods: 1. {{%badge%}}{{%bold%}}basicIO.write(){{%/bold%}}{{%/badge%}}: To print the output. You can only obtain a String output. You can use this method in only one place in the function. The maximum memory supported for the output is 1MB. 2. {{%badge%}}{{%bold%}}basicIO.setStatus(){{%/bold%}}{{%/badge%}}: Optional method to set an error status code. The default status codes are: status 200 for successful executions which returns the key output, status 500 for unsuccessful executions which is pushed to the error object and returns a JSON response. You can also set a custom status code. 3. {{%badge%}}{{%bold%}}basicIO.getArgument(){{%/bold%}}{{%/badge%}}: To get the individual parameters of the function. You can pass them as a query string in the URL or in a JSON body. If you pass them in both ways, the query string is considered as the priority. A Basic I/O function in Java contains the same modules and built-in methods as Node.js and Python. Some additional methods supported in {{%bold%}}Java{{%/bold%}} are: 1. {{%badge%}}{{%bold%}}context.getOrigin(){{%/bold%}}{{%/badge%}}: To get the function type 2. {{%badge%}}{{%bold%}}basicIO.getAllArguments(){{%/bold%}}{{%/badge%}}: To get all the parameters of the function <br /> ### Function URL As mentioned earlier, a Basic I/O function endpoint is directly accessible through a unique invocation URL. You can manually invoke it through its URL, pass input if required, and obtain the response. You can implement this URL in your application's code, or use it as you require. This function URL is generated automatically when the function is created. A Basic I/O function's production URL is in the following format: **https://project_domain_name.catalystserverless.com/server/function_name/execute** In the {{%link href="/en/deployment-and-billing/environments/introduction/" %}}Development environment{{%/link%}}, the URL mentions the key {{%badge%}}development{{%/badge%}} as: **https://_project\_domain\_name_.development.catalystserverless.com/server/_function\_name_/execute** * _https://project\_domain\_name.catalystserverless.com_ is the {{%link href="/en/getting-started/set-up-a-catalyst-project/environment-settings/" %}}App Domain{{%/link%}} of your Catalyst application. * _/server_ indicates that it is a function. * The URL identifies the function by its name. * _/execute_ indicates that it is a Basic I/O function. You can obtain the URL of a function {{%link href="/en/serverless/help/functions/implementation/#code-editor" %}}from the console{{%/link%}}, or {{%link href="/en/cli/v1/deploy-resources/introduction/" %}}in your terminal{{%/link%}} after you deploy the function from the Catalyst CLI. As Catalyst allows you to test Basic I/O functions from the console, you can directly add the keys and values for the parameters in the function and test it there. Refer to the {{%link href="/en/serverless/help/functions/implementation/#code-editor" %}}Working with Functions from the Console section{{%/link%}} for details. You can also invoke the Function URL through a browser and pass the parameters as a query string in the URL. For example, in a simple function that obtains a name and displays it, we pass the value for the parameter called _name_ as a query string and invoke the URL. <br /> The output of the function is then displayed in the browser window. <br /> ### Push to Logs {{%link href="/en/devops/help/logs/introduction/" %}}Catalyst Logs{{%/link%}} display the logs of all your function executions along with necessary details. The function executions are automatically recorded in logs. However, you can also push the response data of a Basic I/O function's execution to the logs manually. Catalyst enables you to write upto 1500 characters to the logs. You can also push the responses to different log levels individually, such as to _Info_ or _Warning_. The response data of a Basic I/O function can be pushed to the logs using the following method: {{%badge%}}{{%bold%}}context.log(){{%/bold%}}{{%/badge%}}. You can see this statement in the default code that a Basic I/O function is initialized with, where the input received from the user is pushed to the logs and the logger level is also set manually. -------------------------------------------------------------------------------- title: "Advanced I/O Functions" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.652Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/advanced-io/" service: "Serverless" -------------------------------------------------------------------------------- # Advanced I/O Functions ### Introduction Advanced I/O functions handle native HTTP requests and responses for all your Catalyst components. You can use any number of APIs in a single Advanced I/O function, and pass large data streams in the function. These functions enable you to build complex routing mechanisms for your application between the server and the client. You can construct and maintain server-side tools quickly and efficiently using these functions. Advanced I/O functions also offer flexibility to perform a variety of actions and solve different use cases. For instance, you can stream or parse large volumes of data like image files or other attachments, render a view, embed files, or download a file using Advanced I/O functions. The Basic I/O function type is not suitable for routing or channelling data, since it executes only basic input and output operations and passes data through parameters. Therefore, you can use Advanced I/O functions for such purposes. You can also obtain any form of response, such as a JSON or a HTML response for an Advanced I/O function. Catalyst also offers support for the {{%link href="https://expressjs.com/" %}}Express Node.js framework{{%/link%}} in Advanced I/O functions. Express is a popular Node.js framework that enables you to manage routing, rendering, and setting up middleware to handle HTTP functionalities robustly and easily. You can choose to import this framework in your functions, and access its packages. The endpoint of an Advanced I/O function is directly accessible through its {{%link href="#function-url" %}}Function URL{{%/link%}}. The function URL is generated when the function is created, and it enables you to directly access the function and test it in different conditions. You can {{%link href="/en/serverless/help/functions/implementation/#create-a-function" %}}create an Advanced I/O function from the Catalyst console{{%/link%}}, code it there, or {{%link href="/en/serverless/help/functions/introduction/#steps-to-work-with-functions-from-a-local-environment" %}}use the CLI{{%/link%}} to initialize the function and deploy it to the console after testing it. The CLI also enables you to test Advanced I/O functions by serving the function through a localhost. You can use various tools to manage your Advanced I/O functions and view their performance statistics such as Logs, Application Performance Monitoring, or API Gateway, as mentioned in the {{%link href="/en/serverless/help/functions/introduction/" %}}Functions Introduction page{{%/link%}}. You can find several Catalyst tutorials that include Advanced I/O functions in their code. Refer to the {{%link href="/en/tutorials/" %}}Tutorials section{{%/link%}} to practice working with Advanced I/O functions. {{%note%}}{{%bold%}}Note:{{%/bold%}} The maximum timeout of an Advanced I/O function is 30 seconds.{{%/note%}} ### Use Cases Some use cases for Advanced I/O functions are given below: * A local search application service that provides information about services and businesses in a particular region uses an Advanced I/O function to handle routing in its web and mobile application. When the end user executes a search query for information about services in their locality, such as restaurants or spas, the application fetches information about the available services along with their website links from the Data Store or Cache. When the user clicks on a link, they are redirected to the business's website. These data retrieving and redirection functionalities are entirely handled by Advanced I/O functions using the HTTP request and response methods. * An application hosts video files like movies, TV shows, and documentaries and allows the end users to download them to their devices. The application is written using the Express Node.js framework and it uses an Advanced I/O function to implement these functionalities. The function handles tasks such as executing search operations in the application, obtaining results from the Data Store, and prompting file downloads within seconds. Some other examples where Advanced I/O functions can be implemented include the following types of applications: * Real-time collaborative document editing, project management, or co-browsing applications * Live media streaming applications * Data-driven applications * Single-page applications * Independent microservices * Audio or video conferencing applications * Dynamic event-driven applications * Online chat applications ### Benefits * Enables you to build real-time applications and microservices that are functionally rich and dynamic in nature * Provides you an integrated space to handle routing for the entire application by including any number of APIs in a single function * Can build the request and response logic between the server and the client for all Catalyst components and perform complex routing * Enables you to implement any functionality of the Express framework when you include the package in your function ### Function Structure The main function file of Java, Node.js and Python are initialized with different default code and modules for each function type, when the function is created. As mentioned in the {{%link href="/en/serverless/help/functions/stack/" %}}Function Stack section{{%/link%}}, the function structure of a Java,Node.js or Python function generally contains a main function file along with dependencies and configuration files. Refer to the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}Project Directory Structure help page{{%/link%}} for details about the generic function directory structure and the configuration files of Catalyst functions. Let's take a look at the default code an Advanced I/O function is initialized with, in both Java, Node.js or Python environments. {{%note%}}{{%bold%}}Note:{{%/bold%}} You can {{%link href="/en/tutorials/alien-city/java/configure-advio-function/" %}}refer to this tutorial{{%/link%}} for a sample Advanced I/O function in Java, Node.js and Python environments.{{%/note%}} #### Java Catalyst initializes an Advanced I/O function in the Java environment with the following default code of a simple input and output operation. An Advanced I/O Java function imports the {{%badge%}}javax.servlet{{%/badge%}} package to handle the requests and responses. It implements {{%badge%}}CatalystAdvancedIOHandler{{%/badge%}} for the main class. The route definitions must be defined in the {{%badge%}}public void runner(){{%/badge%}} function. #### Node.js An Advanced I/O function in Node.js can be created in two different templates from the console: The Express.js template which includes all the Express modules or a blank template which includes neither Express modules or Node modules. However, when you initialize the function from the CLI, you can only include the Node modules in its structure. You must install the Express modules separately. 1. {{%bold%}}The Express.js template{{%/bold%}}<br /><br /> The Express modules are added automatically when you create an Advanced I/O function in Node.js with the dependencies from the Catalyst console. This installs the Express framework in your function's directory.<br /><br /> When you initialize an Advanced I/O function from the CLI, you can install Express independently by executing {{%badge%}}{{%link href="https://expressjs.com/en/starter/installing.html" %}}npm install express --save{{%/link%}}{{%/badge%}} in your function's directory. <br /><br /> Catalyst Advanced I/O functions support the default request and response objects of Node.js HTTP functions, {{%badge%}}req{{%/badge%}} and {{%badge%}}res{{%/badge%}}. These objects handle the request and responses for the routes mapped to Catalyst components such as the Cache or the Data Store. <br /> <br /> The route here is defined in the format: {{%badge%}}app.METHOD(PATH, HANDLER){{%/badge%}} and the actions are coded in the route definitions. 2. {{%bold%}}The blank template{{%/bold%}}<br /><br /> The blank template allows you to build native Node.js code from scratch to suit your requirements. This template does not include the Express.js modules. When you initialize the function without the SDK in the console, it is created in the blank template without the Node modules or the Express modules. <br /><br /> The sample code for the blank template also includes the req and res objects, and defines different responses for each URL path.<br /> <br /> Since this is a blank template, you will have to create a HTTP server using the {{%badge%}}createServer(){{%/badge%}} method and pass it to a {{%badge%}}requestListener(){{%/badge%}} function that is executed each time the server receives a request. You can learn about writing a native HTTP function in Node.js from their {{%link href="https://nodejs.org/api/http.html" %}}official documentation{{%/link%}}. #### Python When you initialize an {{%link href="/en/serverless/help/functions/advanced-io" %}}Advanced I/O{{%/link%}} function from the CLI, the boilerplate code given below will automatically be included in the main.py file present within the Python function's directory. To handle the input and output operations of the Catalyst Advanced I/O functions efficiently, we have used the {{%link href="https://pypi.org/project/Flask" %}}flask{{%/link%}} framework. This framework provides the tools and libraries that can be used to build robust Python applications with maximum flexibility for the developer. It also boosts the functional efficiency of the application by enabling it to be executed using a single Python file. Catalyst Advanced I/O functions support the request and response objects of the Python HTTP function. These objects handle the request and responses for the routes mapped to Catalyst components such as the Cache or the Data Store. {{%code class="language-javascript"%}}import json import zcatalyst-sdk import logging from flask import Request, make_response, jsonify def handler(request: Request): app = zcatalyst-sdk.initialize() logger = logging.getLogger() if request.path == "/": response = make_response(jsonify({ 'status': 'success', 'message': 'Hello from {{_MAIN_}}' }), 200) return response elif request.path == "/cache": default_segment = app.cache().segment() insert_resp = default_segment.put('Name', 'DefaultName') logger.info('Inserted cache : ' + str(insert_resp)) get_resp = default_segment.get('Name') return jsonify(get_resp), 200 else: response = make_response('Unknown path') response.status_code = 400 return response {{%/code%}} ### Function URL As mentioned earlier, an Advanced I/O function's endpoint is directly accessible through a unique invocation URL. You can manually invoke it through its URL and obtain the response. You can implement this URL in your application's code, or use it as you require. This function URL is generated automatically when the function is created. An Advanced I/O function's production URL is in the following format: {{%bold%}}https://_project\_domain\_name_.catalystserverless.com/server/_function\_name_/{{%/bold%}} In the {{%link href="/en/deployment-and-billing/environments/introduction/" %}}Development environment{{%/link%}}, the URL mentions the key {{%badge%}}development{{%/badge%}} as: https://*project_domain_name*.development.catalystserverless.com/server/*function_name*/ * _https://project\_domain\_name.catalystserverless.com_ is the {{%link href="/en/getting-started/set-up-a-catalyst-project/environment-settings/" %}}App Domain{{%/link%}} of your Catalyst application. * _/server_ indicates that it is a function. * The URL identifies the function by its name. * The absence of the _/execute_ keyword indicates that it is an Advanced I/O function. You can obtain the URL of a function {{%link href="/en/serverless/help/functions/implementation/#code-editor" %}}from the console{{%/link%}}, or {{%link href="/en/cli/v1/deploy-resources/introduction/" %}}in your terminal{{%/link%}} after you deploy the function from the Catalyst CLI. You can append routes that you have defined in the Advanced I/O function's code after this base URL to execute the behavior that you have defined for them. For example, the following route definition fetches all data from the Data Store when the route {{%badge%}}/item/all{{%/badge%}} is accessed through the GET method: <br /> When you append the route to the base URL as: _https://catly-687259092.development.catalystserverless.com/server/catly/item/all_ and invoke it, the Advanced I/O function will fetch all items from the Data Store. ### Push to Logs {{%link href="/en/devops/help/logs/introduction/" %}}Catalyst Logs{{%/link%}} display the logs of all your function executions along with necessary details. The function executions are automatically recorded in logs. However, you can also push the response data of an Advanced I/O function's execution to the logs manually. Catalyst enables you to write upto 1500 characters to the logs. You can also push the responses to different log levels individually, such as to _Info_ or _Warning_. The response data of an Advanced I/O function can be pushed to the logs using the following method: {{%badge%}}{{%bold%}}console.log(){{%/bold%}}{{%/badge%}}. You can see this statement in the default code that an Advanced I/O function is initialized with, where data is pushed to the logs and the logger level is also set manually. -------------------------------------------------------------------------------- title: "Event Functions" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.653Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/event-functions/" service: "Serverless" -------------------------------------------------------------------------------- # Event Functions ### Introduction An Event function is an asynchronous task function that is associated with an {{%link href="/en/cloud-scale/help/event-listeners/introduction/" %}}Event Listener{{%/link%}}. An Event function is created to execute a task or a set of tasks on the occurrence of a specified event. The default Event Listener listens for an event occurring in one of the Catalyst components and the custom Event Listener listens for the invocation of a particular URL. When these events occur, the event function associated with that event listener instance is automatically invoked and executed. You cannot invoke a Event function manually, or test it in the console. However, you can use the {{%badge%}}{{%link href="/en/cli/v1/working-with-functions/functions-shell/#functions-shell-command-execution" %}}functions:shell{{%/link%}}{{%/badge%}} command to test it in the CLI. You can also generate sample input payload for an event function using the {{%badge%}}{{%link href="/en/cli/v1/event-generate/introduction/" %}}event:generate{{%/link%}}{{%/badge%}} command in the CLI to test it. The endpoint of an Event function is not accessible through a Function URL like Basic I/O or Advanced I/O functions are. An Event function does not return any response other than determining if the function execution was a success or failure. You can {{%link href="/en/serverless/help/functions/implementation/#create-a-function" %}}create an Event function from the Catalyst console{{%/link%}}, and code it there, or {{%link href="/en/serverless/help/functions/introduction/#steps-to-work-with-functions-from-a-local-environment" %}}use the CLI{{%/link%}} to initialize the function and deploy it to the console. You can use various tools to manage your Event functions and view their performance statistics such as Logs or Application Performance Monitoring, as mentioned in the {{%link href="/en/serverless/help/functions/introduction/" %}}Functions Introduction page{{%/link%}}. You can practice working with Event functions with the {{%link href="/en/tutorials/event-app/nodejs/introduction/" %}}Event Function tutorial{{%/link%}} or the {{%link href="/en/tutorials/workdrivesync/java/introduction/" %}}WorkDrive Sync App tutorial{{%/link%}}. <br> ### Event Function Modules #### Java A Catalyst Event Function supports two modules in {{%bold%}}Java{{%/bold%}}: {{%badge%}}context{{%/badge%}} and {{%badge%}}event{{%/badge%}}. The {{%badge%}}context{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}context.getRemainingExecutionTimeMs(){{%/badge%}}{{%/bold%}}: This can be used to fetch the remaining execution time of a function. 2. {{%badge%}}{{%bold%}}context.getMaxExecutionTimeMs(){{%/badge%}}{{%/bold%}}: This method can be used to get the maximum execution time of a function, which is a constant value of **15 minutes**. The {{%badge%}}event{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}event.getAction(){{%/badge%}}{{%/bold%}}: To get the action executed in the Catalyst components that triggered the event in the default Event Listener, such as data insertion in a table or a user sign-up. 2. {{%badge%}}{{%bold%}}event.getSourceEntityId(){{%/badge%}}{{%/bold%}}: This can be used to get the ID of the source entity where the event occurred, such as the Table ID or a cache’s Segment ID. 3. {{%badge%}}{{%bold%}}event.getProjectDetails(){{%/badge%}}{{%/bold%}}: To get the project details, such as the project ID and project name. 4. {{%badge%}}{{%bold%}}event.getData(){{%/badge%}}{{%/bold%}}: To get the data about the event associated with the event function. 5. {{%badge%}}{{%bold%}}event.getTime(){{%/badge%}}{{%/bold%}}: To get the time of the event occurrence that invoked the event function. 6. {{%badge%}}{{%bold%}}event.getSource(){{%/badge%}}{{%/bold%}}: To get the name of the source that triggered the event, such as the Data Store, Cache, Authentication, File Store, Github and web client. 7. {{%badge%}}{{%bold%}}event.getEventBusDetails(){{%/badge%}}{{%/bold%}}: To get the details of the event bus such as the configured event actions and rules. When you execute a java function, it returns the status of the execution as either {{%badge%}}SUCCESS{{%/badge%}} or {{%badge%}}FAILURE{{%/badge%}} at the end of its execution. The returned status is of type {{%badge%}}com.catalyst.event.EVENT_STATUS{{%/badge%}}. <br> #### Node.js A Catalyst Event Function supports two modules in {{%bold%}}Node.js{{%/bold%}}: {{%badge%}}context{{%/badge%}} and {{%badge%}}event{{%/badge%}}. The {{%badge%}}context{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}context.closeWithSuccess(){{%/badge%}}{{%/bold%}}: To indicate that the function executed successfully. You must use this at the end of the function. 2. {{%badge%}}{{%bold%}}context.closeWithFailure(){{%/badge%}}{{%/bold%}}: To indicate that the function’s execution was a failure. You must use this at the end of the function. 3. {{%badge%}}{{%bold%}}context.getRemainingExecutionTimeMs(){{%/badge%}}{{%/bold%}}: This can be used to fetch the remaining execution time of a function. 4. {{%badge%}}{{%bold%}}context.getMaxExecutionTimeMs(){{%/badge%}}{{%/bold%}}: This method can be used to get the maximum execution time of a function, which is a constant value of 15 minutes. The {{%badge%}}event{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}event.getProjectDetails() {{%/badge%}}{{%/bold%}}: To get the project details, such as the project ID and project name 2. {{%badge%}}{{%bold%}}event.getData(){{%/badge%}}{{%/bold%}}: To get the data about the event associated with the function 3. {{%badge%}}{{%bold%}}event.getTime(){{%/badge%}}{{%/bold%}}: To get the time of the event occurrence that invoked the function 4. {{%badge%}}{{%bold%}}event.getSource(){{%/badge%}}{{%/bold%}}: This method is used to get the name of the source that triggered the event, such as the DataStore, Cache, Authentication, FileStore, Github and webclient. 5. {{%badge%}}{{%bold%}}event.getEventBusDetails(){{%/badge%}}{{%/bold%}}: To get the details of the event bus such as the configured event actions and rules. 6. {{%badge%}}{{%bold%}}event.getAction(){{%/badge%}}{{%/bold%}}: To get the action executed in the Catalyst components that triggered the event in the default Event Listener, such as data insertion in a table or a user sign-up 7. {{%badge%}}{{%bold%}}event.getSourceEntityId(){{%/badge%}}{{%/bold%}}: To get the ID of the source entity where the event occurred, such as the Table ID or a cache’s Segment ID <br> #### Python A Catalyst Event Function supports two modules in {{%bold%}}Python{{%/bold%}} as well: {{%badge%}}context{{%/badge%}} and {{%badge%}}event{{%/badge%}}. The {{%badge%}}context{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}context.close_with_success(){{%/badge%}}{{%/bold%}}: To indicate that the function executed successfully. You must use this at the end of the function. 2. {{%badge%}}{{%bold%}}context.close_with_failure(){{%/badge%}}{{%/bold%}}: To indicate that the function’s execution was a failure and you must use this at the end of the function. 3. {{%badge%}}{{%bold%}}context.get_remaining_execution_time_ms(){{%/badge%}}{{%/bold%}}: This can be used to fetch the remaining execution time of a function. 4. {{%badge%}}{{%bold%}}context.get_max_execution_time_ms(){{%/badge%}}{{%/bold%}}: This method can be used to get the maximum execution time of a function, which is a constant value of 15 minutes. The {{%badge%}}event{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}event.get_event_bus_details(){{%/badge%}}{{%/bold%}}: To get the details of the event bus such as the configured event actions and rules. 2. {{%badge%}}{{%bold%}}event.get_project_details(){{%/badge%}}{{%/bold%}}: To get the project details, such as the project ID and project name. 3. {{%badge%}}{{%bold%}}event.get_data(){{%/badge%}}{{%/bold%}}: To get the data about the event associated with the event function. 4. {{%badge%}}{{%bold%}}event.get_time(){{%/badge%}}{{%/bold%}}: To get the time of the event occurrence that invoked the function. 5. {{%badge%}}{{%bold%}}event.get_source(){{%/badge%}}{{%/bold%}}: To get the name of the source that triggered the event, such as the DataStore, Cache, Authentication, FileStore, Github and webclient. 6. {{%badge%}}{{%bold%}}event.get_action(){{%/badge%}}{{%/bold%}}: To get the action executed in the Catalyst components that triggered the event in the default Event Listener, such as data insertion in a table or a user sign-up. 7. {{%badge%}}{{%bold%}}event.get_source_entity_id(){{%/badge%}}{{%/bold%}}: To get the ID of the source entity where the event occurred, such as the Table ID or a cache’s Segment ID. -------------------------------------------------------------------------------- title: "Cron Functions" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.653Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/cron-functions/" service: "Serverless" -------------------------------------------------------------------------------- # Cron Functions ### Introduction A Cron function is a periodic function that is associated with a {{%link href="/en/cloud-scale/help/cron/introduction/" %}}Cron{{%/link%}}. You can create a Cron function to execute a job that needs to be invoked one time or periodically. When you configure a cron in Catalyst, you can associate it with executing a function or invoking a third-party URL. When the cron is associated with a function, the cron job invokes the function automatically based on its schedule. If it is a one-time job, the cron invokes the function on the specified date and time. If it is periodic, the cron invokes the function at the configured intervals, such as every month on a specific date and time, or everyday on a specific time. You cannot invoke a Cron function manually, or test it in the console. However, you can use the {{%badge%}}{{%link href="/en/cli/v1/working-with-functions/functions-shell/#functions-shell-command-execution" %}}functions:shell command{{%/link%}}{{%/badge%}} to test it in the CLI. A Cron function does not return any response other than determining if the function execution was a success or failure. <br> ### Cron Function Modules #### Java A Catalyst Cron Function supports two modules in {{%bold%}}Java{{%/bold%}}: {{%badge%}}CronRequest{{%/badge%}} and {{%badge%}}Context{{%/badge%}}. The {{%badge%}}CronRequest{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}CronRequest.getCronParam(){{%/badge%}}{{%/bold%}}: This method is used to get the value of the particular parameter passed to the function. 2. {{%badge%}}{{%bold%}}CronRequest.getAllCronParams(){{%/badge%}}{{%/bold%}}: This method is used to get all the parameters passed to the function. 3. {{%badge%}}{{%bold%}}CronRequest.getRemainingExecutionCount(){{%/badge%}}{{%/bold%}}: This method is used to get the details about the remaining execution instances of a cron job. 4. {{%badge%}}{{%bold%}}CronRequest.getCronDetails(){{%/badge%}}{{%/bold%}}: This method is used to get the cron’s details such as the Cron ID and the cron name. 5. {{%badge%}}{{%bold%}}CronRequest.getProjectDetails(){{%/badge%}}{{%/bold%}}: Used to get the project details, such as the project ID and project name. The {{%badge%}}Context{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}Context.getMaxExecutionTimeMs(){{%/badge%}}{{%/bold%}}: This method can be used to get the maximum execution time of a cron function, which is a constant value of **15 minutes**. 2. {{%badge%}}{{%bold%}}Context.getRemainingExecutionTimeMs(){{%/badge%}}{{%/bold%}}: This can be used to fetch the remaining execution time of a cron function. When you execute a Java function, it returns the status of the execution as either {{%badge%}}SUCCESS{{%/badge%}} or {{%badge%}}FAILURE{{%/badge%}} at the end of its execution. The returned status is of type {{%badge%}}com.catalyst.cron.CRON_STATUS{{%/badge%}}. <br> #### Node.js The Catalyst Cron Function supports two modules in {{%bold%}}Node.js{{%/bold%}}: {{%badge%}}cronDetails{{%/badge%}} and {{%badge%}}context{{%/badge%}}. The {{%badge%}}cronDetails{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}cronDetails.getCronParam(){{%/badge%}}{{%/bold%}}: This method is used to get the value of the particular parameter passed to the function. 2. {{%badge%}}{{%bold%}}cronDetails.getAllCronParam(){{%/badge%}}{{%/bold%}}: This method is used to get all the parameters passed to the function. 3. {{%badge%}}{{%bold%}}cronDetails.getRemainingExecutionCount(){{%/badge%}}{{%/bold%}}: To get the details about the remaining execution instances of the cron job. 4. {{%badge%}}{{%bold%}}cronDetails.getCronDetails(){{%/badge%}}{{%/bold%}}: To get the cron’s details such as the Cron ID and the cron name. 5. {{%badge%}}{{%bold%}}cronDetails.getProjectDetails(){{%/badge%}}{{%/bold%}}: To get the project details, such as the project ID and project name. The {{%badge%}}context{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}context.getMaxExecutionTimeMs(){{%/badge%}}{{%/bold%}}: This method can be used to get the maximum execution time of a function, which is a constant value of 15 minutes. 2. {{%badge%}}{{%bold%}}context.getRemainingExecutionTimeMs(){{%/badge%}}{{%/bold%}}: This can be used to fetch the remaining execution time of a function. 3. {{%badge%}}{{%bold%}}context.closeWithSuccess(){{%/badge%}}{{%/bold%}}: This method is used to indicate that the function executed successfully. You must use this at the end of the function. 4. {{%badge%}}{{%bold%}}context.closeWithFailure(){{%/badge%}}{{%/bold%}}: This method is used to indicate that the function’s execution was a failure. You must use this at the end of the function. <br> #### Python A Catalyst Cron Function supports two modules in {{%bold%}}Python{{%/bold%}} as well: {{%badge%}}cron_details{{%/badge%}} and {{%badge%}}context{{%/badge%}}. The {{%badge%}}cron_details{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}cron_details.get_cron_param(){{%/badge%}}{{%/bold%}} - This method is used to get the value of the particular parameter passed to the function. 2. {{%badge%}}{{%bold%}}cron_details.get_all_cron_params(){{%/badge%}}{{%/bold%}} - This method is used to get all the parameters passed to the function. 3. {{%badge%}}{{%bold%}}cron_details.get_remaining_execution_count(){{%/badge%}}{{%/bold%}} - To get the details about the remaining execution instances of the cron job. 4. {{%badge%}}{{%bold%}}cron_details.get_cron_details(){{%/badge%}}{{%/bold%}} - To get the cron’s details such as the Cron ID and the cron name. 5. {{%badge%}}{{%bold%}}cron_details.get_project_details(){{%/badge%}}{{%/bold%}} - To get the project details, such as the project ID and project name. The {{%badge%}}context{{%/badge%}} module contains the following built-in methods: 1. {{%badge%}}{{%bold%}}context.get_max_execution_time_ms(){{%/badge%}}{{%/bold%}} - This method can be used to get the maximum execution time of a function. And the maximum execution time of a function is configured to be 15 mins. 2. {{%badge%}}{{%bold%}}context.get_remaining_execution_time_ms(){{%/badge%}}{{%/bold%}} - This can be used to fetch the remaining execution time of a function. 3. {{%badge%}}{{%bold%}}context.close_with_success(){{%/badge%}}{{%/bold%}} - This can be used to indicate that the function executed successfully. You must use this at the end of the function. 4. {{%badge%}}{{%bold%}}context.close_with_failure(){{%/badge%}}{{%/bold%}} - To indicate that the function’s execution was a failure. You must use this at the end of the function. -------------------------------------------------------------------------------- title: "Browser Logic Functions" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.653Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/browser-logic/" service: "Serverless" -------------------------------------------------------------------------------- # Browser Logic Functions ### Introduction {{%link href="/en/smartbrowz/help/browser-logic/introduction/" %}}Browser Logic{{%/link%}} is a {{%link href="/en/serverless/getting-started/introduction/" %}}Catalyst Serverless{{%/link%}} function type and a component of {{%link href="/en/smartbrowz/getting-started/introduction/" %}}Catalyst SmartBrowz{{%/link%}} service. Browser Logic contains the ideal coding structure you can use to code browser automation tasks and other browser operations. Using Browser Logic, you can code any browser interaction or operation without engineering your embedded browser. You can perform a wide range of browser tasks such as web scraping, {{%link href="/en/smartbrowz/help/pdfnscreenshot/introduction/" %}}generating visual documents{{%/link%}}, and running performance and functionality tests on your application on {{%link href="/en/smartbrowz/help/headless/introduction/" %}}Headless Browsers{{%/link%}}. When you set up your Browser Logic function, the embedded browser will be initialized. You can code Browser Logic functions in the following runtimes: * {{%link href="/en/sdk/java/v1/smartbrowz/generate-pdfnscreenshot/" %}}Java{{%/link%}} * {{%link href="/en/sdk/nodejs/v2/smartbrowz/create-smartbrowz-instance/" %}}Node.js{{%/link%}} Like the other *Serverless* Functions, you can create, initialize, serve, and deploy Browser Logic functions from the CLI. You can also upload your Browser Logic function as a zip file to the console. You can also view and monitor the performance of the Browser Logic functions using the following {{%link href="/en/devops/"%}}Catalyst DevOps{{%/link%}} components: * {{%link href="/en/devops/help/logs/introduction/" %}}Logs{{%/link%}}: You can view, manage and monitor all executions pertaining to Browser Logic functions. * {{%link href="/en/devops/help/apm/introduction/" %}}Application Performance Monitoring{{%/link%}}: You can use this component to gather in-depth insights on Browser Logic function's performance. {{%note%}}{{%bold%}}Note:{{%/bold%}} Any Browser action or operation that you code using the Browser Logic function, or any browser automation or web scraping task that you perform using any component of Catalyst SmartBrowz is at your own risk. We strongly recommend you use the SmartBrowz components to perform operations on domains that permit the actions, or with proper approval. Additionally, while Catalyst does provide a secure infrastructure to code your functions, any consequence of the logic you code using Catalyst functions is yours alone.{{%/note%}} ### Benefits * Browser Logic offers you the ideal coding structure to code browser tasks of any scale. * You will just have to code the logic of any browser task using Browser Logic functions, and all the backend infrastructure management will be automatically handled by Catalyst. * You can create, initialize, serve, and deploy Browser Logic functions using Catalyt's robust {{%link href="/en/cli/v1/cli-command-reference/" %}}CLI{{%/link%}}. This ensures that all dependencies that are required to deploy the function will be automatically installed when you {{%link href="/en/cli/v1/initialize-resources/initialize-functions/" %}}initialize the function through CLI{{%/link%}}. ### Use Cases Browser Logic functions can be used to code any browser task; examples of some of them are: * You can code Browser Logic functions to perform customer satisfaction analysis of your products on retail platforms. Reviews are a preferred manner for consumers to share their feedback on the product and for prospective customers to decide if they require your product. If you are selling your product across several retail platforms, checking for positive or importantly negative reviews can be a tedious manual task. Instead, you can code a Browser Logic function that can hit your product URL on SmartBrowz's Headless browser and curate reviews that have the least amount of rating and store it in a {{%badge%}}.csv{{%/badge%}} file for you to examine later. This allows you to get better understanding of your product and plan improvements and future updates to your product in a more efficient manner. * You can code functions using the {{%link href="/en/smartbrowz/help/pdfnscreenshot/implementation/" %}}PDF & Screenshot SDK{{%/link%}} and generate visual documents of websites that permit such activity to gather meaningful data. * You can code logic to perform fundamental UI testing. You can use the PDF & Screenshot SDK to and launch your application on {{%link href="/en/smartbrowz/help/headless/introduction/" %}}SmartBrowz's Headless browser{{%/link%}} and generate screenshots to capture the view of your application across a wide range of PDA devices. ### Function Structure Browser Logic functions can be coded using the following programming languages: {{%tabs%}} {{%tab "Node.js" %}} **Node.js** The snippet below is an example of the Browser Logic coding structure if you initialize it using the **Playwright** browser automation library with {{%badge%}}page{{%/badge%}} as the object. {{% panel_with_adjustment header="Node.js - Playwright" footer="button" class="language-javascript line-numbers" scroll="set-scroll" %}}module.exports.playwright = async (request, response, page) => { await page.goto('https://example.com/',{waitUntil: "domcontentloaded"}); // You can code your logic here const pageTitle = await page.title(); response.setHeader('Content-Type', 'application/json'); response.write(JSON.stringify({ output: pageTitle })); response.end(); }; {{% /panel_with_adjustment %}} {{%/tab%}} {{%tab "Java" %}} **Java** The snippet below is an example of Browser Logic coding structure if you initialize using **Selenium** browser automation library. {{% panel_with_adjustment header="Java - Selenium" footer="button" class="language-java line-numbers" scroll="set-scroll" %}}import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.openqa.selenium.chrome.ChromeDriver; import com.catalyst.browserlogic.SeleniumHandler; import org.json.simple.JSONObject; public class BrowserAutomation implements SeleniumHandler { private static final Logger LOGGER = Logger.getLogger(BrowserAutomation.class.getName()); JSONObject responseData = new JSONObject(); @Override @SuppressWarnings("unchecked") public void runner(HttpServletRequest request, HttpServletResponse response,ChromeDriver driver) throws Exception { try { //Fetches the endpoint and method to which the call was made driver.get("https://catalyst.zoho.com"); responseData.put("message", "Title of the page "+driver.getTitle()); //Sends the response back to the Client response.setContentType("application/json"); response.getWriter().write(responseData.toString()); response.setStatus(200); } catch (Exception e) { //The actions are logged. You can check the logs from Catalyst Logs. LOGGER.log(Level.SEVERE, "Exception in BrowserAutomation", e); responseData.put("error", "Internal server error occurred. Please try again in some time."); response.getWriter().write(responseData.toString()); response.setStatus(500); } } } {{% /panel_with_adjustment %}} {{%/tabs%}} {{%/tabs%}} You can add your business logic to the above code structure and directly implement it in your project. You do not have to provide any additional code to handle infrastructure. Any additional operations you would typically code to perform browser automations, such as opening or closing the browser, are not required as Catalyst handles it for you in the backend. ### Function URL A Browser Logic function endpoint is directly accessible through a unique invocation URL. You can manually invoke it through its URL, pass input if required, and obtain the response. You can implement this URL in your application’s code, or use it as you require. This function URL is generated automatically when the function is created. A Browser Logic function's URL is in the following format: **https<span></span>://{project_domain}.development.catalystserverless.com/server/{function_name}/execute** In the {{%link href="/en/deployment-and-billing/environments/introduction/" %}}Development environment{{%/link%}}, the URL mentions the key development as: * {{%badge%}}https<span></span>://project_domain_name.catalystserverless.com{{%/badge%}} is the {{%link href="/en/getting-started/set-up-a-catalyst-project/environment-settings/" %}}App Domain{{%/link%}} of your Catalyst application. * {{%badge%}}/server{{%/badge%}} indicates that it is a function. * The URL identifies the function by its name. You can obtain the function URL {{%link href="/en/serverless/help/functions/implementation/#code-editor" %}}from the console{{%/link%}}, or {{%link href="/en/cli/v1/deploy-resources/introduction/" %}}in your terminal{{%/link%}} after you deploy the function from the Catalyst CLI. You can also invoke the Function URL through a browser, as illustrated in the image below: <br /> You can learn more about Browser Logic and how to implement it for your applications from this {{%link href="/en/smartbrowz/help/browser-logic/introduction/" %}}help section{{%/link%}}. -------------------------------------------------------------------------------- title: "Integration Functions" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.654Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/integration-functions/" service: "Serverless" -------------------------------------------------------------------------------- # Integration Functions ### Introduction Integration functions enable you to code and use a Catalyst function as the backend of other Zoho services, and establish an integration with them. You can code the business logic of any backend feature of the service that is supported, through Catalyst, in Java, Node.js or Python platforms. When that particular feature is accessed in the external service, it will automatically invoke the execution of the Integration function coded in the Catalyst through a HTTP call. {{%note%}}{{%bold%}}Note:{{%/bold%}} Since an Integration function is invoked internally by another service, its endpoint is not directly accessible through any invocation URLs like Basic I/O or Advanced I/O functions. It can only be called by the service that you are integrating with. Although an Integration function is a type of an HTTP function, you will still not be able to invoke it even if you build an end-point for it. {{%/note%}} Creating Integration functions for external services enables you to store and manage the function in Catalyst, thereby allowing you to access various Catalyst features and tools for it, such as viewing the logs or reports of the function executions through {{%link href="/en/devops/help/logs/introduction/" %}}Catalyst Logs{{%/link%}} or {{%link href="/en/devops/help/apm/introduction/" %}}Application Performance Monitoring{{%/link%}}. Catalyst provides exclusive individual SDK packages for the services that you can integrate with. The SDK contains code templates of classes, objects, and methods that you can incorporate in your application easily, and build powerful backends for the service. You can also generate sample payloads to test Integration functions in the CLI. Refer to the {{%link href="/en/cli/v1/event-generate/introduction/" %}}Event Generate help page{{%/link%}} to learn more. {{%note%}}{{%bold%}}Note:{{%/bold%}} Integration Functions are not available to Catalyst users accessing from the EU, AU, IN, JP, SA or CA data centers.{{%/note%}} ### Cliq Integration Catalyst currently supports integration with {{%link href="https://www.zoho.com/in/cliq/" %}}**Zoho Cliq**{{%/link%}} through Integration functions. Cliq facilitates team communication, and enables you to collaborate, organize conversations, schedule tasks, and more. It also provides a platform for developers to build internal tools that automate work activities and bring data from other applications inside the chat windows. You can distribute these tools you create, and the end-users in Cliq can install them to access the feature. Catalyst Integration Functions enable you to code the backend of {{%bold%}}Cliq extensions{{%/bold%}} that can bundle the following Cliq internal tools: * {{%bold%}}Bots:{{%/bold%}} Conversational interface that handles tasks or responds to queries * {{%bold%}}Commands:{{%/bold%}} Slash commands that perform built-in or custom actions * {{%bold%}}Message Actions:{{%/bold%}} Actions that are performed as the response to individual messages * {{%bold%}}Widgets:{{%/bold%}} Enables you to customize your Cliq home screen * {{%bold%}}Functions:{{%/bold%}} Custom functions that can execute tasks based on event occurrences You can learn more about these internal tools and extensions from the {{%link href="https://www.zoho.com/cliq/help/platform/getting-started-with-cliq-platform.html" %}}Cliq developer documentation{{%/link%}}. ### Benefits * Enables you to code bundled extensions in Java, Node.js or Python platforms, instead of in Deluge which is the default programming environment supported by Cliq * Access function execution logs and detailed performance reports of Cliq backend functions through Logs or APM, that enable you to identify problem areas and rectify them immediately * Functionally-rich SDK support exclusively for Cliq integration with pre-coded class files and code templates, making it easy for you to understand actions that can be performed * Ability to create custom handler classes for any Cliq component and write your logic based on your needs ### Create Integration Functions in Catalyst Similar to other function types, you can create an Integration function from the console or initialize it from the CLI. If you initialize it from the CLI, you can code it using an external IDE and deploy it to the Catalyst console. {{%note%}}{{%bold%}}Note:{{%/bold%}} Refer to the {{%link href="/en/serverless/help/functions/introduction/#steps-to-work-with-functions-from-a-local-environment" %}}Functions Introduction page{{%/link%}} for the steps to work with functions from a local environment, and {{%link href="/en/serverless/help/functions/implementation/#create-a-function" %}}Working with Functions from the Console{{%/link%}} page for steps on creating a function from the console.{{%/note%}} While creating an Integration function either from the console or from the CLI, you can simply select the service that you want to create the function for. Unlike other function types, you will not have the option to create an Integration function without an SDK, as the SDK structure can help you understand the Cliq components better. Let's look at the Integration function structure in detail. ### Cliq Integration Function Structure An Integration function package contains different components when compared to the other function types. A {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}function's directory{{%/link%}} in Catalyst generally contains the main function file, along with the SDK components of Java, Node.js or Python and configuration files. As with the other function types, the boilerplate structure of an Integration function also contains all the necessary SDK components and configuration files. However, in addition to the JAR files or Node modules added to the directory, an Integration function's package also includes the {{%bold%}}Catalyst Cliq SDK{{%/bold%}}. The SDK provides you the interfaces and objects required to create handler classes and develop service-specific business logic. The code template contains individual handler classes for each component of the Cliq extension. That is, individual handler class files for bots, commands, widgets, functions, and message actions. Let us first take a look at a sample Java, Node.js and Python function structure, before discussing handler classes. #### Java The Java file structure contains the main Java file, along with the handler classes, JAR files of the Catalyst Java SDK, and configuration files. <br /> The Cliq Java SDK is automatically included when you initialize the function from the CLI or create it in the console. You can also {{%bold%}}obtain the Cliq Java SDK from {{%link href="https://www.zoho.com/catalyst/downloads/sdk/java/cliq/catalyst%5Fjava%5Fcliq%5Fsdk%5Flatest.zip" %}}here{{%/link%}}{{%/bold%}}. #### Node.js The Node.js file structure also contains a main function along with the handler classes, the Node modules files of the Catalyst Node.js SDK, and configuration files. <br /> Similar to the Cliq Java SDK, the Cliq Node.js SDK is also automatically included when you initialize the function from the CLI or create it in the console. To install it manually, you must execute this command from the Node.js function's directory using your terminal: {{%code class="language-javascript"%}}npm install zcatalyst-integ-cliq{{%/code%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} Refer to the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}Project Directory Structure help page{{%/link%}} for details about the generic function directory structure and the configuration files of Catalyst functions. {{%/note%}} #### Python When you create a Python Integration function, in addition to the Python modules added to the functions directory, an Integration function's package called the Cliq Python SDK will also be included. The SDK provides you the interfaces and objects required to create handler classes and develop service-specific business logic. The code template contains individual handler classes for each component of the Cliq extension. That is, individual handler class files for bots, commands, widgets, functions, and message actions. {{%note%}}{{%bold%}}Note:{{%/bold%}} You can also install the Cliq Python SDK manually, by executing this CLI command from the Python function's directory :{{%/note%}} {{%code class="language-javascript"%}}pip install zcatalyst-cliq{{%/code%}} The Catalyst Cliq SDK package contains the sub-packages mentioned below that are specific to the internal tools in Cliq application. You can refer to {{%link href="/en/serverless/help/functions/integration-functions/#cliq-integration" %}}this{{%/link%}} section to know more about these tools. #### Cliq Handler Classes Cliq handlers contain the definitions of the business logic of a specific action in a Cliq component. Each component contains multiple handlers that define actions to handle specific actions or events. For example, some of the handlers of a Cliq bot are: * {{%bold%}}Welcome handler:{{%/bold%}} Defines a custom message when a user subscribes to a bot * {{%bold%}}Message handler:{{%/bold%}} Triggers when a bot receives a message * {{%bold%}}Mention handler:{{%/bold%}} Renders a response when a bot is mentioned in a chat Similarly, each of the Cliq components supported by Catalyst- Commands, Message Actions, Widgets, Functions, have individual handlers. Refer to the {{%link href="https://www.zoho.com/cliq/help/platform/getting-started-with-cliq-platform.html" %}}Cliq help pages{{%/link%}} for details on all handlers supported by each component. Catalyst provides templates for necessary objects and methods that would be useful in building an extension in each handler class. They help you understand handling various actions such as parsing Cliq calls, routing it to the appropriate implementation, or constructing the required response. For example, {{%badge%}}BotClass.java{{%/badge%}}, {{%badge%}}bot-handler.js{{%/badge%}} or {{%badge%}}main.py{{%/badge%}} contains a sample code template for each individual handler of a bot handler class. <br /> You can refer to these definitions and use these methods to customize your own logic for the extension. You can modify the handler classes based on your requirements, and include only the necessary ones. The user can use this SDK for parsing the Cliq call, routing the call to corresponding implementation and to form output responses. ### Handler Class Files mapping #### Mapping in catalyst-config.json for Java and Node.js Functions All handler class files are mapped in the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}{{%badge%}}catalyst-config.json{{%/badge%}}{{%/link%}} configuration file of a function. The configuration file typically only includes basic execution and deployment details of a Catalyst function. However, for an Integration function, this file also maps the handler classes that are used in it. <br /> This mapping helps Catalyst execute the right set of actions, when the function is invoked. You can also create a new handler class file for a Cliq component and define your own logic in them. However, you must manually map the handler class file in the {{%badge%}}catalyst-config.json{{%/badge%}} file. Ensure that you follow the same format in writing the key for the mapping. The default handler files created as a part of Catalyst Cliq SDK are already mapped, when you create the function from the console or the CLI. #### Mapping in main.py for Python Functions When you create an Integration function, the Cliq Python SDK will be automatically installed within your current project's function directory. For Python, all the handler class files are mapped in the {{%badge%}}main.py{{%/badge%}} file of a function. This mapping helps Catalyst execute the right set of actions, when the function is invoked. You can also create a new handler class file for a Cliq component and define your own logic in them. However, you must manually map the handler class file in the {{%badge%}}main.py{{%/badge%}} file. Ensure that you follow the same format in writing the key for the mapping. The default handler files created as a part of Cliq Python SDK are already mapped, when you create the function from the CLI. {{%code class="language-javascript"%}}import zcatalyst-cliq # your cliq handler files's mapping should be given here config = { "ZohoCliq": { "handlers": { "bot_handler": "handlers/bot_handler.py", "function_handler": "handlers/function_handler.py", "installation_validator": "handlers/installation_validator.py", "command_handler": "handlers/command_handler.py", "widget_handler": "handlers/widget_handler.py", "messageaction_handler": "handlers/message_action_handler.py", "installation_handler": "handlers/installation_handler.py" } }, } def handler(request, response): handler_resp = zcatalyst_cliq.execute(request, config) response.set_content_type('application/json') response.send(handler_resp) {{%/code%}} The {{%badge%}}request{{%/badge%}} object of type {{%badge%}}IntegrationRequest{{%/badge%}} is sent as an argument to the {{%badge%}}execute(){{%/badge%}} method and is parsed with information such as name of the Cliq's internal tool and the operation being performed with it. The {{%badge%}}config{{%/badge%}} property contains the mappings of the handler class files with the respective handlers and is passed as another argument to the method. Based on the parameters, the {{%badge%}}execute(){{%/badge%}} method proceeds with its operation of processing the request with the respective handler classes, and returns the response. After you create an Integration function in Catalyst, you can create an extension in Cliq to invoke the function. For creating extensions in Cliq, you can refer to {{%link href="/en/serverless/help/functions/integration-functions/#cliq-integration" %}}this{{%/link%}} section. ### Configure Extensions in Cliq After you develop the backend for a Cliq extension, you must add the function while you configure the extension in Cliq. This will be a unique Cliq Extension - Catalyst Integration function mapping. Whenever the components of that extension are invoked through Cliq, it will in turn trigger the Catalyst function mapped to it. The appropriate action defined for that request will be triggered through the handler classes. For example, if the end-user in Cliq sends a message to a bot whose backend is defined in Catalyst, the request will be passed to Catalyst after it is authenticated. The details of the component, user, and chat are attached in the request body of the HTTP request. Catalyst will then invoke the message handler defined in {{%badge%}}BotClass.java{{%/badge%}}, {{%badge%}}bot-handler.js{{%/badge%}} or {{%badge%}}main.py{{%/badge%}} file, and will execute the appropriate action. Catalyst will send the response back to Cliq and it is rendered in the front-end of the Cliq component. #### Creating an Extension in Cliq You can create an extension in Cliq and configure components such as bots, widgets, or commands to be bundled in it from the {{%link href="https://prechat.zoho.com/developer" %}}developer console in Cliq{{%/link%}}. To configure a Catalyst Integration function in a Cliq extension, you must select the {{%bold%}}Execution Type{{%/bold%}} as "{{%bold%}}Catalyst Function{{%/bold%}}" when you create the extension in Cliq. <br /> You must then choose the Catalyst project from the drop-down list. All projects from your Catalyst account will be listed here. You can also click {{%bold%}}Create Project{{%/bold%}} which will redirect you to Catalyst to create a new project. You must then select the Integration function from the drop-down list that will be associated with this extension. After you configure other details and components of your extension, click {{%bold%}}Create Extension{{%/bold%}}. This will create the integration with Catalyst and enable the Integration function to be executed each time the components are accessed. {{%note%}}{{%bold%}}Note:{{%/bold%}} You can also build the backend for a Cliq extension using a Catalyst Basic or Advanced I/O function, and add its URL by selecting URL Invoke. However, since this will not include the Catalyst Cliq SDK package, you must define all actions manually.{{%/note%}} To learn about developing extensions for Catalyst in Cliq in detail, refer to the {{%link href="https://www.zoho.com/cliq/help/platform/catalyst.html" %}}**Catalyst Type Extension help documentation**{{%/link%}}. -------------------------------------------------------------------------------- title: "Job Functions" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.656Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/job-functions/" service: "Serverless" related: - Job Pool Documentation (/en/job-scheduling/help/jobpool/introduction/) - Create Job Pool (/en/job-scheduling/help/implementation/create-jobpool/) - Submit Job to Function Job Pool (/en/job-scheduling/help/implementation/submit-instant-job/) - Avoid Dispatch Delays When Executing Jobs (/en/job-scheduling/help/jobpool/key-concepts/#ideal-memory-allocation-to-avoid-dispatch-delay) - Java SDK (/en/sdk/java/v1/job-scheduling/overview/) - Node.js SDK (/en/sdk/nodejs/v2/job-scheduling/overview/) - Python SDK (/en/sdk/python/v1/job-scheduling/overview/) - Job Scheduling REST APIs (/en/api/code-reference/job-scheduling/jobpool/get-all-jobpool/#GetAllJobPools) -------------------------------------------------------------------------------- # Job Functions ### Introduction Job Functions are a function type that you can invoke when a {{%link href="/en/job-scheduling/help/job/introduction/" %}}job{{%/link%}} is executed in a {{%link href="/en/job-scheduling/help/implementation/submit-instant-job/" %}}Function Job Pool{{%/link%}}. You will code your custom business logic in this function, and it will be invoked at a scheduled time when a job to trigger the function is executed in the {{%link href="/en/job-scheduling/help/jobpool/introduction/" %}}job pool{{%/link%}}. A Job Function is a non-HTTPS function, like {{%link href="/en/serverless/help/functions/event-functions/" %}}Event Functions{{%/link%}}. This function will not have an endpoint, and the function will only be invoked when a job is executed in the function job pool with this particular job function as its target type. You can code your Job Function in the following runtimes: * {{%link href="/en/sdk/java/v1/job-scheduling/overview/" %}}Java{{%/link%}} - {{%badge%}}v7{{%/badge%}}, {{%badge%}}v11{{%/badge%}}, and {{%badge%}}v17{{%/badge%}} * {{%link href="/en/sdk/nodejs/v2/job-scheduling/overview/" %}}Node.js{{%/link%}} - {{%badge%}}v18{{%/badge%}} * {{%link href="/en/sdk/python/v1/job-scheduling/overview/" %}}Python{{%/link%}} - {{%badge%}}v3.9{{%/badge%}} Like the other *Serverless Functions*, you can create, initialize, and deploy Job Functions functions from the CLI. You can also upload your Job Function as a zip file to the console. However, since Job Functions are non-HTTPS functions, its URL is not accessible like {{%link href="/en/serverless/help/functions/basic-io/" %}}Basic I/O{{%/link%}} or {{%link href="/en/serverless/help/functions/advanced-io/" %}}Advanced I/O functions{{%/link%}}. To test a Job Function, you can use the following CLI command and use the {{%link href="/en/cli/v1/working-with-functions/functions-shell/" %}}function shell{{%/link%}}. {{%cli%}}catalyst functions:shell{{%/cli%}} A Job Function does not return any response other than determining if the function execution was a **success** or **failure**. You can also view and monitor the performance of the Job Function using the following {{%link href="/en/devops/" %}}Catalyst DevOps{{%/link%}} components: * {{%link href="/en/devops/help/logs/introduction/" %}}Logs{{%/link%}}: You can view, manage, and monitor all executions pertaining to Job Functions. * {{%link href="/en/devops/help/apm/introduction/" %}}Application Performance Monitoring{{%/link%}}: You can use this component to gather in-depth insights on Job Function’s performance. {{%note%}}{{%bold%}}Note:{{%/bold%}} To execute a {{%italics%}}Job Function{{%/italics%}} successfully, without any dispatch delays, always ensure that the {{%bold%}}allocated memory of the job function{{%/bold%}} is {{%bold%}}less than{{%/bold%}} that of the {{%bold%}}allocated memory of the job pool{{%/bold%}}. You can find out more about preventing dispatch delays from this {{%link href="/en/job-scheduling/help/jobpool/key-concepts/#ideal-memory-allocation-to-avoid-dispatch-delay" %}}help section{{%/link%}}.{{%/note%}} ### Benefits * A Job Function can be created, initialized, and deployed using Catalyst's robust CLI. This ensures that all dependencies that are required to deploy the function will be automatically installed when you {{%link href="/en/cli/v1/initialize-resources/initialize-functions/" %}}initialize the function through CLI{{%/link%}}. * Job functions can also be created in Catalyst's Serverless Console via the {{%link href="/en/serverless/help/functions/implementation/#create-a-function" %}}Editor{{%/link%}}. * Job functions will contain the ideal boilerplate code using which you can code any custom business logic, and the rest of the backend requirements will be handled by Catalyst. ### Function Boilerplate Code The boilerplate code present in the Job Function when you create it in the console or initialize it using the CLI is shown below: {{%tabs%}} {{%tab "Java" %}} {{%panel_with_adjustment class="language-java line-numbers" header="Java Job Function Boilerplate" footer="button" scroll="set-scroll" %}} import java.util.logging.Level; import java.util.logging.Logger; import com.catalyst.Context; import com.catalyst.job.JOB_STATUS; import com.catalyst.job.JobRequest; import com.catalyst.job.CatalystJobHandler; import com.zc.common.ZCProject; import com.zc.component.cache.ZCCache; public class Sample implements CatalystJobHandler { private static final Logger LOGGER = Logger.getLogger(Sample.class.getName()); @Override public JOB_STATUS handleJobExecute(JobRequest request, Context arg1) throws Exception { try { ZCProject.initProject(); Object eventData = request.getAllJobParams(); if (eventData != null) { LOGGER.log(Level.SEVERE, "Data is" + eventData.toString()); } LOGGER.log(Level.SEVERE, "Project Details " + request.getProjectDetails().toString()); ZCCache.getInstance().putCacheValue("JobSample", "Working", 1 l); LOGGER.log(Level.SEVERE, "Inserted SucessFully:)"); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Exception in Job Function", e); return JOB_STATUS.FAILURE; } return JOB_STATUS.SUCCESS; } } {{%/panel_with_adjustment%}} {{%/tab%}} {{%tab "Node.js" %}} {{%panel_with_adjustment class="language-javascript line-numbers" header="Node.js Job Function Boilerplate" footer="button" scroll="set-scroll" %}} /** <span></span>* * @param {import("./types/job").JobRequest} jobRequest * @param {import("./types/job").Context} context */ module.exports = (jobRequest, context) => { console.log('Hello from index.js'); // function input: { job_details: { job_meta_details: { params: { key: 'value' } } } } /** * JOB REQUEST FUNCTIONALITIES */ const projectDetails = jobRequest.getProjectDetails(); // to get the current project details const jobDetails = jobRequest.getJobDetails(); // to get the current job details const jobMetaDetails = jobRequest.getJobMetaDetails(); // to get the current job's meta details const jobpoolDetails = jobRequest.getJobpoolDetails(); // to get the current function job pool's details const getJobCapacityAttributes = jobRequest.getJobCapacityAttributes(); // to get the current jobs capacity const allJobParams = jobRequest.getAllJobParams(); // to get all the parameters supplied to the job function const jobParam = jobRequest.getJobParam('key'); // to get the value of a particular parameter supplied to the job function /** * CONTEXT FUNCTIONALITIES */ context.closeWithSuccess(); //end of application with success // context.closeWithFailure(); //end of application with failure }; {{%/panel_with_adjustment%}} {{%/tab%}} {{%tab "Python" %}} {{%panel_with_adjustment class="language-python line-numbers" header="Python Job Function Boilerplate" footer="button" scroll="set-scroll" %}} import logging def handler(job_request, context): logger = logging.getLogger() logger.info('Hello from main.py') # function input: { job_details: { job_meta_details: { params: { key: 'value' } } } } '''JobRequest Functionalities''' job_details = job_request.get_job_details() # get the details of the current job project_details = job_request.get_project_details() # get the details of the current project job_meta_details = job_request.get_job_meta_details() # get the job meta of the current job job_pool_details = job_request.get_job_pool_details() # get the current functions job pool details job_capacity_attributes = job_request.get_job_capacity_attributes() # get the current jobs capacity all_job_params = job_request.get_all_job_params() # get all the parameters supplied to the job function job_param = job_request.get_job_param('key') # get the value of a particular parameter supplied to the job function '''Context Functionalities''' remaining_execution_time_ms = context.get_remaining_execution_time_ms() # get the maximum allowed execution time for the job functions max_execution_time_ms = context.get_max_execution_time_ms() # get the remaining execution time for this job function # context.close_with_failure() # conclude the function execution with a failure response context.close_with_success() # conclude the function execution with a success response {{%/panel_with_adjustment%}} {{%/tab%}} {{%/tabs%}} ### Testing Job Functions Using Catalyst CLI Job Functions are non-HTTPS functions like {{%link href="/en/serverless/help/functions/event-functions/" %}}Event{{%/link%}} and {{%link href="/en/serverless/help/functions/integration-functions/" %}}Integrations{{%/link%}} Functions. You cannot invoke a Job function manually, or test it in the console. However, you can generate sample payloads and test the function using the {{%link href="/en/cli/v1/working-with-functions/functions-shell/#functions-shell-command-execution" %}}Function Shell{{%/link%}} present in the {{%link href="/en/cli/v1/cli-command-reference/" %}}Catalyst CLI{{%/link%}}. The following CLI command will generate a sample payload, and you can use it to test the function in the local environment. {{%cli%}}catalyst event:generate:job 10108000007982015 // Replace with the required Job Pool ID{{%/cli%}} <br /> You can feed this payload while you execute the required Job Function and validate the output. ### Job Function Arguments {{%tabs%}} {{%tab "Java" %}} A Catalyst Job Function supports two arguments in **Java**: {{%badge%}}**JobRequest**{{%/badge%}} and {{%badge%}}**Context**{{%/badge%}}. The {{%badge%}}JobRequest{{%/badge%}} argument contains the following built-in methods: * {{%badge%}}**JobRequest.getProjectDetails()**{{%/badge%}}: Used to get the project details, such as the project ID and project name. * {{%badge%}}**JobRequest.getJobDetails()**{{%/badge%}}: Used to get all the details of the Job including {{%link href="/en/job-scheduling/help/job/key-concepts/#job-id" %}}Job ID{{%/link%}}, the Job Pool it is associated with, and Job Name. * {{%badge%}}**JobRequest.getJobMetaDetails()**{{%/badge%}}: Used to get all the meta details of the Job including details on Execution Time, Dispatch Delay, and details on retry attempts. * {{%badge%}}**JobRequest.getJobpoolDetails()**{{%/badge%}}: Used to get all the details of the Job Pool. The details include {{%link href="/en/job-scheduling/help/jobpool/key-concepts/#job-pool-id" %}}Job Pool ID{{%/link%}}, Job Pool Name, and Job Pool Type. * {{%badge%}}**JobRequest.getJobCapacityAttributes()**{{%/badge%}}: Used to get all the details about the memory allocated for the Function Job Pool. * {{%badge%}}**JobRequest.getAllJobParams()**{{%/badge%}}: Used to get all the parameters (key-value pair) passed to the function. * {{%badge%}}**JobRequest.getJobParam(String key)**{{%/badge%}}: Used to get all value of the params by passing the key as string to the function. The {{%badge%}}Context{{%/badge%}} argument contains the following built-in methods: * {{%badge%}}**Context.getRemainingExecutionTimeMs()**{{%/badge%}}: This can be used to fetch the remaining execution time of a job function. * {{%badge%}}**Context.getMaxExecutionTimeMs()**{{%/badge%}}: This method can be used to get the maximum execution time of a job function, which is a constant value of **15 minutes**. {{%/tab%}} {{%tab "Node.js" %}} A Catalyst Job Function supports two arguments in **Node.js**: {{%badge%}}**jobDetails**{{%/badge%}} and {{%badge%}}**context**{{%/badge%}}. The {{%badge%}}jobDetails{{%/badge%}} argument contains the following built-in methods: * {{%badge%}}**jobDetails.getJobDetails()**{{%/badge%}}: Used to get all the details of the Job including Job ID, the Job Pool it is associated with, and Job Name. * {{%badge%}}**jobDetails.getJobMetaDetails()**{{%/badge%}}: Used to get all the meta details of the Job including details on Execution Time, Dispatch Delay, and details on retry attempts. * {{%badge%}}**jobDetails.getJobPoolDetails()**{{%/badge%}}: Used to get all the details of the Job Pool. The details include Job Pool ID, Job Pool Name, and Job Pool Type. * {{%badge%}}**jobDetails.getProjectDetails()**{{%/badge%}}: Used to get the project details, such as the project ID and project name. * {{%badge%}}**jobDetails.getJobCapacityAttributes()**{{%/badge%}}: Used to get all the details about the memory allocated for the Function Job Pool. * {{%badge%}}**jobDetails.getAllJobParams()**{{%/badge%}}: Used to get all the parameters (key-value pair) passed to the function. * {{%badge%}}**jobDetails.getJobParam(key)**{{%/badge%}}: Used to get all value of the params by passing the key as string to the function. The {{%badge%}}context{{%/badge%}} argument contains the following built-in methods: * {{%badge%}}**context.getRemainingExecutionTimeMs()**{{%/badge%}}: This can be used to fetch the remaining execution time of a job function. * {{%badge%}}**context.getMaxExecutionTimeMs()**{{%/badge%}}: This method can be used to get the maximum execution time of a job function, which is a constant value of 15 minutes. * {{%badge%}}**context.closeWithSuccess()**{{%/badge%}}: This method can be used to mark a job's execution as successful. * {{%badge%}}**context.closeWithFailure()**{{%/badge%}}: This method can be used to mark a job's execution as failure. {{%/tab%}} {{%tab "Python" %}} A Catalyst Job Function supports two arguments in **Python**: {{%badge%}}**job_details**{{%/badge%}} and {{%badge%}}**context**{{%/badge%}}. The {{%badge%}}job_details{{%/badge%}} argument contains the following built-in methods: * {{%badge%}}**job_details.get_job_details()**{{%/badge%}}: Used to get all the details of the Job including Job ID, the Job Pool it is associated with, and Job Name. * {{%badge%}}**job_details.get_job_meta_details()**{{%/badge%}}: Used to get all the meta details of the Job including details on Execution Time, Dispatch Delay, and details on retry attempts. * {{%badge%}}**job_details.get_job_pool_details()**{{%/badge%}}: Used to get all the details of the Job Pool. The details include Job Pool ID, Job Pool Name, and Job Pool Type. * {{%badge%}}**job_details.get_project_details()**{{%/badge%}}: Used to get the project details, such as the project ID and project name. * {{%badge%}}**job_details.get_job_capacity_attributes()**{{%/badge%}}: Used to get all the details about the memory allocated for the Function Job Pool. * {{%badge%}}**job_details.get_all_job_params()**{{%/badge%}}: Used to get all the parameters (key-value pair) passed to the function. * {{%badge%}}**job_details.get_job_param(key)**{{%/badge%}}: Used to get all value of the params by passing the key as string to the function. The {{%badge%}}context{{%/badge%}} argument contains the following built-in methods: * {{%badge%}}**context.get_remaining_execution_time_ms()**{{%/badge%}}: This can be used to fetch the remaining execution time of a job function. * {{%badge%}}**context.get_max_execution_time_ms()**{{%/badge%}}: This method can be used to get the maximum execution time of a job function, which is a constant value of 15 minutes. * {{%badge%}}**context.close_with_success()**{{%/badge%}}: This method can be used to mark a job's execution as successful. * {{%badge%}}**context.close_with_failure()**{{%/badge%}}: This method can be used to mark a job's execution as failure. {{%/tab%}} {{%/tabs%}} -------------------------------------------------------------------------------- title: "Implementation" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.657Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/implementation/" service: "Serverless" -------------------------------------------------------------------------------- # Implementation ### Introduction The implementation help page acts as a procedure guide on working with Catalyst Functions from the Catalyst console. You can create Java, Node.js, or Python functions from the web console, and view their daily usage statistics and details. You can use the code editor to work on the files for Node.js functions. You can also perform easy configurations on the functions such as adding triggers for them, creating and managing environmental variables, or optimizing their memory configuration from the console. {{%note%}}{{%bold%}}Note:{{%/bold%}} You will not be able to code Java and Python functions from the console editor. You will only be able to work on Node.js functions. You can work on Java and Python functions {{%link href="/en/serverless/help/functions/introduction/#steps-to-work-with-functions-from-a-local-environment" %}}from a local environment{{%/link%}}, and upload the respective bundles to the console.{{%/note%}} ### Create a Function To create a function for your Catalyst project from the console: 1. Navigate to {{%bold%}}Functions{{%/bold%}} component present under *FAAS* in the Catalyst *Serverless* console. 2. Click {{%bold%}}Create Function{{%/bold%}}.<br /> <br /> The {{%bold%}}Editor{{%/bold%}} tab will open in the pop-up box.<br /> <br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} If you click the {{%bold%}}CLI{{%/bold%}} tab, you can find commands for installing the CLI and initializing functions from it.{{%/note%}} 3. {{%bold%}}Function Type:{{%/bold%}}<br /><br /> Select a function type from the drop-down list. You can select a Basic I/O, Advanced I/O, Cron, Event, or an Integration function. {{%note%}}{{%bold%}}Note:{{%/bold%}} Integration Functions is currently not available to Catalyst users accessing from the EU, AU, IN, or CA data centers.{{%/note%}} <br /> <br /> The default Function URL is displayed below the function name, if you select a Basic I/O or an Advanced I/O function. 4. {{%bold%}}Function Name and URL:{{%/bold%}}<br /><br /> Enter a name for the function. This will be the folder name (Java) or the package name (Node.js or Python) of the function.<br /> <br /> The function name will be appended in the Function URL automatically as you type, for the Basic I/O and Advanced I/O functions. 5. {{%bold%}}Function Stack:{{%/bold%}}<br /><br /> Select a function stack from the drop-down list. The drop-down displays the latest supported runtimes of Java, Node.js and Python languages, along with other older runtimes that are still supported by Catalyst. Catalyst currently supports: Java 8, Java 11, Java 17, Node.js 12, Node.js 14, Node.js 16, Node.js 18, Node.js 20, and Python 3.9. <br /> <br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} It is recommended that you build and maintain functions in the latest runtimes of these programming environments to avoid security or stability issues. Catalyst will phase out the end of support for runtimes that are approaching their end of life. You can learn more about this from our {{%link href="/en/serverless/help/functions/runtime-support/" %}}Language Runtime Support Policy.{{%/link%}}{{%/note%}} 6. {{%bold%}}Function Bundle:{{%/bold%}}<br /><br/> If you select a Node.js version as your stack, select the bundle from the options. <br /> <br /> * Select {{%bold%}}Default Template{{%/bold%}} to create the function {{%link href="/en/serverless/help/functions/stack/" %}}without the Node dependencies{{%/link%}}. * Select {{%bold%}}Default Template with Catalyst SDK{{%/bold%}} to create the function with the Catalyst Node.js SDK package and the Node modules. * You can also upload the function by selecting {{%bold%}}File Upload{{%/bold%}} and uploading the function's folder as a compressed zip file from your local system. If you select a Java or Python version as your stack, you can only upload the function bundle. You must upload the Java or Python function's folder as a zip file as well.<br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} While uploading a Java, Node.js or a Python function bundle in the console, you must ensure that:<br /> * Instead of compressing the function folder as a whole, you must navigate inside the function folder, select all the files in it, and then compress them together. This is because, when Catalyst extracts a Java, Node.js or Python function's zip file, the {{%badge%}}{{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}catalyst-config.json{{%/link%}}{{%/badge%}} file must be present in the root. * The function's directory contains all the required configuration files in the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}standard structures{{%/link%}}. * The function name you enter in the console matches the names configured in {{%badge%}}package.json{{%/badge%}} for Node.js, and {{%badge%}}catalyst-config.json{{%/badge%}} for Java, Node.js and Python. The zip file's name can be anything. * The stack version you select in the console matches the stack version configured in {{%badge%}}catalyst-config.json{{%/badge%}} for all Java, Node.js and Python functions. * You select the right function type. Since each function type contains a different code structure, a type mismatch will occur if you select the wrong type. {{%/note%}} 7. {{%bold%}}Function Memory Configuration:{{%/bold%}}<br /><br /> Catalyst enables you to configure the memory for each of your functions. This memory will be allocated when the function is executed. The default memory allocated for a function is 256 MB. That is, if you don't configure the memory, or if you had created a function before this feature was made available, the memory would be set to 256 MB automatically. You can edit any of your existing functions and change this value as per your requirements. {{%note%}}{{%bold%}}Note:{{%/bold%}} You can optimize the cost and performance of your application by selecting the optimal memory for a function based on the complexity of its code. Refer to the {{%link href="/en/serverless/help/functions/optimization/" %}}Cost and Performance Optimization in Functions{{%/link%}} page for details.{{%/note%}} <br /> Choose a memory between 128 MB to 512 MB, from the drop-down list. {{%note%}}{{%bold%}}Note:{{%/bold%}} The CPU is allocated automatically based on the memory you configure for your function. You won't be able to view or configure this value.{{%/note%}} 8. After configuring the function's details, click {{%bold%}}Create{{%/bold%}}. The function will be created and listed in the _Functions_ page. A unique {{%bold%}}Function ID{{%/bold%}} will be created for it and displayed in the page, along with the function's details. ### Function Overview and Statistics When you open a function from the _Funtions_ page, you will be redirected to the Overview section for that function. This section provides valuable daily statistics of that particular function's execution and its general details. The following daily statistics of the function are displayed: * {{%bold%}}Total Invocations:{{%/bold%}} Total number of the function's invocations for the day * {{%bold%}}Invocation Errors:{{%/bold%}} Total number of invocations with the HTTP status code in the 500 series * {{%bold%}}Average Invocation Time:{{%/bold%}} Average response time of the successful invocations * {{%bold%}}Time-Outs:{{%/bold%}} Number of invocations which exceeded the time-out limits You can also view the function's details such as its ID, stack, invocation URL, and more from this section. ### Code Editor After a function has been created, you can access the code editor to work on its files. You can open the code editor by clicking the {{%bold%}}Code{{%/bold%}} tab for a function. <br /> The files in the function's directory will be created based on the stack and bundle, and displayed on the left. If you uploaded a zip file, you will find all the files in the directory. {{%note%}}{{%bold%}}Note:{{%/bold%}} The code editor will not be available for Java and Python functions. But you can view all the daily statistics in the {{%italics%}}Overview{{%/italics%}} section and perform configurations in the {{%italics%}}Configuration{{%/italics%}} section. {{%/note%}} You can open a file from the files on the left and code it. Click {{%bold%}}Save{{%/bold%}} to save the changes you make. The editor window enables auto-completion of your code, and also provides several tools that enrich your coding experience. {{%bold%}}Right-click{{%/bold%}} on the editor window to access the tools. The Code Navigation tools include: * {{%bold%}}Go To Definition:{{%/bold%}} Navigates to the definition of the item * {{%bold%}}Peek Definition:{{%/bold%}} Opens a peek editor inline and displays the definition of an item * {{%bold%}}Peek References:{{%/bold%}} Opens a peek editor inline and displays the references of an item * {{%bold%}}Go To Symbol:{{%/bold%}} Displays symbols in a function grouped into categories You can also modify all the occurrences of an item in a single step by selecting the item and using {{%bold%}}Change All Occurrences{{%/bold%}}. The {{%bold%}}Format Document{{%/bold%}} formats the code's structure to make it more readable. The {{%bold%}}Command Palette{{%/bold%}} lists out all the commands that are frequently used. You can enable full screen mode or switch to a dark mode by clicking the respective icons in the bottom-right corner of the code window. You can search for a file in the function's directory using the search bar. You can obtain the {{%link href="/en/serverless/help/functions/basic-io/#function-url" %}}Function URL for Basic I/O{{%/link%}} and {{%link href="/en/serverless/help/functions/advanced-io/#function-url" %}}Advanced I/O{{%/link%}} functions by clicking {{%bold%}}Get Function URL{{%/bold%}} in the bottom right corner. The URL of an Advanced I/O function is displayed below. The URL of a Basic I/O function is displayed below. You can copy the function URL and implement it in your code or use it as required. You can create new files and folders by right-clicking on any file or folder's name in the editor. Click {{%bold%}}New File{{%/bold%}} to create a new file, or {{%bold%}}New Folder{{%/bold%}} to create a new folder, in the current directory. Enter a name for the file or folder and press {{%bold%}}Enter{{%/bold%}} to create it. You can delete a file or a folder by clicking {{%bold%}}Delete{{%/bold%}} for it in the right-click menu. You can also upload a file to a folder in the function's directory. To do so, right-click on the folder and click {{%bold%}}Upload{{%/bold%}}. Select the file from your local machine and upload it. The console also allows you to test Basic I/O functions by passing input parameters. You will not be able to test functions of the other types because they do not return String responses like Basic I/O functions. To test a Basic I/O function, click {{%bold%}}Test{{%/bold%}} from the bottom of the editor window. Select the HTTP method for your request. Enter the function's parameter name under _Key_ and the value under _Value_. You can add more parameters by clicking the **[+]** icon and delete a parameter by clicking the **[-]** icon. Click {{%bold%}}Test{{%/bold%}} after providing the input values. The output is displayed below the editor. You can also switch the output window to the right side by clicking on the right icon. This value is also pushed to the logs by using the {{%badge%}}context.log method{{%/badge%}}. You can view this by opening {{%link href="/en/devops/help/logs/introduction/" %}}Catalyst Logs{{%/link%}} and selecting the function. #### Function Configurations The _Configuration_ section of a function enables you to perform configurations for the following features: Environmental Variables, Allocated Memory, Function Triggers. Let's explore these in detail. ### Environmental Variables Environmental variables are variables of a function whose values are declared outside of the function's code. After an environmental variable is created, it can be called in any of the sub-functions in that function directory. Catalyst enables you to create, store, and manage variables for both the environments it offers: the {{%link href="/en/deployment-and-billing/environments/introduction/" %}}Development and Production environments{{%/link%}}. You can declare a single variable name and configure values for both these environments. For example, if you need to declare an auth token variable that will hold different values in different environments, you can do so, and save the values in this section. {{%note%}}{{%bold%}}Note:{{%/bold%}} If you want to declare a production variable, you must have {{%link href="/en/deployment-and-billing/environments/deployment-types/" %}}deployed your project to the Production environment{{%/link%}}. You will only be able to create or access production variables if your project is available in the Production environment.{{%/note%}} You can then call the variable in your function's code as mentioned in {{%link href="#use-an-environmental-variable" %}}this section{{%/link%}}. ### Create an Environmental Variable To create a new environmental variable for a function: 1. Click the {{%bold%}}Configuration{{%/bold%}} tab after you open the function from the _Functions_ page. 2. Click {{%bold%}}Create Variable{{%/bold%}} in the _Environment Variables_ section. 3. Configure the key and the value(s) for the variable.<br /><br /> If your project is not available in the Production environment, you will be able to add the variable key and its development value alone. <br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} To use {{%link href="/en/cloud-scale/help/zcql/syntax-exceptions/" %}}ZCQL V2{{%/link%}} queries in your code, you need to create an environment variable with the following values:<br /> * {{%bold%}}Key{{%/bold%}}: {{%badge%}}ZOHO_CATALYST_ZCQL_PARSER{{%/badge%}} * {{%bold%}}Development Value{{%/bold%}}: {{%badge%}}V2{{%/badge%}} You can find out more on using ZCQL queries in code from this {{%link href="/en/cloud-scale/help/zcql/testing-queries/#using-zcql-v2-in-function-code" %}}help document{{%/link%}}.{{%/note%}}<br /> If your project is available in the Production environment, you will be able to add both development and production values for the variable. 4. Click {{%bold%}}Save{{%/bold%}}. The variable will be saved and listed in the section. You can use the drop-down on the top to switch between the development and production variables list. That is, if you need to access development variables, select {{%bold%}}Development{{%/bold%}} from the drop-down. ### Use an Environmental Variable After you create an environmental variable, you can call it in your function's code by its keyname in different ways for different function stacks. Each time you need to refer to the variable in the code, you must follow the syntax specified below based on the programming environment: {{%bold%}}Java:{{%/bold%}} {{%code class="language-javascript"%}}System.getenv(keyname){{%/code%}} {{%bold%}}Node.js{{%/bold%}} {{%code class="language-javascript"%}}process.env.keyname{{%/code%}} {{%badge%}}**keyname**:{{%/badge%}} The {{%badge%}}keyname{{%/badge%}} declared for the variable. This syntax method is best used when {{%badge%}}keyname{{%/badge%}} *contains no spaces*. {{%code class="language-javascript"%}}process.env[keyname]{{%/code%}} {{%badge%}}**keyname**:{{%/badge%}} The {{%badge%}}keyname{{%/badge%}} declared for the variable. This syntax method is best used when {{%badge%}}keyname{{%/badge%}} *contains spaces*. {{%bold%}}Python:{{%/bold%}} {{%code class="language-javascript"%}}os.getenv("keyname"){{%/code%}} {{%bold%}}Web:{{%/bold%}} {{%code class="language-javascript"%}}catalyst.getCatalystEnv(key){{%/code%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} The variable's value is fetched based on the environment the function is executed in. That is, if the function is executed in the Development environment, the development value of the variable is fetched. If it is executed in the Production environment, the production value of the variable is fetched. {{%/note%}} #### Edit an Environmental Variable To edit an environmental variable's key or values: 1. Click the ellipsis icon for the variable, then click {{%bold%}}Edit{{%/bold%}}.<br /> <br /> 2. You can edit the key, the development or production value. Then click {{%bold%}}Save{{%/bold%}}.<br /> #### Delete an Environmental Variable You can delete the development or the production value of an environmental variable. When you delete it one environment, the value of the variable in the other environment is still available. To delete the development or the production value of an environmental variable: 1. Click the ellipsis icon for the variable, then click {{%bold%}}Remove{{%/bold%}}.<br /> <br /> 2. You can edit the key, the development or production value. Then click {{%bold%}}Save{{%/bold%}}.<br /> The variable will be deleted from the selected environment alone. ### Allocated Memory You can allocate memory for your function's execution based on its performance requirements, in this section. If you did not specifically configure the memory while creating the function, the default memory of 256 MB will be allocated for its execution. You can edit the default or previously configured memory after analysing its requirements, and optimize its performance and cost by selecting an optimal value. Refer to the {{%link href="/en/serverless/help/functions/optimization/" %}}Functions Cost and Performance Optimization page{{%/link%}} to learn more. {{%note%}}{{%bold%}}Note:{{%/bold%}} The CPU is allocated automatically based on the memory you configure for your function. You won't be able to view or configure this value.{{%/note%}} To configure the memory allocated for a function: 1. Navigate to the {{%bold%}}Allocated Memory{{%/bold%}} tab in the _Configuration_ tab, then click the edit icon. 2. Select the required memory for the function, then click the check icon. You can also edit the allocated memory by {{%link href="#update-or-download-a-function" %}}editing the function{{%/link%}}. ### Function Triggers The _Function Triggers_ section provides you with an easy way to create and manage all triggers associated with a function. It allows you to view all the triggers that have been associated with a particular function in a single space, and enables you to easily disable, update, or delete a trigger. This saves you time from navigating to each component and searching for triggers associated with a function. Based on the function type, different component triggers can be associated with a function. {{%note%}}{{%bold%}}Note:{{%/bold%}} Integration functions cannot be associated with any function triggers.{{%/note%}} #### Basic I/O and Advanced I/O Functions The Basic I/O and Advanced I/O functions of your project can be associated with {{%link href="/en/cloud-scale/help/api-gateway/introduction/" %}}API Gateway triggers{{%/link%}}. You can create APIs to access the endpoints of these functions, and additionally configure authentication and throttling for them from this section. {{%note%}}{{%bold%}}Note:{{%/bold%}} Basic I/O functions can also be orchestrated in {{%link href="/en/serverless/help/circuits/introduction/" %}}Circuits{{%/link%}} and used in defining workflows. You can perform this action by accessing Circuits in the console.{{%/note%}} To create an API Gateway function trigger for a Basic I/O or an Advanced I/O function: 1. Navigate to the _Functions Triggers_ section in the _Configuration_ tab. If you have not enabled API Gateway, you can click on {{%bold%}}Access API Gateway{{%/bold%}} to enable it first. If your API Gateway is enabled, all the APIs that have been configured for that specific function, if any, will be listed there. You can then click on {{%bold%}}Create API Gateway Trigger{{%/bold%}} to configure a new API for the function. This API defines the access to that function. 2. This will open an API creation pop-up. Configure the details of the API. You can learn more about this step from the {{%link href="/en/cloud-scale/help/api-gateway/introduction/" %}}API Gateway help page{{%/link%}}. Then click {{%bold%}}Create{{%/bold%}}. The API for the function will be created and listed in this section along with its details. You will also find it listed on the API Gateway component page in your console. We will discuss editing and deleting a function trigger after we discuss the triggers available for the function types. #### Event Functions The Event functions of your project can be associated with {{%link href="/en/cloud-scale/help/event-listeners/introduction/" %}}Catalyst Event Listeners{{%/link%}}. You can configure a Component or Custom Event Listener {{%link href="/en/cloud-scale/help/event-listeners/terminology/" %}}rule{{%/link%}} as a trigger for an Event function, in this section. Whenever the rule is invoked, the Event function will be executed. To create a function trigger for an Event function: 1. Navigate to the _Functions Triggers_ section in the _Configuration_ tab of the Event function, then click {{%bold%}}Create Event Listener{{%/bold%}}. 2. This will open an event listener creation pop-up. You can create a rule for a Component or a Custom event listener. <br /><br /> When you click on the text box for Event Listener Name, you can choose the Default (Component) listener or any of the existing Custom listeners to create a rule for them. Or, you can type in a name for a new Custom listener. 3. In the case of a Component event listener, you can associate the rule with specific actions of a Catalyst component instance. You can learn more from {{%link href="/en/cloud-scale/help/event-listeners/component-event-listeners/" %}}here{{%/link%}}.<br /> In the case of a Custom event listener, you can configure the relevant rule details. If it is an existing listener, the URL will have already been generated for it. If you are creating a new Custom listener, a new URL will be created for it. You can learn more from {{%link href="/en/cloud-scale/help/event-listeners/custom-event-listeners/" %}}here{{%/link%}}. The target function will be the function that you are creating the rule for, in both cases. 4. Click {{%bold%}}Create{{%/bold%}} after configuring the details. The event listener trigger will be created and shown in the _Function Triggers_ section. The trigger will be enabled by default. All event listener triggers associated with this function will be listed here. You can disable or re-enable this trigger, as well as edit and delete it from this section. We will discuss this after the Cron function trigger section. #### Cron Functions You can create a new {{%link href="/en/cloud-scale/help/cron/introduction/" %}}Cron job{{%/link%}} and associate it with a Cron function. Whenever the cron scheduler is invoked, the Cron function will be executed. {{%note%}}{{%bold%}}Note:{{%/bold%}} Cron jobs can also be configured to invoke third-party URLs, instead of a Cron function. You can configure these crons by accessing the Cron component.{{%/note%}} To create a function trigger for a Cron function: 1. Navigate to the _Functions Triggers_ section in the _Configuration_ tab of the Cron function, then click {{%bold%}}Create Cron{{%/bold%}}. 2. Configure the details of the cron. You can pass parameter values during the cron function's execution. You can schedule it as a one-time or a recursive cron, and configure the time and date or the frequency of the execution respectively. You can learn more from {{%link href="/en/cloud-scale/help/cron/key-concepts/" %}}here{{%/link%}}. 3. After you configure the details, click {{%bold%}}Save{{%/bold%}}. The cron trigger will be created and shown in the _Function Triggers_ section. The trigger will be enabled by default. All cron triggers associated with this function will be listed. #### Disable/Enable an Event Listener or Cron Trigger Catalyst enables you to enable or disable an event listener rule or a cron associated with an Event or a Cron function from the Function Triggers section directly. You need not navigate to the respective components to perform this action. To disable an event listener rule or a cron from the Function Triggers section: 1. Click the ellipsis icon of an event listener or a cron trigger, then click {{%bold%}}Disable{{%/bold%}}. 2. Click {{%bold%}}Yes, Proceed{{%/bold%}} in the confirmation pop-up. The event listener rule or the cron will be disabled. You can re-enable an event listener or a cron trigger by clicking the ellipsis icon again, then clicking {{%bold%}}Enable{{%/bold%}}. #### Edit an API Gateway, Event Listener, or Cron Trigger You can easily update the details of a function trigger created for any of the function types from the _Function Triggers_ section. To edit an API Gateway, event listener, or a cron trigger: 1. Click the ellipsis icon of an API Gateway, event listener, or a cron trigger, then click {{%bold%}}Edit{{%/bold%}}. 2. Make the necessary changes to the API, event listener, or cron configuration, then click {{%bold%}}Update{{%/bold%}}.<br /> These changes will be reflected in the respective components. That is, the updates will be available if you access the API Gateway, Event Listeners, or Cron component. #### Delete an API Gateway, Event Listener, or Cron Trigger You can delete an API, event listener rule, or a cron associated with a function from the _Function Triggers_ section in the following way: 1. Click the ellipsis icon of an API Gateway, event listener, or a cron trigger, then click {{%bold%}}Delete{{%/bold%}}. 2. Click {{%bold%}}Yes, Proceed{{%/bold%}} in the confirmation pop-up. The API, event listener rule, or cron will be permanently deleted. ### Update or Download a Function You can upload an updated bundle of your function any time from your local system to the Catalyst console. You can also modify the memory configuration allocated to a function and update its runtime version. However, you will not be able to edit any other values of a function, such as its name or type, or change it to a different stack. When a runtime is nearing its end-of-life and is soon to be deprecated by Catalyst, you will find a warning displayed when you open the function. You must ensure that you upgrade the function to the latest supported version before Catalyst's end of support for the runtime. You can learn more about this from the {{%link href="/en/serverless/help/functions/runtime-support/" %}}Language Runtime Support Policy{{%/link%}} help section. You can experiment with a function's memory configuration to figure out the optimal memory it requires, based on the complexities of the code involved, and the observations you make from its execution history. You can then update the function's memory accordingly to optimize the cost and performance of your application. Learn more about this from the {{%link href="/en/serverless/help/functions/optimization/" %}}Cost and Performance Optimization{{%/link%}} help section. You can update a function in the following way: 1. Click the {{%bold%}}ellipsis icon{{%/bold%}} from the _Overview_ or _Code_ section of the function and click {{%bold%}}Update{{%/bold%}}. 2. Upload the updated function bundle or edit its memory configuration in the pop-up window. {{%note%}}{{%bold%}}Note:{{%/bold%}} Ensure that you follow all the guidelines mentioned in the {{%link href="#create-a-function" %}}Creating a Function{{%/link%}} section while uploading the bundle.{{%/note%}} 3. Click {{%bold%}}Save{{%/bold%}}. {{%note%}}{{%bold%}}Note:{{%/bold%}} If you wish to modify the name of a function, you must do it in the {{%link href="/en/cli/v1/project-directory-structure/functions-directory/" %}}{{%badge%}}catalyst-config.json{{%/badge%}}{{%/link%}} and {{%badge%}}package.json{{%/badge%}} files.{{%/note%}} To download the function's bundle from the Catalyst console, click the {{%bold%}}ellipsis icon{{%/bold%}} and click {{%bold%}}Download{{%/bold%}}. The download will be initiated. You can also access this menu from the _Functions_ page. ### Delete a Function To delete the function from the Catalyst console permanently: 1. Click the {{%bold%}}ellipsis icon{{%/bold%}} and click {{%bold%}}Delete{{%/bold%}}. 2. Click {{%bold%}}Yes, Proceed{{%/bold%}} to confirm. -------------------------------------------------------------------------------- title: "Language Runtime Support Policy" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.659Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/runtime-support/" service: "Serverless" -------------------------------------------------------------------------------- # Language Runtime Support Policy Catalyst functions are built on Java, Node.js, or Python and their runtimes rely on the runtime of the specific versions of the programming environments. Catalyst implements a phased reduction in its support of a language's runtime, and therefore provides you with plenty of time to plan, implement, and test upgrades in your functions. Catalyst will begin implementing an end of support for a language version as soon as an end-of-life announcement is made for it by the community. It is always advisable to build and maintain your Catalyst functions in the latest stable release of a programming environment. This ensures that high security and stability are retained in your Catalyst application performance. You must make appropriate changes in your function libraries and code to make them compatible with the version you upgrade them to. {{%note%}}{{%bold%}}Note:{{%/bold%}} Catalyst's language runtime support policy currently applies to the Node.js programming environment alone.{{%/note%}} Catalyst will end support for a runtime in four phases as explained in this document. ### Phase 1: Deprecation Announcement The deprecation announcement marks the start of the end of support of a language version. Catalyst will announce the deprecation of a runtime {{%bold%}}six months before the official end-of-life{{%/bold%}} of the runtime. For example, if the official end-of-life of the runtime as announced by the community is on April 1, 2022, then we will make the deprecation announcement on October 1, 2021. The deprecation announcement will contain the details of the official retirement of the version and Catalyst's end of support for it. This provides you enough time to plan and prepare to upgrade your Catalyst functions to the latest stable version. ### Phase 2: Deprecation Period The deprecation period of Catalyst's support for a language version begins right after the deprecation announcement is made. The deprecation period of a runtime in Catalyst will last for {{%bold%}}one year{{%/bold%}}. For example, if the deprecation announcement was made on October 1, 2021, the deprecation period will last until October 1, 2022. You will be {{%bold%}}able to create and update functions{{%/bold%}} in the deprecation period, and work with your existing Catalyst functions of that version unhindered. However, you must use this period to upgrade all your functions in your Catalyst applications to the latest stable version of the programming environment. ### Phase 3: Retirement Period The retirement period of a deprecated runtime begins right after the one year of the deprecated period. The retirement period will last for {{%bold%}}three months{{%/bold%}}. For example, if the deprecation period ends on October 1, 2022, the retirement period lasts until January 1, 2023. You will {{%bold%}}not be able to create new functions{{%/bold%}} targeting the deprecated runtime of a language in the retirement period. You can still continue to run and make updates to the existing functions of the deprecated version in your Catalyst applications. We strongly recommend you to make sure all your functions are fully updated and functional in the latest runtime during this period. ### Phase 4: End of support The end of support for a deprecated runtime begins right after the three months of the retirement period. For example, if the retirement period ends on January 1, 2023, Catalyst will end its support for the runtime from then on. You will {{%bold%}}no longer be able to create or update functions{{%/bold%}} of the deprecated version after it reaches the end of support phase. We also {{%bold%}}do not guarantee function invocations or application stability{{%/bold%}}, if you continue to maintain deprecated runtimes in your application. Catalyst will not apply the latest security patches and updates of a language runtime to a deprecated runtime. The functions of a deprecated build may or may not continue to execute. However, we provide you the convenience of upgrading the version of the functions alone at any time, after the end of support is reached. {{%note%}}{{%bold%}}Note:{{%/bold%}} Catalyst retains the ability to make changes to the deprecation or retirement policies of a language runtime at any time, based on exceptions in rare cases. In case we decide to implement any changes to a prior announcement, we will communicate all the necessary details pertaining to these changes. These changes might include, but are not limited to, changes in the end-of-life as announced by a language community, or runtimes that reach their end of life but will continue to be supported on the platform until further notice.{{%/note%}} You can refer to the {{%link href="/en/serverless/help/functions/implementation/#update-or-download-a-function" %}}Functions Implementation help page{{%/link%}} to learn about updating an existing function from the remote console. ### Language Version Support Policies and Timeline You can always keep a track of a language release status, and their current or active versions from their official websites: {{%bold%}}Node.js:{{%/bold%}} {{%link href="https://nodejs.org/en/about/previous-releases" %}}Node.js Releases document{{%/link%}} ### Retirement Exceptions Catalyst has initiated the process of deprecating the older versions of Node.js- versions 10 and 12\. However, we have implemented certain one-time exceptions with the deprecation process of these versions. * {{%bold%}}Node.js v10:{{%/bold%}} The deprecation phase of Node.js v10 has been ongoing since April 2021\. The retirement date was announced as July 31, 2022 for the version. However, we have planned to extend the deprecation period of the version until October 31, 2022\. Following the deprecation period, Node.js v10 will be retired on January 31, 2023, and Catalyst will end its support for the runtime. * {{%bold%}}Node.js v12:{{%/bold%}} Node.js v12 is currently in the deprecation phase. Following the deprecation period of one year until April 30, 2023, Node.js v12 will be retired on July 31, 2023, three months after the end of the deprecation period. Catalyst will then end its support for the runtime. Please ensure you upgrade the functions in your Catalyst projects to the latest stable version of Node.js. {{%note%}}{{%bold%}}Note:{{%/bold%}} Catalyst now provides {{%bold%}}support for Node.js v16 version{{%/bold%}}. You can {{%link href="/en/serverless/help/functions/implementation/#update-or-download-a-function" %}}upgrade your existing functions{{%/link%}} to the latest supported version from the remote console. You can now also select this latest runtime when you {{%link href="/en/serverless/help/functions/implementation/#create-a-function" %}}create Node.js functions{{%/link%}}, or {{%link href="/en/cli/v1/initialize-resources/introduction/" %}}initialize them from the CLI{{%/link%}}.{{%/note%}} -------------------------------------------------------------------------------- title: "Cost and Performance Optimization" description: "Catalyst Functions are cloud-based, custom-built, serverless coding structures that contain the intense business logic of your application" last_updated: "2026-03-18T07:41:08.659Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/functions/optimization/" service: "Serverless" -------------------------------------------------------------------------------- # Cost and Performance Optimization in Functions ### Introduction Catalyst enables memory provisioning for each function you create, based on your requirements. You can select a memory for your function when you are {{%link href="/en/serverless/help/functions/implementation/#create-a-function" %}}creating it{{%/link%}}, or {{%link href="/en/serverless/help/functions/implementation/#update-or-download-a-function" %}}edit its configurations{{%/link%}} any time you need. The flexibility to customize a function's memory configuration over the default allocated memory allows you to optimize your Catalyst usage and manage resources better. You can monitor your application's performance, prioritize your needs, make informed decisions for each use case, and draw substantial benefits from it. This help page will explain the correlation between memory provisioning in functions and cost optimization, by explaining the pricing calculation methods of Catalyst functions with a few experiements. An increase in the memory provisioning of compute-intensive functions ideally results in a lower execution time, which in turn reduces your expenses in Catalyst. However, the optimal configuration varies from one use case to another, depending on the complexity of the operations performed in the function. <br /> ### Pricing Calculations This section explains the pricing model of Catalyst Functions. The table shown below displays the credits used for different function execution time range: <table class="content-table"> <thead> <tr> <th><strong>Execution Time (in Seconds)</strong></th> <th><strong>Credits</strong></th> </tr> </thead> <tbody> <tr> <td>&lt;1</td> <td>0.5</td> </tr> <tr> <td>1-5</td> <td>1</td> </tr> <tr> <td>5-10</td> <td>5</td> </tr> <tr> <td>10-15</td> <td>10</td> </tr> <tr> <td>15-30</td> <td>15</td> </tr> </tbody> </table> <br /> This table displays the credits consumed proportionate to the execution time, for each memory configuration in functions: <table class="content-table"> <thead> <tr> <th><strong>Memory (MB)</strong></th> <th><strong>Credits Proportionate to Execution Time</strong></th> </tr> </thead> <tbody> <tr> <td>128</td> <td>1</td> </tr> <tr> <td>256</td> <td>2</td> </tr> <tr> <td>512</td> <td>4</td> </tr> </tbody> </table> The cost of execution of functions is calculated as follows: <br /> {{%highlight i%}}Cost of Execution of Functions = Number of Functions * Number of Credits based on the Execution Time * Number of Credits based on the Memory Consumed {{%/highlight%}} <br /> For example, here's the calculation of the credits consumed in three different scenarios: * If a function takes 4 sec with 128 MB, credits used = 1 \* 1 \* 1 = 1 credit * If a function takes 8 sec with 256 MB, credits used = 1\* 5 \* 2 = 10 credits * If a function takes 0.5 sec with 512 MB, credits used = 1 \* 0.5 \* 4 = 2 credits <br /> ### Experiments with Memory Configurations for Cost Optimization Let's discuss optimal memory configurations of functions and cost minimizations, by taking a look at the observations made in two real-life experiments. #### Experiment 1 A function performs a bubble sort of numbers from 1 to 100 arranged in a reverse sorted array. Application Performance Monitoring charts depicting the average response time for this function configured in three different memory settings: 128 MB, 256 MB, 512 MB, are shown below. <br /> It was observed that the function with 128 MB took 35 milliseconds, the function with 256 MB took 29 milliseconds, and the one with 512 MB took 16 milliseconds to execute. Let's now calculate the credits consumed in each of these cases: <br /> **Case 1 with 128 MB:** 1 \* 0.5 \* 1 = 0.5 credits **Case 2 with 256 MB:** 1 \* 0.5 \* 2 = 1 credit **Case 3 with 512 MB:** 1 \* 0.5 \* 4 = 2 credits <br /> #### Experiment 2 Another function performs a bubble sort of all numbers between 1 to 10000 in a reverse sorted array in multiple passes, with each pass converting an array from an ascending order to the descending order, and back to the ascending order again. This function is configured in two different memory settings: 128 MB and 512 MB. The execution data of this function in two memory settings reveals that the function with 128 MB took 6994 ms and the function with 512 MB memory took 3391 ms to execute. Let's now calculate the credits consumed in each of these cases: **Case 1 with 128 MB** 1\* 5 \* 1 = 5 credits **Case 2 with 512 MB:** 1\* 4 \* 1 = 4 credits <br /> #### Inferences We can draw the following inferences from these observations: * In compute-intensive or CPU-centric use cases, the performance of a Catalyst function improves exponentially, the higher the memory you configure for it. * In use cases that involve less intensive operations, the credit consumption is directly proportional to the increase in memory configurations. <br /> #### Conclusion Based on these inferences, we can come to the following conclusions: * It is wiser to opt for higher memory configurations for functions that contain heavy computation logic.<br /><br /> For example, assume that you make 10,000 function calls per month of the function described in experiment two. With 128 MB of memory, the function will consume 50,000 credits per month, whereas with 512 MB of memory the function will consume only 40,000 credits per month. This will save you 10,000 credits per month, and 1,20,000 credits per year, if the same pattern continues.\* <br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} *The credits to pricing conversion is based on your usage. You can check the {{%link href="https://catalyst.zoho.com/pricing.html" %}}Pricing document{{%/link%}} for more details.{{%/note%}} * If a function does not contain compute-intensive logic, you can allocate memory suitable to the function's requirements. For example, if you allocate 256 MB or 512 MB for a simple function that only consumes 100 MB of memory, it will be a waste of resources and expenses, and the response time would still remain the same. The difference made by customizing a function's memory and picking the ideal configuration for it is significant in terms of cost optimization and performance enhancements. There is no one-size-fits-all when it comes to choosing the right configuration for your functions. As a general rule of thumb, you can start with the lowest memory setting and perform a trial-and-error until you find the optimal memory configuration. {{%link href="/en/devops/help/logs/introduction/" %}}Catalyst Logs{{%/link%}} and {{%link href="/en/devops/help/apm/introduction/" %}}Application Performance Monitoring{{%/link%}} can act as powerful tools to help you in the process. You can play around and experiment with the customizations and tools provided by Catalyst, until you obtain the right solution for your use case and usage. --- ## API Reference — Functions -------------------------------------------------------------------------------- title: "Execute Function" description: "This API enables you to execute a Catalyst Basic I/O function and pass input parameters as query string or in the request body." last_updated: "2026-03-18T07:41:08.663Z" source: "https://docs.catalyst.zoho.com/en/api/code-reference/serverless/functions/execute-function/" service: "Serverless" -------------------------------------------------------------------------------- {{% section path="/en/api/code-reference/serverless/functions/execute-function/" id="ExecuteFunction" %}} {{%divtag class="LeftContent"%}} # Functions {{%link href="/en/serverless/help/functions/introduction/"%}}Catalyst Functions{{%/link%}} enable you to build custom functionalities in your application, and seamlessly integrate it with other Catalyst components to provide a powerful backend for it. You can automate tasks, perform memory-intensive computations, or integrate with third-party services using functions. Catalyst offers support to develop server-side functions in Java, Node.js and Python programming environments. {{%note%}} {{%bold class="bold-primary"%}}Note:{{%/bold%}} You can create {{%link href="/en/serverless/help/functions/basic-io/"%}}six types of functions{{%/link%}} in Catalyst: Basic I/O, Advanced I/O, Cron, Event, Integration, and Browser Logic functions. However, you can only execute Basic I/O functions using this API.{{%/note%}} # Execute a Function ### Description This API enables you to execute a Basic I/O function by referring to its unique function ID. Basic I/O functions are used to perform basic input and output operations, computations, and simple HTTP operations. Input parameters can passed to the function in the API request either as a query string or in the request body. A query string is preferred over the request body to pass the function parameters in. The response will contain the function output. {{%note%}} {{%bold class="bold-primary"%}}Note:{{%/bold%}} The function must already be available in the remote console. You can {{%link href="/en/serverless/help/functions/implementation/#create-a-function"%}}create a function in the console{{%/link%}} directly, or create it in your local system and {{%link href="/en/cli/v1/deploy-resources/introduction/"%}}deploy it to the console{{%/link%}}.{{%/note%}} ### Request Details #### Request URL {{%request class="apigreen" req="MULTIPLE" %}}<p>{api-domain}/baas/v1/project/{project_id}/function/{function_id}/execute</p>{{%/request%}} {{%request_id id="api-domain" data="URL" %}}The DC-specific domain to access Catalyst API{{%/request_id%}} {{%request_id id="project_id" data="Numerical" %}}The {{%link href="/en/getting-started/set-up-a-catalyst-project/general-settings/"%}}unique ID{{%/link%}} of the project{{%/request_id%}} {{%request_id id="function_id" data="Numerical" %}}The {{%link href="/en/serverless/help/functions/implementation/#create-a-function"%}}unique ID{{%/link%}} of the function{{%/request_id%}} #### Request Methods {{%divtag class="dF gap-15"%}} {{%divtag class="req-btn apigreen"%}}GET{{%/divtag%}} {{%divtag class="req-btn apiyellow"%}}POST{{%/divtag%}} {{%divtag class="req-btn apiblue"%}}PUT{{%/divtag%}} {{%divtag class="req-btn apired"%}}DELETE{{%/divtag%}} {{%/divtag%}} #### Request Headers {{%scope%}} **Authorization:** Zoho-oauthtoken {oauth_token} {{%/scope%}} **Optional Headers** <br> {{%scope%}} **CATALYST-ORG:** {org_id} {{%/scope%}} {{%scope%}} **Environment:** Development {{%/scope%}} #### Scope {{%scope%}} ZohoCatalyst.functions.EXECUTE {{%/scope%}} {{%note%}} {{%bold class="bold-primary"%}}Note:{{%/bold%}} This operation can also be executed with Catalyst user authentication permissions using Catalyst SDKs. Refer to the [Catalyst API Prerequisites section](/en/api/introduction/overview-and-prerequisites/#prerequisites) for details.{{%/note%}} ### Response Details The response contains the output of the processed function. A Basic I/O function returns response in the JSON format. The key {{%badge%}}output{{%/badge%}} contains the output generated by the function you execute. {{%/divtag%}} {{%divtag class="RightContent"%}} {{% panel_without_adjustment header="Sample Request" class="language-bash" %}}curl -X POST \ https://api.catalyst.zoho.com/baas/v1/project/4000000006007/function/4000000045004/execute?name=Raymond%20McGregor \ -H "Authorization: Zoho-oauthtoken 1000.910*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*16.2f*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*57" {{% /panel_without_adjustment %}} {{% panel_without_adjustment header="Sample Response" class="language-json line-numbers"%}} { "output": "Hello Raymond McGregor" }{{% /panel_without_adjustment %}} {{% expand-container %}} {{% expand id="sdk_docs" header="SDK Documentation"%}} {{%link href="/en/sdk/java/v1/serverless/functions/execute-function"%}}Execute a Function- Java SDK{{%/link%}}</br></br> {{%link href="/en/sdk/nodejs/v2/serverless/functions/execute-function"%}}Execute a Function- Node.js SDK{{%/link%}}</br></br> {{%link href="/en/sdk/python/v1/serverless/functions/execute-function"%}}Execute a Function- Python SDK{{%/link%}}</br><br> {{%link href="/en/sdk/web/v4/serverless/functions/execute-function"%}}Execute a Function- Web SDK{{%/link%}} {{%/expand%}} {{%/expand-container%}} {{%/divtag%}} {{%/section%}} --- ## SDK — Android — Functions -------------------------------------------------------------------------------- title: "Create a Function Instance" description: "Catalyst functions enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services." last_updated: "2026-03-18T07:41:08.667Z" source: "https://docs.catalyst.zoho.com/en/sdk/android/v2/serverless/functions/create-function-instance/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) - Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Functions {{%link href="/en/serverless/help/functions/introduction"%}}Catalyst Serverless Functions{{%/link%}} enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services. You can develop functions for your Android app from the Catalyst console or the CLI. {{%note%}} {{%bold class="bold-primary"%}}Note{{%/bold%}}: You can create six types of functions in Catalyst: Basic I/O, Advanced I/O, Cron, Event, Integration, and Browser Logic functions. However, you can only execute Basic I/O functions in Catalyst Android SDK. {{%/note%}} ### Create a Function Instance You can create an instance of a Catalyst function using the {{%badge%}}**getFunctionInstance()**{{%/badge%}} method, and enable the methods defined in this class to access the instance object. This will prevent unnecessary server calls. You can create a function instance in any of the following ways: ### Create a Function Instance by passing the Function ID You can pass the function's unique Function ID as an argument to the {{%badge%}}getFunctionInstance(){{%/badge%}} method and create an instance for it: {{%code class="language-bash line-numbers"%}}ZCatalystApp.getInstance().getFunctionInstance( id: Long ): ZCatalystFunction {{%/code%}} **Parameters**: * {{%badge%}}**id**{{%/badge%}}: The unique {{%link href="/en/serverless/help/functions/introduction"%}}Function ID{{%/link%}} of the function A sample code snippet is shown below: {{%code class="language-bash"%}}ZCatalystApp.getInstance().getFunctionInstance(2823000000011091) //Replace this with your Function ID{{%/code%}} ### Create a Function Instance by passing the API name of the function You can pass the function's API name as an argument to the {{%badge%}}getFunctionInstance(){{%/badge%}} method and create an instance for it: {{%code class="language-bash line-numbers"%}}ZCatalystApp.getInstance().getFunctionInstance( apiName: String ): ZCatalystFunction {{%/code%}} **Parameters**: * {{%badge%}}**apiName**{{%/badge%}}: The name of the function configured in Catalyst A sample code snippet is shown below: {{%code class="language-bash"%}}ZCatalystApp.getInstance().getFunctionInstance("LocalBackup") //Replace this with your function name{{%/code%}} -------------------------------------------------------------------------------- title: "Execute a Function" description: "You can execute a Catalyst function in several ways, based on the HTTP request you pass with the function." last_updated: "2026-03-18T07:41:08.667Z" source: "https://docs.catalyst.zoho.com/en/sdk/android/v2/serverless/functions/execute-function/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) - Implementing Functions (/en/serverless/help/functions/implementation) - Execute Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Execute a Function You can execute a {{%link href="/en/serverless/help/functions/introduction"%}}Catalyst Basic I/O function{{%/link%}} in any one of the ways given below, based on the HTTP request you pass with the function. You can pass the parameters to the function to be executed as the argument to a function execution method. This method differs for each HTTP request type. The {{%badge%}}&lt;FUNCTION_INSTANCE&gt;{{%/badge%}} used in all the code sections below is the instance defined in the {{%link href="/en/sdk/android/v2/serverless/functions/create-function-instance"%}}Function Instance page{{%/link%}}. ### Execute a GET function You can execute a function of the HTTP GET type by passing the parameters to the {{%badge%}}**executeGet()**{{%/badge%}} method as a Hash map: {{%code class="language-bash line-numbers"%}}&lt;FUNCTION_INSTANCE&gt;.executeGet( params: HashMap&lt;String, Any&gt;, success: (String) → Unit, failure: ((ZCatalystException) → Unit)? ): ZCatalystRequest&lt;String&gt;? {{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}ZCatalystApp.getInstance().getFunctionInstance(2823000000097020).executeGet( //Replace this with your Function ID hashMapOf(), { println(">> GET function executed successfully - $it") }, { println(">> GET function failed to execute - $it") } ) {{%/code%}} <br> ### Execute a PUT function You can execute a function of the HTTP PUT type by passing the parameters to the {{%badge%}}**executePut()**{{%/badge%}} method as a Hash map. You can pass the payload in the PUT request to this method as a Hash map argument as well: {{%code class="language-bash line-numbers"%}}&lt;FUNCTION_INSTANCE&gt;.executePut( params: HashMap&lt;String, Any&gt;, body: HashMap&lt;String, Any&gt;, success: (String) → Unit, failure: ((ZCatalystException) → Unit)? ): ZCatalystRequest&lt;String&gt;? {{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map * {{%badge%}}**body**{{%/badge%}}: The data payload to be passed as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}val body = HashMap&lt;String, Any&gt;() body.put("ROWID", "2823000000098012") body.put("Category", "Important") //Add your keys and values to a hash map ZCatalystApp.getInstance().getFunctionInstance(2823000000097114).executePut( //Replace this with your Function ID hashMapOf(), body, { println(" &gt;&gt; PUT function executed successfully - $it") }, { println(" &gt;&gt; PUT function failed to execute - $it") } ) {{%/code%}} <br> ### Execute a POST function You can execute a function of the HTTP POST type by passing the parameters to the {{%badge%}}**executePOST()**{{%/badge%}} method as a Hash map. You can pass the payload in the POST request to this method as a Hash map argument as well: {{%code class="language-bash line-numbers"%}}&lt;FUNCTION_INSTANCE&gt;.executePost( params: HashMap&lt;String, Any&gt; , body: HashMap&lt;String, Any&gt; , success: (String) → Unit, failure: ((ZCatalystException) → Unit)? ): ZCatalystRequest&lt;String&gt;? {{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map * {{%badge%}}**body**{{%/badge%}}: The data payload to be passed as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}val body = HashMap&lt;String, Any&gt;() body.put("Title", "Data Migration Tasks") body.put("Category", "Official") //Add your keys and values to a hash map ZCatalystApp.getInstance().getFunctionInstance(2823000000097089).executePost( //Replace this with your Function ID hashMapOf(), body, { println(" &gt;&gt; POST function executed successfully - $it") }, { println(" &gt;&gt; POST function failed to execute - $it") } ) {{%/code%}} <br> ### Execute a DELETE function You can execute a function of the HTTP DELETE type by passing the parameters to the {{%badge%}}**executeDelete()**{{%/badge%}} method as a Hash map. You can pass the payload in the DELETE request to this method as a Hash map argument as well: {{%code class="language-bash line-numbers"%}}&lt;FUNCTION_INSTANCE&gt;.executeDelete( params: HashMap&lt;String, Any&gt;, success: (String) → Unit, failure: ((ZCatalystException) → Unit)? ): ZCatalystRequest&lt;String&gt;? {{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}val body = HashMap&lt;String, Any&gt;() ZCatalystApp.getInstance().getFunctionInstance(2823000000097089).executeDelete( //Replace this with your Function ID hashMapOf() { println(" >> DELETE function executed successfully - $it") }, { println(" >> DELETE function failed to execute - $it") } ) {{%/code%}} --- ## SDK — Flutter — Functions -------------------------------------------------------------------------------- title: "Create a Function Instance" description: "Catalyst functions enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services." last_updated: "2026-03-18T07:41:08.668Z" source: "https://docs.catalyst.zoho.com/en/sdk/flutter/v2/serverless/functions/create-function-instance/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) - Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Functions {{%link href="/en/serverless/help/functions/introduction"%}}Catalyst Serverless Functions{{%/link%}} enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services. You can develop functions for your mobile app from the Catalyst console or the CLI. {{%note%}} {{%bold class="bold-primary"%}}Note{{%/bold%}}: You can create six types of functions in Catalyst: Basic I/O, Advanced I/O, Cron, Event, Integration, and Browser Logic functions. However, you can only execute Basic I/O functions in Catalyst Flutter SDK. {{%/note%}} ### Create a Function Instance You can create an instance of a Catalyst function using the {{%badge%}}**getFunctionInstance()**{{%/badge%}} method, method, and enable the methods defined in this class to access the instance object. This will prevent unnecessary server calls. The function instance can be fetched in two different ways. ### By passing the Function ID You can create a function instance by passing the ID of the function as an argument to the {{%badge%}}getFunctionInstance(){{%/badge%}} method in the String format as shown in the syntax below: {{%code class="language-bash line-numbers"%}}ZCatalystApp.getInstance().getFunctionInstance( String identifier ){{%/code%}} **Parameters**: * {{%badge%}}**functionID**{{%/badge%}}: The unique {{%link href="/en/serverless/help/functions/introduction"%}}ID{{%/link%}} of the function configured in Catalyst A sample code snippet is shown below: {{%code class="language-bash"%}}ZCatalystFunction function = ZCatalystApp.getInstance().getFunctionInstance(identifier: "158798998356682");{{%/code%}} <br> ### By passing the API name of the function You can create a function instance by passing the API name of the function as an argument to the {{%badge%}}getFunctionInstance(){{%/badge%}} method in the String format as shown in the syntax below: {{%code class="language-bash line-numbers"%}}ZCatalystApp.getInstance().getFunctionInstance( String identifier ){{%/code%}} **Parameters**: * {{%badge%}}**identifier**{{%/badge%}}: The name of the function configured in Catalyst A sample code snippet is shown below: {{%code class="language-bash"%}}ZCatalystFunction function = ZCatalystApp.getInstance().getFunctionInstance(identifier: "LocalBackUp");{{%/code%}} -------------------------------------------------------------------------------- title: "Execute a Function" description: "You can execute a Catalyst function in several ways, based on the HTTP request you pass with the function." last_updated: "2026-03-18T07:41:08.668Z" source: "https://docs.catalyst.zoho.com/en/sdk/flutter/v2/serverless/functions/execute-function/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) - Implementing Functions (/en/serverless/help/functions/implementation) - Execute Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Execute a Function You can execute a {{%link href="/en/serverless/help/functions/introduction"%}}Catalyst Basic I/O function{{%/link%}} in any one of the ways given below, based on the HTTP request you pass with the function. You can pass the parameters to the function to be executed as the argument to a function execution method. This method differs for each HTTP request type. The {{%badge%}}&lt;FUNCTION_INSTANCE&gt;{{%/badge%}} used in all the code sections below is the instance defined in the {{%link href="/en/sdk/flutter/v2/serverless/functions/create-function-instance"%}}Function Instance page{{%/link%}}. ### Execute a GET function You can execute a function of the HTTP GET type by passing the parameters to the {{%badge%}}**executeGET()**{{%/badge%}} method as a Hash map: {{%code class="language-bash line-numbers"%}}Future&lt;String?&gt; &lt;FUNCTION_INSTANCE&gt;.executeGET( Map&lt;String, Dynamic&gt; params){{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}ZCatalystFunction function = ZCatalystApp.getInstance().getFunctionInstance(identifier: "LocalBackUp"); try{ var output = function.executeGET( params: { 'id': 2345642, //Pass the params to the function }); print('Function output: $output'); } on ZCatalystException catch (ex) { print(ex.toString()); }{{%/code%}} <br> ### Execute a PUT function You can execute a function of the HTTP PUT type by passing the parameters to the {{%badge%}}**executePUT()**{{%/badge%}} method as a Hash map. You can pass the payload in the PUT request to this method as a Hash map argument as well: {{%code class="language-bash line-numbers"%}}Future&lt;String?&gt; &lt;FUNCTION_INSTANCE&gt;.executePUT(Map&lt;String, Dynamic&gt; body, [Map&lt;String, Dynamic&gt;? params]){{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map * {{%badge%}}**body**{{%/badge%}}: The data payload to be passed as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}ZCatalystFunction function = ZCatalystApp.getInstance().getFunctionInstance(identifier: 'LocalBackUp'); var body = &lt;String, Dynamic&gt;{ "ROWID": "2823000000098012", "Category": "Important" }; //Define the function instance and pass the payload to the map try{ var output = await function.executePUT( body: body, params: { 'id': 2345642, //Pass the params to the function }); print('Function output: $output'); } on ZCatalystException catch (ex) { print(ex.toString()); }{{%/code%}} <br> ### Execute a POST function You can execute a function of the HTTP POST type by passing the parameters to the {{%badge%}}**executePOST()**{{%/badge%}} method as a Hash map. You can pass the payload in the POST request to this method as a Hash map argument as well: {{%code class="language-bash line-numbers"%}}Future&lt;String?&gt; executePOST(Map&lt;String, dynamic&gt; body){{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map * {{%badge%}}**body**{{%/badge%}}: The data payload to be passed as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}ZCatalystFunction function = ZCatalystApp.getInstance().getFunctionInstance(identifier: 'LocalBackUp'); var body = &lt;String, Dynamic&gt;{ "ROWID": "2823000000098012", "Category": "Important" //Define the function instance and pass the payload to the Hash map }; try{ var output = await function.executePOST(body: body); print('Function output: $output'); } on ZCatalystException catch (ex) { print(ex.toString()); }{{%/code%}} ### Execute a DELETE function You can execute a function of the HTTP DELETE type by passing the parameters to the {{%badge%}}**executeDELETE()**{{%/badge%}} method as a Hash map. You can pass the payload in the DELETE request to this method as a Hash map argument as well: {{%code class="language-bash line-numbers"%}}Future&lt;APIResponse&gt; &lt;FUNCTION_INSTANCE&gt;.executeDELETE(Map&lt;String, Dynamic&gt; body, [Map&lt;String, Dynamic&gt;? params]) {{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map * {{%badge%}}**body**{{%/badge%}}: The data payload to be passed as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}try { ZCatalystFunction function = app.getFunctionInstance(identifier: 'DeleteData'); var response = await function.executeDELETE({"id": 298922}); } on ZCatalystException catch (ex) { print(ex.toString()); } {{%/code%}} --- ## SDK — iOS — Functions -------------------------------------------------------------------------------- title: "Create a Function Instance" description: "Catalyst functions enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services." last_updated: "2026-03-18T07:41:08.668Z" source: "https://docs.catalyst.zoho.com/en/sdk/ios/v2/serverless/functions/create-function-instance/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) - Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Create a Function Instance {{%link href="/en/serverless/help/functions/introduction"%}}Catalyst functions{{%/link%}} enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services. You can develop functions for your iOS app from the Catalyst console or the CLI. ### Create a Function Instance You can create an instance of a Catalyst function using the {{%badge%}}**getFunctionInstance()**{{%/badge%}} method, and enable the methods defined in this class to access the instance object. This will prevent unnecessary server calls. You can create a function instance in any of the following ways: #### i. By passing the Function ID You can pass the function's unique Function ID as an argument to the {{%badge%}}getFunctionInstance(){{%/badge%}} method and create an instance for it: {{%code class="language-bash"%}}ZCatalystApp.shared.getFunctionInstance( id : Int64 ) -> ZCatalystFunction{{%/code%}} **Parameters**: * {{%badge%}}**id**{{%/badge%}}: The unique {{%link href="/en/serverless/help/functions/introduction"%}}Function ID{{%/link%}} of the function. A sample code snippet is shown below: {{%code class="language-bash"%}}let function_instance = ZCatalystApp.shared.getFunctionInstance ( id : 1096000000002053 ) //Replace this with your Function ID{{%/code%}} #### ii. By passing the name of the function You can pass the function's API name as an argument to the {{%badge%}}getFunctionInstance(){{%/badge%}} method and create an instance for it: {{%code class="language-bash"%}}ZCatalystApp.shared.getFunctionInstance( name : String ) -> ZCatalystFunction{{%/code%}} **Parameters**: * {{%badge%}}**name**{{%/badge%}}: The name of the function configured in Catalyst A sample code snippet is shown below: {{%code class="language-bash"%}}let function_instance = ZCatalystApp.shared.getFunctionInstance ( name : "LocalBackup") //Replace this with you function name{{%/code%}} -------------------------------------------------------------------------------- title: "Execute a Function" description: "Catalyst functions enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services." last_updated: "2026-03-18T07:41:08.668Z" source: "https://docs.catalyst.zoho.com/en/sdk/ios/v2/serverless/functions/execute-function/" service: "Serverless" related: - Functiona (/en/serverless/help/functions/introduction) - Implementing Functions (/en/serverless/help/functions/implementation) - Execute Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Execute a Function You can execute a {{%link href="/en/serverless/help/functions/introduction"%}}Catalyst function{{%/link%}} in any one of the ways given below, based on the HTTP request you pass with the function. You can pass the parameters to the function to be executed as the argument to a function execution method. This method differs for each HTTP request type. {{%note%}}{{%bold%}}Note{{%/bold%}}: You can create six types of functions in Catalyst: Basic I/O, Advanced I/O, Cron, Integration, Event, and BrowserLogic functions. However, you can only execute Basic I/O functions in Catalyst iOS SDK.{{%/note%}} The {{%badge%}}&lt;FUNCTION_INSTANCE&gt;{{%/badge%}} used in all the code sections below is the instance defined in the {{%link href="/en/sdk/ios/v2/serverless/functions/create-function-instance"%}}Function Instance page{{%/link%}}. ### Execute a GET function You can execute a function of the HTTP GET type by passing the parameters to the {{%badge%}}**executeGet()**{{%/badge%}} method: {{%code class="language-bash line-numbers"%}}&lt;FUNCTION_INSTANCE&gt;.executeGet( parameters params : [ String : Any ]? = nil, completion : @escaping( Result< String, ZCatalystError &gt; ) -&gt; Void ) {{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}ZCatalystApp.shared.getFunctionInstance(id: 2823000000097020).executeGet() //Replace this with your function ID { result in switch result { case .success(let output) : print("GET function executed successfully - \( output )") case .error(let error) : print("GET function failed to execute - \( error )") } } {{%/code%}} ### Execute a PUT function You can execute a function of the HTTP PUT type, by passing the parameters to the {{%badge%}}**executePut()**{{%/badge%}} method as a Hash map. You can pass the payload in the PUT request to this method as a Hash map argument as well: {{%code class="language-bash line-numbers"%}}&lt;FUNCTION_INSTANCE&gt;.executePut( parameters params : [ String : Any ]? = nil, body : [ String : Any ]? = nil, completion : @escaping( Result< String, ZCatalystError > ) -> Void ) {{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map * {{%badge%}}**body**{{%/badge%}}: The data payload to be passed as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}}var params : [ String : Any ] = [:] params[ "ROWID" ] = "2823000000098012" params[ "Category" ] = "Important" ZCatalystApp.shared.getFunctionInstance(id: 2823000000097020).executePut(parameters: params) //Replace this with your function ID { result in switch result { case .success(let output) : print("PUT function executed successfully - \( output )") case .error(let error) : print("PUT function failed to execute - \( error )") } } {{%/code%}} ### Execute a POST function You can execute a function of the HTTP POST type, by passing the parameters to the {{%badge%}}**executePOST()**{{%/badge%}} method as a Hash map. You can pass the payload in the POST request to this method as a Hash map argument as well: {{%code class="language-bash line-numbers"%}}&lt;FUNCTION_INSTANCE&gt;.executePost( parameters params : [ String : Any ]? = nil, body : [ String : Any ]? = nil, completion : @escaping( Result< String, ZCatalystError > ) -> Void ) {{%/code%}} **Parameters**: * {{%badge%}}**params**{{%/badge%}}: The parameters to be passed to the function as a Hash map * {{%badge%}}**body**{{%/badge%}}: The data payload to be passed as a Hash map A sample code snippet is shown below: {{%code class="language-bash line-numbers"%}} var params : [ String : Any ] = [:] params[ "Title" ] = "Data Migration Tasks" params[ "Category" ] = "Official" ZCatalystApp.shared.getFunctionInstance(id: 2823000000097020).executePost(parameters: ) //Replace this with your function ID { result in switch result { case .success(let output) : print("POST function executed successfully - \( output )") case .error(let error) : print("POST function failed to execute - \( error )") } } {{%/code%}} --- ## SDK — Java — Functions -------------------------------------------------------------------------------- title: "Execute Function" description: "This page describes the method to execute functions in your Java application with sample code snippets." last_updated: "2026-03-18T07:41:08.669Z" source: "https://docs.catalyst.zoho.com/en/sdk/java/v1/serverless/functions/execute-function/" service: "Serverless" related: - Execute Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) - Functions (/en/serverless/help/functions/introduction) -------------------------------------------------------------------------------- # Execute function The function group in Catalyst is created and defined using either the online editor or the Command Line Interface (CLI). The function group can be executed to verify its functionality. ### Execute Function If a function endpoint is needs to be executed, then the following code snippet can be used. Here, the function's parameters are constructed as JSON objects and passed through the {{%badge%}}executeFunction(){{%/badge%}} method. The {{%badge%}}function ID{{%/badge%}} is an auto-generated numeric long integer value. #### Sample Code Snippet <br> {{% panel_without_adjustment header="Package Imports" class="language-java line-numbers" %}}import org.json.simple.JSONObject; import com.zc.functions.ZCatalystFunction;{{% /panel_without_adjustment %}} {{%code class="language-java" scroll="set-scroll" %}}//Create a JSONObject For Adding Parameters JSONObject jsonobj = new JSONObject(); //Add Parameters as key-value pairs to pass them to the method jsonobj.put("Name", "Amelia"); //Execute the method referring the function groupId with the JSON object Object result = ZCatalystFunction.getInstance().getFunctionInstance(1510000000054095L).executeFunction(jsonobj); {{%/code%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} You can also pass the function name as a string to the {{%badge%}}getFunctionInstance(){{%/badge%}} method instead of using the function ID.{{%/note%}} --- ## SDK — Node JS — Functions -------------------------------------------------------------------------------- title: "Get Functions Instance" description: "This page describes the method to execute functions in your NodeJS application with sample code snippets." last_updated: "2026-03-18T07:41:08.670Z" source: "https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/serverless/functions/get-component-instance/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) -------------------------------------------------------------------------------- # Functions The function group in Catalyst is created and defined through either Catalyst's online editor or the Command Line Interface (CLI). The functions in a function group can be executed in a testing environment as well as in the production environment. #### Get a component instance The function reference can be created using the following method which does not fire a server-side call. {{%code class="language-javascript"%}}//Get a function instance let functions = app.functions();{{%/code%}} -------------------------------------------------------------------------------- title: "Execute Function" description: "This page describes the method to execute functions in your NodeJS application with sample code snippets." last_updated: "2026-03-18T07:41:08.670Z" source: "https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/serverless/functions/execute-function/" service: "Serverless" related: - Execute Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) - Functions (/en/serverless/help/functions/introduction) -------------------------------------------------------------------------------- # Execute a Function A function can be executed by calling the _execute()_ method in which the function ID and configuration (of type JSON) are passed as parameters. The _functions_ reference used in the code snippets below is the {{%link href="/en/sdk/nodejs/v2/serverless/functions/get-component-instance" %}}component instance.{{%/link%}} #### Create a Function Configuration (JSON) Before executing a function, you must set the configuration required for it. Here, the configuration specifies the function arguments and their values. {{%bold%}}(function parameters){{%/bold%}} The configuration can be set using the following code snippet: {{%code class="language-javascript" scroll="set-scroll" %}}//Create Configuration for function Execution let conf = { args: { Name: 'Amelia' } }{{% /code%}} ### Execute function The unique function ID is passed as a parameter to the {{%badge%}}execute(){{%/badge%}} function to call the function to be executed with the necessary configuration. The promise returned here will be resolved to an object which is a JSON. {{%code class="language-javascript" scroll="set-scroll" %}}let functions = app.functions(); //Call Function with the function ID and the configuration let promiseResult = functions.execute(1510000000059262, conf); promiseResult.then((functionResponse) => { console.log(functionResponse); }); {{% /code%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} You can also pass the function name as a string to the {{%badge%}}execute(){{%/badge%}} method instead of using the function ID.{{%/note%}} --- ## SDK — Python — Functions -------------------------------------------------------------------------------- title: "Get Component Instance" description: "This page describes the method to execute functions in your Python application with sample code snippets." last_updated: "2026-03-18T07:41:08.670Z" source: "https://docs.catalyst.zoho.com/en/sdk/python/v1/serverless/functions/get-component-instance/" service: "Serverless" related: - Functions Help (/en/serverless/help/functions/introduction) -------------------------------------------------------------------------------- # Functions {{%link href="/en/serverless/help/functions/introduction" %}}Catalyst Serverless Functions{{%/link%}} are custom-built coding structures that contain the business logic of your Catalyst application. They can be created either using the {{%link href="https://console.catalyst.zoho.com/baas/index" %}}Catalyst console{{%/link%}} or the {{%link href="/en/cli/v1/working-with-functions/introduction" %}}CLI{{%/link%}}. This section covers the various SDK methods that can be used to implement functions in your Catalyst application. #### Get a Component Instance A component instance is an object that can be used to access the pre-defined configurations specific to a particular component. This process will not fire a server-side call. The {{%badge%}}app{{%/badge%}} reference used in the code below is the {{%link href="/en/sdk/python/v1/setup/#initializing-the-sdk" %}}Python object{{%/link%}} returned as a response during SDK initialization. You can create a new {{%badge%}}function_service{{%/badge%}}instance as shown below. This component instance will be used in the next section while executing the function. {{%code class="language-python"%}}#Get function component instance function_service = app.functions() {{%/code%}} -------------------------------------------------------------------------------- title: "Execute Function" description: "This page describes the method to execute functions in your Python application with sample code snippets." last_updated: "2026-03-18T07:41:08.670Z" source: "https://docs.catalyst.zoho.com/en/sdk/python/v1/serverless/functions/execute-function/" service: "Serverless" related: - Execute Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) - Functions Help (/en/serverless/help/functions/introduction) -------------------------------------------------------------------------------- # Execute the function A function can be executed by calling the {{%badge%}}execute(){{%/badge%}} method in which the function ID and the configuration (of type dictionary) are passed as parameters. To know more about the component instance {{%badge%}}function_service{{%/badge%}} used below, please refer to {{%link href="/en/sdk/python/v1/serverless/functions/get-component-instance/" %}}this help section{{%/link%}}. Before executing a function, you must set the configuration required for it. Here, the configuration specifies the function arguments and their values. The unique functionID is passed as a parameter to the {{%badge%}}execute(){{%/badge%}} method to call the function to be executed with the necessary configuration. The configuration can be set using the following code snippet : **Parameters Used** <table class="content-table"> <thead> <tr> <th class="w20p">Parameter Name</th> <th class="w20p">Data Type</th> <th class="w60p">Definition</th> </tr> </thead> <tbody> <tr> <td>{{%badge%}}function_ID{{%/badge%}}</td> <td>Numeric</td> <td>A {{%bold%}}Mandatory{{%/bold%}} parameter. Will store the unique ID the function to be executed.</td> </tr> <tr> <td>{{%badge%}}function_config{{%/badge%}}</td> <td>Object</td> <td>A {{%bold%}}Mandatory{{%/bold%}} parameter. Will store the configuration of the function to be executed.</td> </tr> </tbody> </table> {{%code class="language-python" scroll="set-scroll" %}}function_service = app.functions() args = {"Name": "Amelia"} return_value = function_service.execute(5249000000015567, args) {{% /code%}} {{%note%}}{{%bold%}}Info :{{%/bold%}} 1. Refer to the {{%link href="/en/sdk/python/v1/sdk-scopes" %}}SDK Scopes table{{%/link%}} to determine the required permission level for performing the above operation. 2. You can also pass the function name as a string to the {{%badge%}}execute(){{%/badge%}} method instead of using the function ID. {{%/note%}} --- ## SDK — Web — Functions -------------------------------------------------------------------------------- title: "Get a Component Instance" description: "Catalyst functions enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services." last_updated: "2026-03-18T07:41:08.671Z" source: "https://docs.catalyst.zoho.com/en/sdk/web/v4/serverless/functions/get-component-instance/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) - Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Functions The Function group in Catalyst is created and defined through either Catalyst's Online editor or Command Line Interface (CLI). The functions in a function group can be executed in a testing environment as well as in the production environment. ### Get a Component Instance The functions reference can be created by the following method which would not fire a server side call. {{%code class="language-javascript"%}}//Get a function instance var functions = catalyst.function; {{%/code%}} -------------------------------------------------------------------------------- title: "Get a Function Object" description: "Catalyst functions enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services." last_updated: "2026-03-18T07:41:08.671Z" source: "https://docs.catalyst.zoho.com/en/sdk/web/v4/serverless/functions/get-function-object/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) - Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Get a Function Object A function object can be created by the following method which would not fire a server-side call. The unique function ID is passed as a parameter to the method. The **functions** used in the below code snippet is the {{%link href="/en/sdk/web/v4/serverless/functions/get-component-instance"%}}component instance{{%/link%}}. {{%code class="language-javascript"%}}//Get the function object by passsing the function ID var functions = catalyst.function; var functionObject = functions.functionId(FUNCTION_ID); {{%/code%}} -------------------------------------------------------------------------------- title: "Execute the Function" description: "Catalyst functions enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services." last_updated: "2026-03-18T07:41:08.671Z" source: "https://docs.catalyst.zoho.com/en/sdk/web/v4/serverless/functions/execute-function/" service: "Serverless" related: - Functions (/en/serverless/help/functions/introduction) - Function - API (/en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction) -------------------------------------------------------------------------------- # Execute the Function A function can be executed by calling the execute() method in which the configuration (of type JSON) is passed as a parameter. The **function** object used in the code snippet is the {{%link href="/en/sdk/web/v4/serverless/functions/get-function-object"%}}function object{{%/link%}}. ### Create a Function Configuration Before executing a function, it is mandatory to set the configuration required for it. Here, the configuration specifies, the function arguments(as **args**) if any. {{%code class="language-javascript"%}}//Create the config object used to execute the function. //The args is an JSONObject to pass values to the function as parameters. var config = { "args": {"name": "xxx"}, "method":"GET" }; {{%/code%}} The supported HTTP methods are: GET, PUT, POST, PATCH, and DELETE. The GET method is the default. If you use GET in your code, the function arguments are passed as query strings. If you use any of the other HTTP methods, the function arguments are passed in the request body. ### Execute Function The function can be executed by passing the **configuration** object as an argument to the {{%italics%}}execute(){{%/italics%}} method. {{%note%}}The promise returned here will be resolved to an object in which the {{%bold%}}content{{%/bold%}} key contains the output of the executed function.{{%/note%}} {{%code class="language-javascript"%}}//Execute the function by passing the config object var functions = catalyst.function; var functionObject = functions.functionId(FUNCTION_NAME); //can pass Function Id or Function Name as argument var functionPromise = functionObject.execute(config); functionPromise .then((response) => { response.json().then(responseBody => { console.log(responseBody); }); }) .catch((err) => { console.log(err); }); {{%/code%}}