Search…
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
1
{
2
"interfaceDate": {
3
"date": {
4
"*ppk*": "created_at",
5
"*post_format*": [
6
{
7
"current_timestamp": true,
8
"date_format": {
9
"input": "%s",
10
"output": "%Y%m%d"
11
}
12
}
13
]
14
},
15
"time": {
16
"*ppk*": "created_at",
17
"*post_format*": [
18
{
19
"current_timestamp": true,
20
"date_format": {
21
"input": "%s",
22
"output": "%H%M%S"
23
}
24
}
25
]
26
},
27
"GMTOffset": {
28
"*static_value*": "GMT"
29
}
30
},
31
"orders": {
32
"order": {
33
"currency": {
34
"*ppk*": "currency"
35
},
36
"express_delivery": {
37
"*static_value*": 0
38
},
39
"preferred_carrier": {
40
"*static_value*": null
41
},
42
"preferred_carrier_service": {
43
"*static_value*": null
44
},
45
"delivery_instructions": {
46
"*static_value*": null
47
},
48
"gift_message": {
49
"*static_value*": null
50
},
51
"tax_included": {
52
"*ppk*": "taxes_included"
53
},
54
"email": {
55
"*ppk*": "email"
56
},
57
"external_customer_reference": {
58
"*static_value*": null
59
},
60
"spectrum_customer_id": {
61
"*static_value*": null
62
},
63
"order_number": {
64
"*ppk_tracked*": {
65
"*ppk*": "name",
66
"*tracked_field*": [
67
"name"
68
]
69
}
70
},
71
"--source_id": {
72
"*ppk_tracked*": {
73
"*ppk*": "id",
74
"*tracked_field*": [
75
"s_id"
76
]
77
}
78
},
79
"source_code": {
80
"*static_value*": "W111"
81
},
82
"created_at": {
83
"*ppk*": "created_at",
84
"*post_fomrat*": [
85
{
86
"date_format": {
87
"input": "%Y-%m-%dT%H:%M:%S%z",
88
"output": "%s"
89
}
90
}
91
]
92
},
93
"sub_channel": {
94
"*static_value*": "uk-website"
95
},
96
"attributes": {
97
"*static_value*": null
98
},
99
"billing_address": {
100
"external_reference": {
101
"*ppk*": "billing_address.id"
102
},
103
"title": {
104
"*ppk*": "billing_address.title"
105
},
106
"firstname": {
107
"*ppk*": "billing_address.first_name"
108
},
109
"lastname": {
110
"*ppk*": "billing_address.last_name"
111
},
112
"company": {
113
"*ppk*": "billing_address.company"
114
},
115
"street1": {
116
"*ppk*": "billing_address.address1"
117
},
118
"street2": {
119
"*ppk*": "billing_address.address2"
120
},
121
"city": {
122
"*ppk*": "billing_address.city"
123
},
124
"region": {
125
"*ppk*": "billing_address.province"
126
},
127
"postcode": {
128
"*ppk*": "billing_address.zip"
129
},
130
"country_id": {
131
"*ppk*": "billing_address.country_code"
132
},
133
"telephone": {
134
"*ppk*": "billing_address.phone"
135
}
136
},
137
"shipping_address": {
138
"external_reference": {
139
"*ppk*": "shipping_address.id"
140
},
141
"title": {
142
"*ppk*": "shipping_address.title"
143
},
144
"firstname": {
145
"*ppk*": "shipping_address.first_name"
146
},
147
"lastname": {
148
"*ppk*": "shipping_address.last_name"
149
},
150
"company": {
151
"*ppk*": "shipping_address.company"
152
},
153
"street1": {
154
"*ppk*": "shipping_address.address1"
155
},
156
"street2": {
157
"*ppk*": "shipping_address.address2"
158
},
159
"city": {
160
"*ppk*": "shipping_address.city"
161
},
162
"region": {
163
"*ppk*": "shipping_address.province"
164
},
165
"postcode": {
166
"*ppk*": "shipping_address.zip"
167
},
168
"country_id": {
169
"*ppk*": "shipping_address.country_code"
170
},
171
"telephone": {
172
"*ppk*": "shipping_address.phone"
173
}
174
},
175
"shipping_method": {
176
"*static_value*": null
177
},
178
"items": {
179
"*list*": "line_items",
180
"*list_fields*": {
181
"item": {
182
"sku": {
183
"*ppk*": "sku"
184
},
185
"qty": {
186
"*ppk*": "quantity"
187
},
188
"unit_price": {
189
"*ppk*": "price"
190
},
191
"line_total": {
192
"*ppk_math*": [
193
"price",
194
"*",
195
"quantity"
196
]
197
},
198
"tax_total": {
199
"*ppk*": "tax_lines.0.price"
200
}
201
}
202
}
203
},
204
"totals": {
205
"subtotal": {
206
"*ppk*": "total_price"
207
},
208
"shipping_amount": {
209
"*ppk*": "shipping_lines.0.price"
210
},
211
"shipping_tax": {
212
"*ppk*": "shipping_lines.0.tax_lines.0.price"
213
},
214
"gift_wrap_amount": {
215
"*static_value*": null
216
},
217
"gift_wrap_tax": {
218
"*static_value*": null
219
},
220
"tax_amount": {
221
"*ppk*": "total_tax"
222
},
223
"grand_total_net": {
224
"*ppk_math*": [
225
"total_price",
226
"-",
227
"total_tax"
228
]
229
},
230
"grand_total_gross": {
231
"*ppk*": "total_price"
232
}
233
},
234
"payments": {
235
"payment": {
236
"type": {
237
"*static_value*": "CARD"
238
},
239
"amount": {
240
"*ppk*": "total_price"
241
},
242
"token": {
243
"*static_value*": null
244
}
245
}
246
}
247
}
248
}
249
}
Copied!
Last modified 10mo ago