Browse all articles
Tutorials

Header Lines CSV

Updated on

Customize a report with both header and line items in a single CSV file.

If you need a CSV file that includes:

  • Header details
  • Line item details

you can create this structure using DataChamp.

Line Identifier Order Number Details
HEADER #01 Header details
LINE #01 Line details

Playing the video loads content from YouTube. Watch on YouTube

Step-by-Step Guide to Configuring a CSV Export in DataChamp:

  1. Create a new report
  • Click "New Report", then select in "Orders" the "Basic report".
  1. Rename the first tab
  • Change the tab name from "Orders" to "Order Headers".
  1. Select the order header fields
  • Choose the fields you want to export from the order header, including sections like "Order / Shipping Address".
  1. Add a custom column "Line Identifier"
  • Create a new column and name it "Line Identifier".
  • Drag and drop this column to the first position.

Header Lines CSV: Step-by-Step Guide to Configuring a CSV Export in DataChamp:

  1. Hide the header row
  • You can find this option under the "Rows" tab.
  1. Add an additional tab for line items
  • Create a new tab and select "Order" as the export type.
  • Rename this tab to "Order Lines".

Header Lines CSV: Step-by-Step Guide to Configuring a CSV Export in DataChamp:

  1. Select the order line fields
  • Choose the fields you want to export from the order lines.
  • Remove any fields that are already included in the header section to avoid duplication.
  • Add any necessary fields from the "Line Items" section.
  1. Add the "Line Identifier" column
  • Set the value to "LINE".
  1. Hide the header row for the second tab
  • Since you already configured "Order Headers," also activate "Hide Header Row" for "Order Lines."
  1. Set the export mode to "Fill"
  • This ensures that the "Line Identifier" column is filled for each order line.
  • Click "Export Mode" => "Lines" => "Fill" in the settings panel on the top.
  1. Configure the file type
  • Set the file type to CSV.
  1. Preview the result
  • Click on the "Preview Button" to check to result of the report.
  1. Save and run your report
  • Click "Save & Run" in the top-right corner.
  • Review the generated CSV file and make any further customizations if needed.
  • If you encounter line limit warnings, apply filters to both tabs (e.g., export only recent orders using the "Created At" filter).

Still need help?

We're happy to help you set up your report. Usually we reply within a few hours.

hello@datachamp.io