Picture of How to Set Up MegaEdit Batch (CSV) Uploads, Validation and Previews

How to Set Up MegaEdit Batch (CSV) Uploads, Validation and Previews

This update enhances how batch (CSV) data works within MegaEdit, making it easier to prepare, validate, and preview variable data before generating output.

Users can now download a sample CSV file that already contains the correct structure, upload their data either from the product page or within the editor, and immediately see if anything is missing or incorrect. A preview of the data is also available, allowing users to check how their content will appear before committing to production.

In addition, a new Non-Batch Output Mode allows artwork to be generated without applying CSV data. This is particularly useful when reviewing layouts or sharing proofs that don’t require personalisation.


What Was It Like Before?

Previously, working with batch data required more manual effort and came with a higher risk of error. Users had to create CSV files from scratch, often without clear guidance on the required structure or headers.

If something was wrong - such as a missing column or mismatched header - it might only become apparent later in the process, sometimes after upload or even during output generation. There was also limited visibility into how the data would render, making it harder to catch issues early.

Overall, the process relied more on trial and error, especially for new users or more complex setups.


Pre-Requisites

To make use of these improvements, you’ll need a MegaEdit product that uses placeholders for variable data, such as names, colours, or other personalised fields. These placeholders will correspond directly to the columns in your CSV file.

If you plan to allow CSV uploads directly from the product page, you’ll also need a file upload attribute configured on the product.


How to Set It Up

Setting this up involves configuring how CSV files are provided, validated, and used within your MegaEdit product.

1. Add a Sample CSV Download

Start by defining a sample CSV file that users can download. This gives them a clear template to follow and reduces the chance of formatting errors.

To do this, navigate to:

MegaEdit Product → Config → Scripts → Standard Batch Script

In the script configuration area for the Standard Batch Script, add the following:

 
{
"sampleCsv": {
"downloadButton": true,
"fileName": "sample-data.csv",
"headers": ["Color", "Size"],
"rows": [["Red", "S"], ["Red", "L"], ["Green", "S"], ["Green", "L"]]
},
"csvBatchOptions": {
"fileAttributeName": "CSV file here please",
"clientSideHeadersValidation": true,
"requiredHeaders": ["Color", "Size"]
}
}
 
⚠️ Remember to change the fileName, Headers, Rows and requiredHeaders values to match the ones you actually want to use ⚠️
 

Within this configuration:

  • The sampleCsv section defines the downloadable template, including the file name, column headers, and optional example rows
  • The csvBatchOptions section controls how uploaded CSV files behave, including validation and where the file is sourced from

Make sure the headers you define here match the placeholders used in your MegaEdit template.

Once configured, a Download Sample CSV button will appear in the editor, allowing users to quickly download and populate a correctly structured file.


2. Enable CSV Upload from the Product Page

If you want to streamline the journey further, you can allow users to upload their CSV before entering the editor.

1. Create or use an existing file upload attribute - remember the attribute name you use! 

2. Link this attribute to your batch configuration by using the File Attribute Name inside the Standard Batch Script configuration

Once set up, users can upload their data earlier in the process, and it will carry through into the editor and final order.


3. Turn On Header Validation

To reduce errors, you can enable validation that checks whether the uploaded CSV contains all required columns.

  • Define the required headers
  • Enable validation so it runs automatically on upload

If a file is missing any required fields, the user will see an immediate message, allowing them to fix the issue before continuing.

You can enable Header Validation by changing the value for clientSideHeaderValidation to true or false - true meaning it will validate, false meaning it won't validate. 


4. Configure Data Preview

You can control how many records are previewed in the editor to give users visibility into their data.

  • Set a preview record count (e.g. first 3–5 rows)

This helps users confirm that their data is mapping correctly and that everything looks as expected.

You can configure this by navigating to Infigo Settings and changing the value for BatchNumPreviewRecords to 10 for example. 


5. Enable Non-Batch Output Mode (Optional)

If needed, you can enable Non-Batch Output Mode. When this is turned on, the system will generate output using the base template only, without applying any CSV data.

This is useful for proofing designs, checking layouts, or sharing non-personalised previews for approval.

You can enable this by navigating to Edit MegaEdit Product > General Tab > Flags section and enabling or disabling the Non Batch Output Mode setting. 


6. Test the Full Journey

Once configured, it’s worth running through the full workflow to ensure everything behaves as expected. Upload a CSV from both the product page and the editor, check the preview, and generate output.

The uploaded file should persist throughout the journey and be included in the final order regardless of where it was added.

 


Tips to Improve Your Customers Experience

Providing a good experience here can make a big difference, especially for less technical users. Including a well-structured sample CSV with clear headers and example rows will reduce confusion and support requests.

It’s also worth keeping header names simple and intuitive, matching the language used in the editor. Setting a small preview limit helps keep performance smooth while still giving enough visibility to catch issues.

Non-Batch Output Mode can be particularly useful during internal review stages, allowing teams to approve layouts before running full batch production. Finally, saving your configuration as a product default can save time if you’re applying similar setups across multiple products.


Troubleshooting

If a CSV fails to upload, the first thing to check is that the file is correctly formatted and uses the expected headers. Even small differences in naming, such as spacing or capitalisation, can cause validation to fail.

If users see a “missing headers” message, comparing their file against the sample CSV usually resolves the issue quickly.

If data isn’t appearing in the preview, it’s often due to a mismatch between placeholder names and CSV headers, or the preview record count being set too low.

If the CSV appears to upload correctly but isn’t included in the final order, check that the file upload attribute is properly linked and that the upload occurs before submission.

Finally, if the output is not showing personalised data, it’s worth checking whether Non-Batch Output Mode has been enabled, as this will intentionally bypass CSV replacement.


Summary

This update significantly improves the MegaEdit batch experience by making it easier to prepare data, catch errors early, and preview results before production.

The result is a smoother, more reliable workflow with less manual effort and fewer surprises - especially when working with larger or more complex datasets.

Incomplete
Alternate Search Terms
WYSIWYG stands for "What You See Is What You Get" which means that the styling choices made in this editor will be reflected on the front end.