Skip to main content

Helper actions

Helper actions are lightweight utility actions for connecting, transforming, and manipulating data between the larger actions in your flows. Use them to tasks such as parsing file paths, encoding URLs, extracting values from JSON objects, and building new data structures.

Helper actions do not consume Amplience Credits.

Tip

These action descriptions cover the most commonly used inputs and outputs. When designing flows, you may also notice additional input and output variables.

Set Custom Attributes
Link copied!

Allows you to add custom attributes for improved filtering and searching of review output.

Inputs: String

Outputs: None

How to use: Specify key-value attribute pairs in your flows - up to a maximum of 10 pairs per flow.

This example shows the Set Custom Attributes action being used to configure Image Type and SKU as custom filters. Once set, these filters appear automatically in the Flows Reviews list.

Workforce Flows editor showing a flow with the Set Custom Attributes action

Tip

The attribute Name is case-sensitive, so use consistent capitalization to avoid duplicate filters.

The Variable is determined by what you want to create filters for, and must be a string value. In this example, the Custom Agent output defines the imageType property values that will be used for filtering reviews:

Workforce Flows editor showing output of the Custom Agent action

This would show as an additional filter in the Reviews list filters:

Workforce Flow reviews list showing custom filters

Split File Name
Link copied!

Splits a file path into its parts: directory path, base name, and extension.

Inputs

InputTypeRequiredDescription
File PathstringYesThe file path or filename to extract parts from (e.g. documents/product-1.jpg)

Outputs

OutputTypeDescription
Base NamestringThe name of the file without its extension
ExtensionstringThe file extension (e.g. .pdf)
Directory PathstringThe directory path leading to the file (empty if none)

Featured in these example flows

Convert from JSON
Link copied!

Converts a JSON string into structured data (objects, arrays, numbers, or text) you can use in your flow.

Inputs

InputTypeRequiredDescription
JSON StringstringYesThe JSON text to decode (e.g. {"sku": "123456"})

Outputs

OutputTypeDescription
JSON ObjectanyThe result of decoding the JSON string. This may be an object, array, number, string, or boolean, depending on the input

Convert to JSON String
Link copied!

Transforms JSON data into a JSON string representation.

Inputs

InputTypeRequiredDescription
ObjectanyNoThe object to encode (e.g. { product: "shirt" })

Outputs

OutputTypeDescription
JSON StringstringThe result of transforming the object into a JSON string

Featured in these example flows

Get Values from JSON
Link copied!

Extracts specific fields or values from data using JSONPath expressions.

Configuration
Link copied!

Before using this action, define the values you want to extract. For each value, provide a name and a JSONPath expression that identifies the field to extract from the input data. Each configured value appears as a separate output on the action.

Inputs

InputTypeRequiredDescription
Values to ExtractanyNoThe data object or array to extract values from

Outputs

The output fields for this action are determined by the values you define in the action configuration. Each configured value appears as a separate output field using the name you provided.

Featured in these example flows

Build JSON object
Link copied!

Builds a JSON object from a set of properties you define when configuring the action.

Configuration
Link copied!

Before using this action, define the properties you want to include in the output object. Each property you add becomes an input field on the action, allowing you to populate it with a value or a variable from an earlier action in the flow.

Inputs

The input fields for this action are determined by the properties you define in the action configuration. Each configured property appears as a separate input field.

Outputs

OutputTypeDescription
JSON ObjectobjectA JSON object containing the properties and values provided as inputs

Encode URL
Link copied!

Encodes a string into a URL-safe format.

Inputs

InputTypeRequiredDescription
URLstringYesThe URL to encode

Outputs

OutputTypeDescription
Encoded URLstringThe result of encoding the URL

Decode URL
Link copied!

Decodes a URL-encoded string into plain text.

Inputs

InputTypeRequiredDescription
URLstringYesThe URL-encoded string to decode

Outputs

OutputTypeDescription
Decoded URLstringThe result of decoding the URL

Get Item from List
Link copied!

Identifies and extracts the value for the first, last, or nth item in a list.

Inputs

InputTypeRequiredDescription
ListarrayYesThe list of items to choose from
How to select the ItemstringYesWhether to return the first item, the last item, or an item at a specific position. Accepted values: first (default), last, index
PositionnumberNoThe position of the item to extract, starting at 0. Only required when How to select the Item is set to index

Outputs

OutputTypeDescription
ItemanyThe item found at the requested location

Adding actions to flows

Inputs, outputs and ports

Input field variables