For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Open sourceSupportFAQsDocs Home
DocumentationAPI referenceRelease notes
DocumentationAPI referenceRelease notes
  • Platform On-Prem
    • Overview
    • Navigate
    • Search resources
  • Apps
      • Overview
      • Navigate
        • Configure and manage tasks
        • Null vs. undefined values
        • Parallel branches
          • Overview
          • addDuration
          • arrayIncludes
          • arrayLastIndexOf
          • arrayPop
          • arrayToString
          • assign
          • calculateTimeDiff
          • charAt
          • charCodeAt
          • childjob
          • codePointAt
          • concat
          • concatArray
          • convertEpochToObject
          • convertTimeFormat
          • convertTimeToEpoch
          • convertTimezone
          • copyWithin
          • csvStringToJSON
          • deepmerge
          • delay
          • endsWith
          • ErrorHandling
          • evaluation
          • eventListenerJob
          • excelToJson
          • extractField
          • fill
          • FlattenJSONFormInput
          • getTime
          • includes
          • arrayIndexOf
          • indexOf
          • isArray
          • join
          • keys
          • lastIndexOf
          • length
          • length (string)
          • localeCompare
          • makeData
          • map
          • match
          • merge
          • modify
          • newVariable
          • normalize
          • objectHasOwnProperty
          • objectToString
          • padEnd
          • padStart
          • parse
          • parseInt
          • pop
          • push
          • pushToArray
          • query
          • repeat
          • restCall
          • reverse
          • runCode
          • search
          • setObjectKey
          • shift
          • slice (array)
          • slice (string)
          • sort
          • split
          • startsWith
          • stringValueOf
          • stub
          • substring
          • toLocaleLowerCase
          • toLocaleString
          • toLocaleUpperCase
          • toLowerCase
          • numberToString
          • toString (array)
          • toString (number)
          • toString (object)
          • toUpperCase
          • transformation
          • trim
          • trimEnd
          • trimStart
          • unshift
          • updateJobDescription
          • values
          • viewData
    • FlowAI
    • Itential Automation Gateway
  • Resources
    • Itential Academy
    • Version lifecycle
    • Itential MCP
    • Accessibility conformance
    • Get support
    • FAQs
LogoLogo
Open sourceSupportFAQsDocs Home
On this page
  • Properties
  • Control buttons
  • Examples
  • Merge three flat objects
  • Merge deeply nested objects
  • Conflicting key — scalar value
  • Conflicting key — array value
  • Non-conflicting key — array value
AppsStudioTasksTask reference

deepmerge

Was this page helpful?
Previous

delay

Next
Built with

The deepmerge task folds two or more objects together to create a single object. When a conflict occurs, the value from the last merged object takes precedence. The task allows combining objects — for example, parts of a service instance into an object representing a whole service instance — and can create new data structures to match an existing task’s parameters, enabling reuse of existing tasks without new programming.

A deepmerge task can combine data from job variables, static data, and tasks’ outgoing variables. This task only operates on objects — it does not operate on numbers, booleans, strings, or arrays.

When merge conflicts occur, the conflicting key’s value in the last merged object is used. The deepmerge task merges elements at any depth.

Properties

PropertyDescription
KeyNot used and will be ignored.
Task (required)Specify where to find a variable to merge. You can merge data stored in job variables, a static value, or an earlier task’s outgoing variable.
Variable (required)Specify 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.
Add/Remove/ReorderAdd, remove, and reorder the merged data.

Control buttons

ControlFunction
Add row (+)Add a row below the relevant row.
Delete row (−)Remove a row.
Move row up (↑)Move a row up one position.
Move row down (↓)Move a row down one position.

Examples

Merge three flat objects

Object 1

1{ "customer": "Wet Paint" }

Object 2

1{ "service": "L3VPN" }

Object 3

1{ "active": true }

Result

1{
2 "customer": "Wet Paint",
3 "service": "L3VPN",
4 "active": true
5}

Merge deeply nested objects

Object 1

1{
2 "fruit": {
3 "apple": {
4 "shape": {
5 "round": {
6 "red": { "flavor": "sweet" }
7 }
8 }
9 }
10 }
11}

Object 2

1{
2 "fruit": {
3 "apple": {
4 "shape": {
5 "round": {
6 "red": { "ripe": false }
7 }
8 }
9 }
10 }
11}

Object 3

1{
2 "fruit": {
3 "apple": {
4 "shape": {
5 "round": {
6 "red": { "quantity": 32 }
7 }
8 }
9 }
10 }
11}

Result

1{
2 "fruit": {
3 "apple": {
4 "shape": {
5 "round": {
6 "red": {
7 "flavor": "sweet",
8 "ripe": false,
9 "quantity": 32
10 }
11 }
12 }
13 }
14 }
15}

Conflicting key — scalar value

When the same key exists in both objects with different scalar values, the last object’s value wins.

Object 1

1{ "fruit": "apple" }

Object 2

1{ "fruit": 20 }

Result

1{ "fruit": 20 }

Conflicting key — array value

When the same key exists in both objects with array values, the last object’s array replaces the first.

Object 1

1{
2 "fruit": [{ "name": "apple" }]
3}

Object 2

1{
2 "fruit": [{ "name": "orange" }]
3}

Result

1{
2 "fruit": [{ "name": "orange" }]
3}

Non-conflicting key — array value

When the same key exists in both objects but the array items have different keys, the items are merged.

Object 1

1{
2 "quantity": [{ "name": "apple" }]
3}

Object 2

1{
2 "quantity": [{ "color": "red" }]
3}

Result

1{
2 "quantity": [{ "name": "apple", "color": "red" }]
3}