Yes, there is a way to do this with AtoM's CSV templates. The legacyID and parentID columns can be used to indicate hierarchical relationships in the import. The important thing is that, in your CSV, a child row does not appear above the parent. By this I mean: when importing a CSV file, AtoM will process the file row by row in descending order. If it encounters a row that says it has a parent, but the parent hasn't yet been created (because it is in a lower row of the CSV), this will cause an error.
We discuss managing hierarchical relationships in the description CSV files in our documentation here:
You might also find the following slides useful for preparing AtoM CSVs for import:
Hierarchical data is discussed as of slide 11.
Our CSV import templates can be found on the AtoM wiki, here:
One very important note, if you are starting with Excel spreadsheets!
In terms of using spreadsheet applications: we also strongly recommend that users do NOT use Excel if possible, when converting your column headers to match AtoM's import specifications. The problem has to do with Microsoft's approach to standards, particularly around CSV - or rather, their strange refusal to use existing standards, instead implementing their own custom encodings and line ending characters. For example, by default Excel uses WinLatin, a custom character encoding that AtoM doesn't recognize - and Excel makes it very hard to change its defaults without any problems!
The character encoding and line-ending requirements for AtoM are noted in our documentation here
This is also mentioned in slides 9-10 of the deck linked above.
Instead of Excel, I recommend that you try to install LibreOffice Calc and use that instead when preparing CSVs for import into AtoM. It's not as user-friendly or as nice looking as Excel, but it is free open source software, and the control it gives you over character encoding (and delimiter / separator characters) is far greater - you can set this before you open any CSV:
Later versions of Excel have improved how they handle CSV formats, but files that start in Excel can sometimes still cause strange issues during import, such as importing thousands of blank rows (because of different line ending characters), or having some characters come in incorrectly (because of non UTF-8 encoding). I would probably suggest that you try doing a Save As in Excel to CSV /UTF-8, and then open that file with LibreOffice using the settings shown in the image above, so you can spot check for any issues. Any work you need to do to massage the data, rename column headers, etc. can then be done in LibreOffice Calc.
Cheers,