> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Script: JavaScript

> This reference describes the Script: JavaScript task.

This reference describes the Script: JavaScript task.

The JavaScript task is a function that reads an input, the Data Payload, and generates logic in standard JavaScript syntax.

> **Note**
>
> JavaScript tasks are not readily available and must be enabled by Zuora for each tenant. You can access the JavaScript task once it is enabled for your tenant.

For example:

```
exports.step = function myFunction(input) {
  var executionDate = input["Workflow"]["ExecutionDate"];
    return {executionDate};
};
```

Take the input parameter and assign the Workflow ExecutionDate key to the variable `executionDate` . Returning the `executionDate` adds it to the Data Payload for use by the next step in the Workflow.

The maximum execution time to process this task is limited to 20 seconds.

**Concurrency Mode**: Controls whether Workflow processes tasks in a single or multi-threaded manner for this task type. Select **Sequential** to single-thread, or **Parallel** to allow multi-threaded processing.

If you select **Parallel**, the **Max Concurrency** setting controls the maximum number of threads for this task type that can be utilized. You can specify a value from 1 up to the allowed maximum for this task type. A value of 1 behaves the same as Sequential processing.