Based on our default integration modules, you can extend the feed params with a custom JS. This will still use the benefits of saving the platform, but still allowing to customize the configuration.
Choose your ecommerce store platform and then add your custom settings. We support overwriting the following values. Please provide a valid JSON structure.
Advanced configuration
- delimiter (default ,) – delimiter of values in a CSV feed type.
- update_categories – set this value as true when you want to update categories from the feed. Note that will happen only once, then you need to send it again as true.
- quote (default “) – if fields are quoted by a specific character
- encoding (default UTF-8) – encoding of the file
- currencyGroup – (default ,) – grouping separator for a locale, used for thousands inside a price value 1,543.55
- currencyDec – (default .) – decimals separator inside a price value 123.12
- categoryFields (keys from this object will be added or overwrite existing)
- categoryProcess (elements from this list will be added after existing)
- productFields (keys from this object will be added or overwrite existing)
- productProcess (elements from this list will be added after existing)
New Attribute Details
For each element you add you can have the following:
- field: CSV column to match
- type: final data type (after processing) integer, float, string, boolean
- csv_type: type of data in the file (before processing) integer, float, string, boolean
- default: value if it’s missing
- mandatory: when true and there is no value we skip the item.
Important:
- adding a new field of a specific type can not be modified afterwards.
- if you set a wrong type you will need to change the attribute name
Example 1
{ "delimiter": "#", "currencyDec": ",", "categoryFields": { "url": { "field": "CategoryURL", "type": "string", "mandatory": false } }, "productProcess": [ { "url": [ { "replace": [ "__category__.url", "http", "https" ] } ] } ] }
Example 2
Adding a new attribute to products and replacing spaces.
{
"productFields": {
"new_attribute": {
"field": "CSV_New_Attribute",
"type": "string",
"mandatory": false
}
},
"productProcess": [
{
"new_attribute": [
{
"space_replace": [
"__product__.new_attribute"
]
}
]
}
]
}
Process methods
The following process methods can be used in the process section. The rule for process steps are:
- key is represented by product attribute
- value is a list of steps for the below methods
- each method is an object with key and params that are passed to the method
- you can reference existing product using __product__ or category with __category__
Available methods:
- split
- slice
- [“__product__.description”, 0, 150]
- min
- max
- sum
- multiply
- float
- int
- str
- eq
- neq
- if: works in combination with other methods, sent at first param.
- [{“eq”:[“__product__.stock”, “In stock”]}, 1, 0]
- and
- or
- delete
- replace
- replace_regex
- map
- title
- lower
- join
- unique
- assign
- copy
- filter
- strip
- pick
- url_decode
- space_replace
- html_decode
- length
- zip
- list
- append
- add
- mul
- sub
- div
- round
- extend
- contains
- encode
- decode