Fluent Commerce Logo
Docs
Sign In

commercetools prerequisites

Essential knowledge

Author:

Fluent Commerce

Changed on:

31 Jan 2024

Overview

commercetools connector enables the syncing between commercetools and the Fluent commerce system. There are specific settings that need to be configured in the commercetools system i.e.: custom fields, channels, etc.

Key points

  • The commercetools connector allows seamless integration between commercetools and Fluent. 
  • The connector requires a set of custom fields and channels on commercetools. This article covers all the settings that need to be added to commercetools.

Custom fields will be required for the following areas:

  • Order
  • Order Line Item
  • Delivery
  • Channels

Order

  • Group key name: Fluent Custom Field
  • Field name: Pickup Location Ref
No alt provided

Order Line Item

  • Group key name : Fluent Fulfilment Metadata
  • Field name : Fulfilment Metadata

Delivery

  • Group key name : Fluent Consignment
  • Field name : Fluent Consignment Ref
  • Fluent Consignment Status

Order Parcel

  • Group key name : Fluent Article
  • Field name : Fluent Tracking Url

Channels

  • Group key name: Fluent Store Details
  • Fields name:
  • Type
  • Status
  • Email
  • Phone No.
  • Latitude
  • Longitude
  • Timezone
  • Opening Schedule
  • Attributes

commercetools Custom field collection

1    {
2    "info": {
3    "_postman_id": "a194556c-159f-4810-80a0-84776857dbae",
4    "name": "CT Custom Fields",
5    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
6    "_exporter_id": "21544403"
7    },
8    "item": [
9    {
10    "name": "Create  Order custom field",
11    "event": [
12    {
13    "listen": "test",
14    "script": {
15    "exec": [
16    "tests[\"Status code \" + responseCode.code] = responseCode.code === 200 || responseCode.code === 201;",
17    "var data = JSON.parse(responseBody);",
18    "if(data.results && data.results[0] && data.results[0].id && data.results[0].version){",
19    "    pm.environment.set(\"type-id\", data.results[0].id); ",
20    "    pm.environment.set(\"type-version\", data.results[0].version);",
21    "}",
22    "if(data.results && data.results[0] && data.results[0].key){",
23    "    pm.environment.set(\"type-key\", data.results[0].key); ",
24    "}",
25    "if(data.version){",
26    "    pm.environment.set(\"type-version\", data.version);",
27    "}",
28    "if(data.id){",
29    "    pm.environment.set(\"type-id\", data.id); ",
30    "}",
31    "if(data.key){",
32    "    pm.environment.set(\"type-key\", data.key);",
33    "}",
34    ""
35    ],
36    "type": "text/javascript"
37    }
38    }
39    ],
40    "request": {
41    "auth": {
42    "type": "oauth2",
43    "oauth2": [
44    {
45    "key": "accessToken",
46    "value": "{{ctp_access_token}}",
47    "type": "string"
48    },
49    {
50    "key": "addTokenTo",
51    "value": "header",
52    "type": "string"
53    },
54    {
55    "key": "tokenType",
56    "value": "Bearer",
57    "type": "string"
58    }
59    ]
60    },
61    "method": "POST",
62    "header": [
63    {
64    "key": "Content-Type",
65    "value": "application/json"
66    }
67    ],
68    "body": {
69    "mode": "raw",
70    "raw": "{\n  \"key\" : \"flOrderCustomField\",\n  \"name\" : {\n    \"en\" : \"Fluent Custom Field\"\n  },\n  \"description\" : {\n    \"en\" : \"Fluent Custom Field\"\n  },\n  \"resourceTypeIds\" : [ \"order\" ],\n  \"fieldDefinitions\" : [ {\n    \"name\" : \"flPickupLocationRef\",\n    \"label\" : {\n      \"en\" : \"Pickup Location Ref\"\n    },\n    \"required\" : false,\n    \"type\" : {\n      \"name\" : \"String\"\n    },\n    \"inputHint\" : \"SingleLine\"\n  } ]\n}"
71    },
72    "url": {
73    "raw": "{{host}}/{{project-key}}/types",
74    "host": [
75    "{{host}}"
76    ],
77    "path": [
78    "{{project-key}}",
79    "types"
80    ],
81    "query": [
82    {
83    "key": "expand",
84    "value": "",
85    "disabled": true
86    }
87    ]
88    }
89    },
90    "response": []
91    },
92    {
93    "name": "Create Lineitems custom fields",
94    "event": [
95    {
96    "listen": "test",
97    "script": {
98    "exec": [
99    "tests[\"Status code \" + responseCode.code] = responseCode.code === 200 || responseCode.code === 201;",
100    "var data = JSON.parse(responseBody);",
101    "if(data.results && data.results[0] && data.results[0].id && data.results[0].version){",
102    "    pm.environment.set(\"type-id\", data.results[0].id); ",
103    "    pm.environment.set(\"type-version\", data.results[0].version);",
104    "}",
105    "if(data.results && data.results[0] && data.results[0].key){",
106    "    pm.environment.set(\"type-key\", data.results[0].key); ",
107    "}",
108    "if(data.version){",
109    "    pm.environment.set(\"type-version\", data.version);",
110    "}",
111    "if(data.id){",
112    "    pm.environment.set(\"type-id\", data.id); ",
113    "}",
114    "if(data.key){",
115    "    pm.environment.set(\"type-key\", data.key);",
116    "}",
117    ""
118    ],
119    "type": "text/javascript"
120    }
121    }
122    ],
123    "request": {
124    "auth": {
125    "type": "oauth2",
126    "oauth2": [
127    {
128    "key": "accessToken",
129    "value": "{{ctp_access_token}}",
130    "type": "string"
131    },
132    {
133    "key": "addTokenTo",
134    "value": "header",
135    "type": "string"
136    },
137    {
138    "key": "tokenType",
139    "value": "Bearer",
140    "type": "string"
141    }
142    ]
143    },
144    "method": "POST",
145    "header": [
146    {
147    "key": "Content-Type",
148    "value": "application/json"
149    }
150    ],
151    "body": {
152    "mode": "raw",
153    "raw": "{\n  \"key\" : \"flFulfilment\",\n  \"name\" : {\n    \"en\" : \"Fluent Fulfilment Metadata\"\n  },\n  \"description\" : {\n    \"en\" : \"Fluent Fulfilment Metadata\"\n  },\n  \"resourceTypeIds\" : [ \"line-item\" ],\n  \"fieldDefinitions\" : [ {\n    \"name\" : \"flFulfilmentMetadata\",\n    \"label\" : {\n      \"en\" : \"Fulfilment Metadata\"\n    },\n    \"required\" : false,\n    \"type\" : {\n      \"name\" : \"String\"\n    },\n    \"inputHint\" : \"SingleLine\"\n  } ]\n}"
154    },
155    "url": {
156    "raw": "{{host}}/{{project-key}}/types",
157    "host": [
158    "{{host}}"
159    ],
160    "path": [
161    "{{project-key}}",
162    "types"
163    ],
164    "query": [
165    {
166    "key": "expand",
167    "value": "",
168    "disabled": true
169    }
170    ]
171    }
172    },
173    "response": []
174    },
175    {
176    "name": "Create Delivery custom fields",
177    "event": [
178    {
179    "listen": "test",
180    "script": {
181    "exec": [
182    "tests[\"Status code \" + responseCode.code] = responseCode.code === 200 || responseCode.code === 201;",
183    "var data = JSON.parse(responseBody);",
184    "if(data.results && data.results[0] && data.results[0].id && data.results[0].version){",
185    "    pm.environment.set(\"type-id\", data.results[0].id); ",
186    "    pm.environment.set(\"type-version\", data.results[0].version);",
187    "}",
188    "if(data.results && data.results[0] && data.results[0].key){",
189    "    pm.environment.set(\"type-key\", data.results[0].key); ",
190    "}",
191    "if(data.version){",
192    "    pm.environment.set(\"type-version\", data.version);",
193    "}",
194    "if(data.id){",
195    "    pm.environment.set(\"type-id\", data.id); ",
196    "}",
197    "if(data.key){",
198    "    pm.environment.set(\"type-key\", data.key);",
199    "}",
200    ""
201    ],
202    "type": "text/javascript"
203    }
204    }
205    ],
206    "request": {
207    "auth": {
208    "type": "oauth2",
209    "oauth2": [
210    {
211    "key": "accessToken",
212    "value": "{{ctp_access_token}}",
213    "type": "string"
214    },
215    {
216    "key": "addTokenTo",
217    "value": "header",
218    "type": "string"
219    },
220    {
221    "key": "tokenType",
222    "value": "Bearer",
223    "type": "string"
224    }
225    ]
226    },
227    "method": "POST",
228    "header": [
229    {
230    "key": "Content-Type",
231    "value": "application/json"
232    }
233    ],
234    "body": {
235    "mode": "raw",
236    "raw": "{\n    \"key\": \"flConsignment\",\n            \"name\": {\n                \"en\": \"Fluent Consignment\"\n            },\n            \"description\": {\n                \"en\": \"Fluent Consignment\"\n            },\n            \"resourceTypeIds\": [\n                \"order-delivery\"\n            ],\n            \"fieldDefinitions\": [\n                {\n                    \"name\": \"flConsignmentRef\",\n                    \"label\": {\n                        \"en\": \"Fluent Consignment Ref\"\n                    },\n                    \"required\": false,\n                    \"type\": {\n                        \"name\": \"String\"\n                    },\n                    \"inputHint\": \"SingleLine\"\n                },\n                {\n                    \"name\": \"flConsignmentStatus\",\n                    \"label\": {\n                        \"en\": \"Fluent Consignment Status\"\n                    },\n                    \"required\": false,\n                    \"type\": {\n                        \"name\": \"String\"\n                    },\n                    \"inputHint\": \"SingleLine\"\n                }\n            ]\n        }"
237    },
238    "url": {
239    "raw": "{{host}}/{{project-key}}/types",
240    "host": [
241    "{{host}}"
242    ],
243    "path": [
244    "{{project-key}}",
245    "types"
246    ],
247    "query": [
248    {
249    "key": "expand",
250    "value": "",
251    "disabled": true
252    }
253    ]
254    }
255    },
256    "response": []
257    },
258    {
259    "name": "Create Parcel custom fields",
260    "event": [
261    {
262    "listen": "test",
263    "script": {
264    "exec": [
265    "tests[\"Status code \" + responseCode.code] = responseCode.code === 200 || responseCode.code === 201;",
266    "var data = JSON.parse(responseBody);",
267    "if(data.results && data.results[0] && data.results[0].id && data.results[0].version){",
268    "    pm.environment.set(\"type-id\", data.results[0].id); ",
269    "    pm.environment.set(\"type-version\", data.results[0].version);",
270    "}",
271    "if(data.results && data.results[0] && data.results[0].key){",
272    "    pm.environment.set(\"type-key\", data.results[0].key); ",
273    "}",
274    "if(data.version){",
275    "    pm.environment.set(\"type-version\", data.version);",
276    "}",
277    "if(data.id){",
278    "    pm.environment.set(\"type-id\", data.id); ",
279    "}",
280    "if(data.key){",
281    "    pm.environment.set(\"type-key\", data.key);",
282    "}",
283    ""
284    ],
285    "type": "text/javascript"
286    }
287    }
288    ],
289    "request": {
290    "auth": {
291    "type": "oauth2",
292    "oauth2": [
293    {
294    "key": "accessToken",
295    "value": "{{ctp_access_token}}",
296    "type": "string"
297    },
298    {
299    "key": "addTokenTo",
300    "value": "header",
301    "type": "string"
302    },
303    {
304    "key": "tokenType",
305    "value": "Bearer",
306    "type": "string"
307    }
308    ]
309    },
310    "method": "POST",
311    "header": [
312    {
313    "key": "Content-Type",
314    "value": "application/json"
315    }
316    ],
317    "body": {
318    "mode": "raw",
319    "raw": "{\n    \"key\": \"fluentarticle\",\n    \"name\": {\n        \"en\": \"Fluent Article\"\n    },\n    \"description\": {\n        \"en\": \"Fluent Article\"\n    },\n    \"resourceTypeIds\": [\n        \"order-parcel\"\n    ],\n    \"fieldDefinitions\": [\n        {\n            \"name\": \"trackingUrl\",\n            \"label\": {\n                \"en\": \"Fluent Tracking Url\"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"SingleLine\"\n        }\n    ]\n}"
320    },
321    "url": {
322    "raw": "{{host}}/{{project-key}}/types",
323    "host": [
324    "{{host}}"
325    ],
326    "path": [
327    "{{project-key}}",
328    "types"
329    ],
330    "query": [
331    {
332    "key": "expand",
333    "value": "",
334    "disabled": true
335    }
336    ]
337    }
338    },
339    "response": []
340    },
341    {
342    "name": "Create  Channel custom fields",
343    "event": [
344    {
345    "listen": "test",
346    "script": {
347    "exec": [
348    "tests[\"Status code \" + responseCode.code] = responseCode.code === 200 || responseCode.code === 201;",
349    "var data = JSON.parse(responseBody);",
350    "if(data.results && data.results[0] && data.results[0].id && data.results[0].version){",
351    "    pm.environment.set(\"type-id\", data.results[0].id); ",
352    "    pm.environment.set(\"type-version\", data.results[0].version);",
353    "    pm.environment.set(\"fluent-channel-id\", data.results[0].id);",
354    "}",
355    "if(data.results && data.results[0] && data.results[0].key){",
356    "    pm.environment.set(\"type-key\", data.results[0].key); ",
357    "}",
358    "if(data.version){",
359    "    pm.environment.set(\"type-version\", data.version);",
360    "}",
361    "if(data.id){",
362    "    pm.environment.set(\"type-id\", data.id); ",
363    "}",
364    "if(data.key){",
365    "    pm.environment.set(\"type-key\", data.key);",
366    "}",
367    ""
368    ],
369    "type": "text/javascript"
370    }
371    }
372    ],
373    "request": {
374    "auth": {
375    "type": "oauth2",
376    "oauth2": [
377    {
378    "key": "accessToken",
379    "value": "{{ctp_access_token}}",
380    "type": "string"
381    },
382    {
383    "key": "addTokenTo",
384    "value": "header",
385    "type": "string"
386    },
387    {
388    "key": "tokenType",
389    "value": "Bearer",
390    "type": "string"
391    }
392    ]
393    },
394    "method": "POST",
395    "header": [
396    {
397    "key": "Content-Type",
398    "value": "application/json"
399    }
400    ],
401    "body": {
402    "mode": "raw",
403    "raw": "{\n  \"key\" : \"flStoredetails\",\n  \"name\" : {\n    \"en\" : \"Fluent Store Details\"\n  },\n  \"description\" : {\n    \"en\" : \"Fluent Store Details\"\n  },\n  \"resourceTypeIds\" : [ \"channel\" ],\n  \"fieldDefinitions\" : [  {\n            \"name\": \"flStoreType\",\n            \"label\": {\n                \"en\": \"Type\"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"SingleLine\"\n        },\n        {\n            \"name\": \"flStoreStatus\",\n            \"label\": {\n                \"en\": \"Status\"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"SingleLine\"\n        },\n        {\n            \"name\": \"flStoreEmail\",\n            \"label\": {\n                \"en\": \"Email\"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"SingleLine\"\n        },\n        {\n            \"name\": \"flStorePhoneNo\",\n            \"label\": {\n                \"en\": \"Phone No.\"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"SingleLine\"\n        },\n        {\n            \"name\": \"flStoreLatitude\",\n            \"label\": {\n                \"en\": \"Latitude\"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"SingleLine\"\n        },\n        {\n            \"name\": \"flStoreLongitude\",\n            \"label\": {\n                \"en\": \"Longitude\"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"SingleLine\"\n        },\n        {\n            \"name\": \"flStoreTimezone\",\n            \"label\": {\n                \"en\": \"Timezone\"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"SingleLine\"\n        },\n        {\n            \"name\": \"flOpeningSchedule\",\n            \"label\": {\n                \"en\": \"Opening Schedule \"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"MultiLine\"\n        },\n        {\n            \"name\": \"flStoreAttributes\",\n            \"label\": {\n                \"en\": \"Attributes \"\n            },\n            \"required\": false,\n            \"type\": {\n                \"name\": \"String\"\n            },\n            \"inputHint\": \"MultiLine\"\n        } ]\n}"
404    },
405    "url": {
406    "raw": "{{host}}/{{project-key}}/types",
407    "host": [
408    "{{host}}"
409    ],
410    "path": [
411    "{{project-key}}",
412    "types"
413    ],
414    "query": [
415    {
416    "key": "expand",
417    "value": "",
418    "disabled": true
419    }
420    ]
421    }
422    },
423    "response": []
424    }
425    ]
426    }    

Language: json

Name: Postman collection

Description:

[Warning: empty required content area]
Fluent Commerce

Fluent Commerce