LogoLogo
  • 🏃‍♀️ Get started
    • Create your first integration
      • Step 1 - Creating your Source & Destination System keys
        • Shopify Key
        • FTP Key
      • Step 2 - Select a Source Function
      • Step 3 - Select a Destination Function
      • Step 4 - Select a Transformation
      • Step 5 - Put it all together to create a Stream
      • Step 6 - Run your stream
    • Go-live best practice
  • 🏄🏻‍♀️ Integration Tutorials
    • Shopify with Descartes Peoplevox
    • Shopify with FTP
      • Shopify with FTP
      • Shopify with FTP (Part 2)
    • Shopify with ReBOUND
    • WooCommerce
      • WooCommerce with FTP
    • NetSuite
  • 🏗️ Creating streams
    • Intro
    • Streams
      • Web hook installation
      • Web hook support
        • DEAR Systems
        • Descartes Peoplevox
        • Shopify
    • Systems
      • System library
        • DEAR Systems
        • Email
        • FTP
        • Descartes Peoplevox
        • Magento 1.x
        • Magento 2.x
        • ParcelLab
        • ReBOUND
        • Shopify
        • WooCommerce
    • Keys
      • Key library
        • Shopify private apps
        • Netsuite
        • FTP and sFTP
        • oAuth
    • Sources
    • Transformations
      • Public Transformations
      • Private Transformations
      • Customising a Public Transformation
      • Write a custom transformation
        • Transformation Library
        • Example 1 - Sales Order
        • Example 2 - Shipment
    • Destinations
      • Aggregated Events
    • Data uploads
    • Lookup table
  • 🔧 Editing streams
    • Updating source and destinations
    • Deleting a stream
  • 🎛️ Monitoring streams
    • Job Statuses
    • Event Statuses
    • Resending data
      • Replicate Job
      • Replicate Event
      • Replicate Event without Event in Control Panel
    • Reporting
      • Jobs
      • Events
      • Entities
    • Alerts
  • ⚙️ Administration
    • Login and security
      • Two factor authentication (2FA) setup
        • Signup to HighCohesion without QR scan
    • Creating an organisation
    • Billing Information
    • Creating a user
    • Roles & Permissions
  • 💁🏽 Help and support
    • Glossary of platform terminology
    • Security standards
    • Data retention policy
    • Contact us
Powered by GitBook
On this page
  • What is a Transformation?
  • Configure your Transformation

Was this helpful?

  1. 🏃‍♀️ Get started
  2. Create your first integration

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

For this example, name the transformation "Shopify to FTP Test"

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

For this example, name it "order"

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

For this example we will use the below transformation. This transformation maps the Shopify payload-in JSON to match the XML format of the 3rd Party Logistics Company's FTP requirements

{
    "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
          }
        }
      }
    }
  }
}
PreviousStep 3 - Select a Destination FunctionNextStep 5 - Put it all together to create a Stream

Last updated 4 years ago

Was this helpful?