Skip to main content

Merged Variables

Merged variables combine values from multiple existing variables into a single variable. This is useful when the same type of data (e.g., user IDs) comes from multiple list endpoints and you want to iterate over all of them together.

What Are Merged Variables?

A merged variable:

  • Takes two or more existing variables as sources
  • Combines their values into a single unified set
  • Can be applied to endpoint parameters like any other variable
  • Deduplicates values automatically

Creating a Merged Variable

  1. Open the Variables Panel
  2. Click the merge button (or select "Create Merged Variable")
  3. Select the variables to merge using checkboxes
    • At least 2 variables must be selected
    • Merged variables cannot contain other merged variables (prevents circular references)
  4. Enter a name for the merged variable
  5. Choose the default mode (iterate or first)
  6. Review the combined preview

Combined Preview

The creation dialog shows:

  • Unique values: Deduplicated count across all sources
  • Total values: Sum of all values including duplicates
  • Source breakdown: How many values each source contributes

Modes

Iterate (All Values)

All unique values from all source variables are used for iteration:

Variable A values: [id1, id2, id3]
Variable B values: [id3, id4, id5]

Merged (iterate): [id1, id2, id3, id4, id5] (5 unique)

First (First Only)

Only the first value from the combined set is used:

Variable A values: [id1, id2, id3]
Variable B values: [id4, id5]

Merged (first): [id1]

Use Cases

Aggregating IDs from Multiple Endpoints

When different list endpoints return the same type of resource:

GET /active-users → Variable: ActiveUserIds [u1, u2, u3]
GET /suspended-users → Variable: SuspendedUserIds [u4, u5]

Merged: AllUserIds [u1, u2, u3, u4, u5]

Apply to: GET /users/{userId}/audit-log
Runs 5 times (once per unique user ID)

Combining Filtered and Unfiltered Data

Merge a filtered variable with an unfiltered one when you need specific items plus a broader set:

Variable: PageBlocks (filtered: type = 'page')  → [b1, b2]
Variable: DatabaseBlocks (filtered: type = 'database') → [b3]

Merged: AllRelevantBlocks → [b1, b2, b3]

Editing Merged Variables

Click Edit on a merged variable to:

  • Add or remove source variables
  • Change the variable name
  • Change the default mode

Changes take effect immediately for all endpoints using this variable.

Troubleshooting

"Can't select a variable for merging"

  • Merged variables cannot be used as sources for other merged variables
  • The variable may not have any extracted values (test its source endpoint first)

"Merged variable has fewer values than expected"

  • Duplicate values are automatically removed
  • Check if source variables share common values

"Values not updating after source variable changes"

  • Merged variables reflect their sources at test time
  • Re-run the dependent endpoint test to see updated merged values