Step 4 - Select a Transformation

What is a Transformation?

The Transformation is responsible for transforming the data of the Source system to match the data of the Destination System

Configure your Transformation

Through the Control Panel you can easily access the page "Transformations" in the left side column. When entering the Transformation page you will see a list of all Public Transformations, as well as your private ones.

If you want to create a Transformation, you can do so by navigating to the Create Transformation button. From the Create Transformation page you should fill in the necessary data.

  • Source - Choose the Source you created in Step 2

  • Destination - Choose the Destination you created in Step 3

  • Title - Name the Transformation here we suggest to clearly explain what the transformation does

  • Primary data type - This field describes what type of data the transformation is transforming (e.g. order, product, inventory etc.)

  • Content - this is were the transformation logic will be stored for undertaking the transformation

{
    "interfaceDate": {
      "date": {
        "*ppk*": "created_at",
        "*post_format*": [
          {
            "current_timestamp": true,
            "date_format": {
              "input": "%s",
              "output": "%Y%m%d"
            }
          }
        ]
      },
      "time": {
        "*ppk*": "created_at",
        "*post_format*": [
          {
            "current_timestamp": true,
            "date_format": {
              "input": "%s",
              "output": "%H%M%S"
            }
          }
        ]
      },
      "GMTOffset": {
        "*static_value*": "GMT"
      }
  },
  "orders": {
    "order": {
      "currency": {
        "*ppk*": "currency"
      },
      "express_delivery": {
        "*static_value*": 0
      },
      "preferred_carrier": {
        "*static_value*": null
      },
      "preferred_carrier_service": {
        "*static_value*": null
      },
      "delivery_instructions": {
        "*static_value*": null
      },
      "gift_message": {
        "*static_value*": null
      },
      "tax_included": {
        "*ppk*": "taxes_included"
      },
      "email": {
        "*ppk*": "email"
      },
      "external_customer_reference": {
        "*static_value*": null
      },
      "spectrum_customer_id": {
        "*static_value*": null
      },
      "order_number": {
        "*ppk_tracked*": {
          "*ppk*": "name",
          "*tracked_field*": [
            "name"
          ]
        }
      },
      "--source_id": {
        "*ppk_tracked*": {
          "*ppk*": "id",
          "*tracked_field*": [
            "s_id"
          ]
        }
      },
      "source_code": {
        "*static_value*": "W111"
      },
      "created_at": {
        "*ppk*": "created_at",
        "*post_fomrat*": [
          {
            "date_format": {
              "input": "%Y-%m-%dT%H:%M:%S%z",
              "output": "%s"
            }
          }
        ]
      },
      "sub_channel": {
        "*static_value*": "uk-website"
      },
      "attributes": {
        "*static_value*": null
      },
      "billing_address": {
        "external_reference": {
          "*ppk*": "billing_address.id"
        },
        "title": {
          "*ppk*": "billing_address.title"
        },
        "firstname": {
          "*ppk*": "billing_address.first_name"
        },
        "lastname": {
          "*ppk*": "billing_address.last_name"
        },
        "company": {
          "*ppk*": "billing_address.company"
        },
        "street1": {
          "*ppk*": "billing_address.address1"
        },
        "street2": {
          "*ppk*": "billing_address.address2"
        },
        "city": {
          "*ppk*": "billing_address.city"
        },
        "region": {
          "*ppk*": "billing_address.province"
        },
        "postcode": {
          "*ppk*": "billing_address.zip"
        },
        "country_id": {
          "*ppk*": "billing_address.country_code"
        },
        "telephone": {
          "*ppk*": "billing_address.phone"
        }
      },
      "shipping_address": {
        "external_reference": {
          "*ppk*": "shipping_address.id"
        },
        "title": {
          "*ppk*": "shipping_address.title"
        },
        "firstname": {
          "*ppk*": "shipping_address.first_name"
        },
        "lastname": {
          "*ppk*": "shipping_address.last_name"
        },
        "company": {
          "*ppk*": "shipping_address.company"
        },
        "street1": {
          "*ppk*": "shipping_address.address1"
        },
        "street2": {
          "*ppk*": "shipping_address.address2"
        },
        "city": {
          "*ppk*": "shipping_address.city"
        },
        "region": {
          "*ppk*": "shipping_address.province"
        },
        "postcode": {
          "*ppk*": "shipping_address.zip"
        },
        "country_id": {
          "*ppk*": "shipping_address.country_code"
        },
        "telephone": {
          "*ppk*": "shipping_address.phone"
        }
      },
      "shipping_method": {
        "*static_value*": null
      },
      "items": {
        "*list*": "line_items",
        "*list_fields*": {
          "item": {
            "sku": {
              "*ppk*": "sku"
            },
            "qty": {
              "*ppk*": "quantity"
            },
            "unit_price": {
              "*ppk*": "price"
            },
            "line_total": {
              "*ppk_math*": [
                "price",
                "*",
                "quantity"
              ]
            },
            "tax_total": {
              "*ppk*": "tax_lines.0.price"
            }
          }
        }
      },
      "totals": {
        "subtotal": {
          "*ppk*": "total_price"
        },
        "shipping_amount": {
          "*ppk*": "shipping_lines.0.price"
        },
        "shipping_tax": {
          "*ppk*": "shipping_lines.0.tax_lines.0.price"
        },
        "gift_wrap_amount": {
          "*static_value*": null
        },
        "gift_wrap_tax": {
          "*static_value*": null
        },
        "tax_amount": {
          "*ppk*": "total_tax"
        },
        "grand_total_net": {
          "*ppk_math*": [
            "total_price",
            "-",
            "total_tax"
          ]
        },
        "grand_total_gross": {
          "*ppk*": "total_price"
        }
      },
      "payments": {
        "payment": {
          "type": {
            "*static_value*": "CARD"
          },
          "amount": {
            "*ppk*": "total_price"
          },
          "token": {
            "*static_value*": null
          }
        }
      }
    }
  }
}

Last updated

Was this helpful?