Pipeline Scripts & XML

Type execute(args) from input and output annotations, complete pipeline XML references, and connect scripts to the visual editor

Pipeline support connects three surfaces: the pipeline's XML, the script it calls, and the visual Pipeline Editor. The scripting engine supplies completion and navigation in XML resource references and types the script dictionary from its annotations.

Describe the script dictionary

Put @input and @output declarations in the script's first block comment, then use a named execute function with a dictionary parameter:

cartridge/scripts/product/BuildLabel.ds
/**
 * Build the label passed to the next pipeline node.
 * @input Product : dw.catalog.Product Product to display.
 * @output Label : String Display label.
 */
function execute(args) {
    args.Label = args.Product.name || args.Product.ID;
    return PIPELET_NEXT;
}

The server recognizes Product and Label as dictionary members. Completion after args. can show the inputs and outputs; member access on args.Product uses the declared SFCC type. Hover and signature information use the same generated view of the function.

The annotations describe the contract. They do not populate the input value at runtime: the pipeline must bind its dictionary values to the script inputs and outputs.

Annotation syntax matters

Use one @input Name : Type or @output Name : Type per comment line. The parser recognizes simple and dotted type names such as String and dw.catalog.Product; this annotation format is not a general TypeScript union or generic-type parser. Keep the declarations in the first block comment and the entry point in the function execute(args) form.

Complete references in pipeline XML

These contexts are supported in recognized pipeline XML files:

XML contextCompletionGo to Definition
call-node / jump-nodestart-name-refIndexed pipeline endpoint namesThe pipeline entry point
config-property with key="ScriptFile"valueScript resource paths, including cartridge-qualified pathsThe script file
Static templatenameIndexed template pathsThe ISML template
pipelinetypeview and process
pipelinegroupKnown pipeline groups

These are fragments from a pipeline, not a complete executable pipeline document:

pipeline.xml
<call-node start-name-ref="Product-Show" />
<config-property key="ScriptFile" value="app_custom:product/BuildLabel.ds" />
<template name="product/details" />

Place the caret inside the relevant attribute value and invoke completion. Use Go to Definition to inspect the selected file or endpoint. A template marked dynamic="true" is not treated as a static template reference.

Use the visual editor and debugger

The language server publishes script dictionary information for the extension to consume. The Pipeline Editor provides the graph-editing workflow around the same XML; the debugger provides runtime execution and inspection.

For legacy script imports, use the Digital Script guide. For schema errors in the pipeline document itself, use XML validation.

On this page