Custom attributes and metafields¶
If you need more control over your custom attributes and metafields you can achieve this in the tab "Layout".
First run your report without a "Filter key" - like in this example in tab "Selection" there is only "Order / Line items - Custom attributes" selected.
This will show you your keys - like in this example in these columns in the spreadsheet:
Therefore take care to export orders that have data entered for the keys you need.
The keys are appended to the column name - in this example "Line items: Custom attributes" the two keys are highlighted above: "name" and "size".
As you can see - DataChamp will create for each found key a column. If your filtered data doesn't include a key in a report run, the column will be absent in the generated Excel or CSV. And you can not be sure about the order of the columns.
If you need the order in a defined way and if you need a column for sure - even if there is no data in your report run you can use the "Filter key" option and the duplicate option in the tab "Layout".
For the two keys first duplicate the column "Line items: Custom attributes" by clicking on the "duplicate" symbol:
Then insert the key names into the "Filter key" field and change the name of the column as you need it: