You can use the File Formatter for JSON & XML files to structure the way to export the data file.


This option is available in Filter/Source Settings > Choose Export Method and choose file type either JSON or XML.


And the File Formatter option will appear.


JSON example:


{ 
"header": { "dateCreated": "{{ "now" | date: "%Y-%m-%d %H:%M:%S" }}" },
"dataHeader": { "encodingTableCode": "E-Shop" },
"data": {
"orders": [{% for item in items %}
{
"delivery": {
"name": "{{ item[1]["Customer Name (Shipping)"] }}",
"streetAndNumber": "{{ item[1]["Shipping Address 1"] }}",
"city": "{{ item[1]["Shipping City"] }}",
"zip": "{{ item[1]["Shipping ZIP"] }}",
"phone1": "{{ item[1]["Shipping Address Phone"] }}"
},
"lineItems": [{% for line in item[1][nil] %}
{
"lineId": "{{ line["Product ID"] }}",
"itemCode": "{{ line["SKU"] }}",
"ean": "{{ line["SKU"] }}",
"quantity": {{ line["Quantity"] | times: 1 }},
"unitOfMeasure": "VNT",
"vatCode": 0,
"unitNetPrice": {{ line["Product Price"] | times: 1}},
"unitPriceVAT": {{ line["Product Price"] | times: 1.23 }},
"vatAmount": {{ line["Product Price"] | times: 0.23 }},
"netAmount": {{ line["Product Price"] | times: 1}}
}{% if forloop.last == false %},{% endif %}
{% endfor %}]
}{% if forloop.last == false %},{% endif %}
{% endfor %}]
}
}


This format will export out the orders in Shopify according to the fields that are mentioned in the format. The fields mentioned must be the Field Name in the data file.



XML example:


<Document>
<Data>
{% for item in items %}
<Order>
<DeliveryPlace>
<Name>{{ item[1]["Customer Name (Shipping)"] }}</Name>
<StreetAndNumber>{{ item[1]["Shipping Address 1"] }}</StreetAndNumber>
<City>{{ item[1]["Shipping City"] }}</City>
<ZIP>{{ item[1]["Shipping ZIP"] }}</ZIP>
<Phone1>{{ item[1]["Shipping Address Phone"] }}</Phone1>
</DeliveryPlace>
<Line>{% for line in item[1][nil] %}
<Line-Item>
<LineId>{{ line["Product ID"] }}</LineId>
<ItemCode>{{ line["SKU"] }}</ItemCode>
<EAN>{{ line["SKU"] }}</EAN>
<Quantity>{{ line["Quantity"] }}</Quantity>
<UnitOfMeasure>VNT</UnitOfMeasure>
<VATCode>0</VATCode>
<UnitNetPrice>{{ line["Product Price"] }}</UnitNetPrice>
<UnitPriceVAT>{{ line["Product Price"] | times: 1.23 }}</UnitPriceVAT>
<VATAmount>{{ line["Product Price"] | times: 0.23 }}</VATAmount>
<NetAmount>{{ line["Product Price"] }}</NetAmount>
</Line-Item>
{% endfor %}</Line>
</Order>
{% endfor %}
</Data>
</Document>


This format will export out the orders in Shopify according to the fields that are mentioned in the format. The fields mentioned must be the Field Name in the data file.