Skip to main content
Skip table of contents

Group by Playbook Instance

LAST UPDATED: JUNE 18, 2025

When configured with "groupBy": "Playbook Instance", the Merge task consolidates all arriving upstream execution lineages into a single merged result. Each completed upstream lineage reaching the Merge task contributes one execution-lineage object.

Unlike grouping by "Path" and grouping by "Task Instance", a Merge task that groups by "Playbook Instance" will only have one execution instance with a Raw Data tab containing the merge result array.

Merge Condition Format

To enable grouping by playbook instance, configure the Merge task’s condition as:

JSON
{
  "groupBy": "Playbook Instance"
}

Core Concepts

The examples below demonstrate how variations in task structure, path specification, and output availability influence merge.

Example 1 - Merging Parallel Lineages

OBJECTIVE – Learn that groupBy: "Playbook Instance" aggregates all upstream lineages converging at the Merge task into a single result array.


  1. Build the following playbook:

    image-20250612-172829.png
  2. Use the default merge condition:

    JSON
    {
      "groupBy": "Playbook Instance"
    }
  3. Test run the playbook.

    Frame 1 (31)-20250602-235821.png

  4. Click on the icon within the Merge task.

    Frame 78-20250612-173542.png
  5. Observe the execution results for the Merge task in the Raw Data tab.

    Frame 77-20250612-173303.png

    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "A1": { ... },
        "A2": { ... }
      },
      {
        "DataSource": { ... },
        "B1": { ... },
        "B2": { ... }
      },
      {
        "DataSource": { ... },
        "C1": { ... },
        "C2": { ... }
      }
    ]

TAKEAWAYS

  • Each parallel execution lineage that converges at the Merge task contributes a separate object to the result array in the Merge task’s Raw Data tab.

  • Among multiple executions of the Merge task, only one contains this consolidated result.

Example 2 - Merging Parallel Lineages Involving Unwind Tasks

OBJECTIVE – Understand how both non-repeating task flows and Unwind-driven executions contribute individual execution-lineage objects to the result of a Merge task.


  1. Build the following playbook:

  2. Input the following JSON data for the Unwind B task:

    JSON
    [
      {
        "demoKey1": "value1"
      },
      {
        "demoKey2": "value2"
      }
    ]
    Frame 80-20250612-191453.png
  3. Input the following JSON data for the Unwind C task:

    JSON
    [
      { "demoKey3": "value3" },
      { "demoKey4": "value4" },
      { "demoKey5": "value5" },
      { "demoKey6": "value6" },
      { "demoKey7": "value7" },
      { "demoKey8": "value8" },
      { "demoKey9": "value9" },
      { "demoKey10": "value10" },
      { "demoKey11": "value11" },
      { "demoKey12": "value12" }
    ]
    Frame 81-20250612-191612.png
  4. Use the default merge condition:

    JSON
    {
        "groupBy": "Playbook Instance"
    }
    Frame 79-20250612-190346.png
  5. Test run the playbook.

    Frame 1 (31)-20250602-235821.png

  6. Click on the icon within the Merge task.

  7. Observe the execution results for the Merge task in the Raw Data tab.
    MERGE RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "A1": { ... },
        "A2": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind B": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      },
      {
        "DataSource": { ... },
        "Unwind C": { ... },
        "BC": { ... }
      }
    ]

TAKEAWAY

  • Each completed upstream lineage reaching the Merge task—whether originating from a linear sequence of distinct task nodes or from repeated executions triggered by Unwind-based element deconstruction—results in a distinct execution-lineage object in the merge result.

Example 3 - Merge Tasks in Sequential Levels

OBJECTIVE – Demonstrate how Merge tasks behave when used in sequential levels.


  1. Build the following playbook:

  2. Configure the delay tasks appropriately.

    7c805373-2afd-43c1-8b84-d93946471043.png
  3. Use the default merge condition for all Merge tasks:

    JSON
    {
      "groupBy": "Playbook Instance"
    }
  4. Test run the playbook.

    Frame 1 (31)-20250602-235821.png

  5. Check the merge results.

    Frame 85 (1)-20250613-175112.png

    MERGE ABC RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "B": { ... }
      },
      {
        "DataSource": { ... },
        "C": { ... }
      },
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... }
      }
    ]

    MERGE DEF RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "D": { ... },
        "Delay 6": { ... }
      },
      {
        "DataSource": { ... },
        "F": { ... },
        "Delay 7 Seconds": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 seconds": { ... }
      }
    ]

    MERGE ABCDEF RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... },
        "Merge ABC": {
          ...
          "rawData": [
            {
              "DataSource": { ... },
              "B": { ... }
            },
            {
              "DataSource": { ... },
              "C": { ... }
            },
            {
              "DataSource": { ... },
              "A": { ... },
              "Delay 5 Seconds": { ... }
            }
          ],
          ...
        }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 seconds": { ... },
        "Merge DEF": {
          ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 seconds": { ... }
            }
          ],
          ...
        }
      }
    ]
  6. Re-run the playbook with the following Data Formatter tasks inserted:

    • Format ABC between Merge ABC and Merge ABCDEF

    • Format DEF 1 between Merge DEF and Merge ABCDEF

    • Format DEF 2 between Merge DEF and Merge ABCDEF

      Frame 86-20250613-184859.png
  7. Check the merge results of the Merge ABCDEF task.
    MERGE ABCDEF RESULT

    JSON
    [
      {
        "DataSource": { ... },
        "A": { ... },
        "Delay 5 Seconds": { ... },
        "Merge ABC": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "B": { ... }
            },
            {
              "DataSource": { ... },
              "C": { ... }
            },
            {
              "DataSource": { ... },
              "A": { ... },
              "Delay 5 Seconds": { ... }
            }
          ],
          ...
        },
        "Format ABC": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 seconds": { ... },
        "Merge DEF": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 seconds": { ... }
            }
          ],
          ...
        },
        "Format DEF 1": { ... }
      },
      {
        "DataSource": { ... },
        "E": { ... },
        "Delay 8 seconds": { ... },
        "Merge DEF": {
    	  ...
          "rawData": [
            {
              "DataSource": { ... },
              "D": { ... },
              "Delay 6": { ... }
            },
            {
              "DataSource": { ... },
              "F": { ... },
              "Delay 7 Seconds": { ... }
            },
            {
              "DataSource": { ... },
              "E": { ... },
              "Delay 8 seconds": { ... }
            }
          ],
          ...
        },
        "Format DEF 2": { ... }
      }
    ]

TAKEAWAYS

  • In subsequent merges (e.g., Merge ABCDEF), only the last-arriving lineage from each prior merge is included as a top-level object in the merged result.

  • The number of execution lineage objects in any merge result is equal to the number of inbound connectors feeding that Merge task.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.