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 AttributesLink 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.
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:
This would show as an additional filter in the Reviews list filters:
Split File NameLink copied!
Splits a file path into its parts: directory path, base name, and extension.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
File Path | string | Yes | The file path or filename to extract parts from (e.g. documents/product-1.jpg) |
Outputs
| Output | Type | Description |
|---|---|---|
Base Name | string | The name of the file without its extension |
Extension | string | The file extension (e.g. .pdf) |
Directory Path | string | The directory path leading to the file (empty if none) |
Featured in these example flows
Convert from JSONLink copied!
Converts a JSON string into structured data (objects, arrays, numbers, or text) you can use in your flow.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
JSON String | string | Yes | The JSON text to decode (e.g. {"sku": "123456"}) |
Outputs
| Output | Type | Description |
|---|---|---|
JSON Object | any | The result of decoding the JSON string. This may be an object, array, number, string, or boolean, depending on the input |
Convert to JSON StringLink copied!
Transforms JSON data into a JSON string representation.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
Object | any | No | The object to encode (e.g. { product: "shirt" }) |
Outputs
| Output | Type | Description |
|---|---|---|
JSON String | string | The result of transforming the object into a JSON string |
Featured in these example flows
Get Values from JSONLink copied!
Extracts specific fields or values from data using JSONPath expressions.
ConfigurationLink 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
| Input | Type | Required | Description |
|---|---|---|---|
Values to Extract | any | No | The 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 objectLink copied!
Builds a JSON object from a set of properties you define when configuring the action.
ConfigurationLink 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
| Output | Type | Description |
|---|---|---|
JSON Object | object | A JSON object containing the properties and values provided as inputs |
Encode URLLink copied!
Encodes a string into a URL-safe format.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
URL | string | Yes | The URL to encode |
Outputs
| Output | Type | Description |
|---|---|---|
Encoded URL | string | The result of encoding the URL |
Decode URLLink copied!
Decodes a URL-encoded string into plain text.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
URL | string | Yes | The URL-encoded string to decode |
Outputs
| Output | Type | Description |
|---|---|---|
Decoded URL | string | The result of decoding the URL |
Get Item from ListLink copied!
Identifies and extracts the value for the first, last, or nth item in a list.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
List | array | Yes | The list of items to choose from |
How to select the Item | string | Yes | Whether to return the first item, the last item, or an item at a specific position. Accepted values: first (default), last, index |
Position | number | No | The position of the item to extract, starting at 0. Only required when How to select the Item is set to index |
Outputs
| Output | Type | Description |
|---|---|---|
Item | any | The item found at the requested location |