Skip to main content
Takes a part of the entity data and copies it. This can be useful for example only a shipping address is given but no additional billing address. If a target api requires both the pattern-copy transformer can be used to duplicate the data.

Fields

Pattern

A required field. The path towards the entity data that needs to be copied.

Replacement

A required field. This the output location where the copied data will be added.

Conditions

Only copy the data when a certain condition is met. For example when a box is checked that billing and shipping are to the same address.

Sample data

  • Pattern: product.name
  • Replacement: product_name
Input:
{
    “product”: {
        “name”: “example”
    } 
} 
Output:
{ 
    “product”: { 
        “name”: “example”
    }, 
    “product_name”: “example” 
} 

  • Pattern: products.*.name
  • Replacement: product_names.$1
Input:
{ 
    “products”: [ 
        { 
            “name”: ”example” 
        }, 
        { 
            “name”: ”example2” 
        } 
    ]
} 
Output:
{  
    “products”: [ 
        {“name”:”example”}, 
        {“name”:”example2”} 
    ], 
    “product_names”: [ 
        “example”, 
        “example2” 
    ]
}