> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-platform/2023-2/studio/tasks/reference/merge/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # merge > Reference for the merge workflow task, which combines data from job variables, static data, and task outgoing variables into a new variable using no-key or unique-key assignment modes. ## Task purpose The `merge` task combines data from job variables, static data, and the outgoing variables of tasks to create a new variable. By merging data, you can create new data structures to match the existing parameters of a task, allowing you to reuse existing tasks without programming new ones. The `merge` task can combine number, boolean, string, array, and object data types. Two assignment modes are supported: | Mode | Description | | ----------------------------------- | ------------------------------------------------------------------- | | No keys assigned to merged data | Returns an array of the merged values in a non-deterministic order. | | Unique keys assigned to merged data | Returns an object with key/value fields as specified. | The `merge` task does not support merging data with partial key assignments or non-unique keys. ## Properties | Property | Description | | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Key (optional) | A key for each merged value. Supported configurations are either no keys or all unique keys. | | Task (required) | Where to find a variable to merge. You can merge data stored in job variables, a static value, or the outgoing variable of an earlier task. | | Variable | The data to merge. When the data comes from the job or an earlier task, select the variable from the dropdown list. If the data comes from a static value, type the value in the variable edit box. | ## Configure the task The following examples use data returned from three tasks, which return these objects: ```json { "vendor": "Cisco", "platforms": [ "3945", "6500" ], "chassis": [ "fixed", "modular" ] } ``` ```json { "release": "15.5" } ``` ```json { "features": [ "L3VPN", "STP" ] } ``` ### No keys assigned Configure the merge task properties with no keys. ![](/_fern-img/ded620d10c98a7c0bb60bc719cdeb1dcd5068bda15325c87595fc676c4ec9ba5.webp)![](/_fern-img/0ea9df8a8f1cbc6c5489057b9f63d05ff024ab179d7217922cb9d97d0c81b826.webp)![](/_fern-img/7593196c4ceefef03a713e194d62445ba41c7c5efbc111601109143213586b1e.webp) The `merge` task returns an array. The order is **not deterministic**. ![](/_fern-img/6bf3dbd5c5ae4399b82ab9a3da027e2b6983df07d4ca15c9dc8d9c7b993ebe0a.webp) ### Unique keys assigned Configure the merge task properties with unique keys. In addition to the three objects above, this example includes a number, string, boolean, and array. ![](/_fern-img/e6173d3c9978b17c1c3e9e7a85fd9a601cac27a701f980edf77ea284b806cab8.webp)![](/_fern-img/69512b15da26ba82f5b95928cf470bbd30e7a5f60179bc002b247e070aa436f3.webp)![](/_fern-img/d56bd7bba3861a1c7a5ec3341c870232094067091a12bf7046be36fd862a3adf.webp)![](/_fern-img/621edb4ec21174d464c523c262fdfd2e67ea6f2e1acf30c603caba40c62cb2e0.webp) The `merge` task returns this object of specified key/value fields: ```json { "merged_object": { "chassis": { "vendor": "Cisco", "platforms": [ "3945", "6500" ], "chassis": [ "fixed", "modular" ] }, "os-image": { "release": "15.5" }, "services": { "features": [ "L3VPN", "STP" ] }, "number": { "myNumber": 13 }, "string": { "myString": "hello world" }, "boo": { "myBoolean": true }, "arr": { "myArray": [ "apple", "pear" ] } } } ``` ## Related reading * [merge API reference](https://apidocs.itential.com/api/app-workflow_engine/merge/) > Reference for the merge workflow task, which combines data from job variables, static data, and task outgoing variables into a new variable using no-key or unique-key assignment modes.