Skip to Content

Reuse endpoints and scripts in Jitterbit Studio

Introduction

This guide describes techniques for reusing work across Studio projects: building a reusable base project, configuring endpoints dynamically with variables, reusing stand-alone scripts, and importing individual components from an existing project. Applying these techniques reduces duplication and keeps configuration consistent across projects and environments.

Base project

A typical scenario for reusing a project involves the development of a base project with the extensive use of global variables and, especially, project variables.

Configurable items (such as endpoint credentials, optional field mappings, parameterized queries, email addresses, and filenames) can be exposed as project variables.

The base project can also contain common functions such as error handling or the use of environment-wide caches.

When exporting a base project, select Include Project Variable Values to preserve the default values of all project variables in the export. This is important for a base project built around parameterized configuration. You can also choose whether to include credentials, email notifications, and operation schedules. See Export a project for the full set of export options.

The exported JSON file can then be imported as a new project in any environment or organization. The imported project is not deployed automatically after import; configure any environment-specific project variable values before deploying.

Endpoint reuse

Endpoints, created by configuring a connection and associated activities using connectors, are frequently used in operations. However, a unique endpoint doesn't necessarily need to be built for each operation. Since activity configurations accept variables for paths and filenames, generic endpoints can be built one time and then dynamically configured using global and project variables.

For example, assume an HTTP v2 connection and an associated activity are created, and the activity configuration specifies a path defined by a global variable, such as gv_http_path. A controller script can be used to populate gv_http_path as required.

Another example is a Database Query activity with a condition. Its WHERE condition can be assigned to a global variable, such as gv_database_condition.

Most endpoints have the capability to be configured using variables.

Script reuse

Stand-alone scripts that perform a specific function, such as returning a database lookup or calculating a result from a series of arguments, can be candidates for reuse, particularly if used in multiple operations.

For example, if a script uses the DBLookup function against a database table, and this function is used throughout the project, then a stand-alone script (separate from an operation) can be built. Using the ArgumentList function or simple global variables, the script can accept arguments and return a result. Since every operation chain is a different scope, the same script can safely be called from multiple simultaneous operations.

For guidance on storing credentials in project variables securely, see Manage endpoint credentials. For naming conventions that keep project variables consistent across a base project, see Use a naming convention for variables.

Selective component import

Instead of importing an entire base project, you can import specific components (such as individual endpoints or scripts) from an existing project or a project JSON file into an existing project. This is useful when you want to reuse a well-tested endpoint or shared script without importing the rest of a base project.

To selectively import components, open the project actions menu and click Import From Project. The import takes place in two steps:

  1. Import options: Choose between uploading a local project JSON file or selecting an existing project in the same environment as the target project.

  2. Choose components: Browse components by category and select the ones to import. By default, Autoselect dependencies is enabled, which automatically includes all required dependencies of a selected component.

    If an imported component shares a name with an existing component of the same type, the conflict must be resolved before the import can complete. For endpoints, you can use an existing endpoint or create a new one. For other components, you can replace the existing component or keep both (the imported component is renamed with a numeric suffix).

    Imported components are grouped in a custom folder labeled Imported with the date and time of the import.

For full details, see Selective import in Export and import a project.