When importing Journal Entries with multiple lines, the JSON structure for a NetSuite data import must include the header data as root properties and line data in an array where each object represents a line. Depending on what your source application is and what the data looks like from your export step, you may need to parse the data and structure it to match the correct format.
The JSON structure should have the following format in order to import into NetSuite. You can do this through the transform mappings, or a hookscript.
{
"JournalHeaderField1": "Example Header Value 1",
"JournalHeaderField2": "Example Header Value 2",
"JournalLines": [
{
"Account": "Example Account 1",
"Amount": "100"
},
{
"Account": "Example Account 2",
"Amount": "200"
}]
}
With this structure, you can define your NetSuite import mappings as such:
- JournalHeaderField1 -> Journal Header Field
- JournalLines[*].Account - > Journal Line Field (Account)
- JournalLines[*].Amount - > Journal Line Field (Amount)
If you follow this structure and these guidelines, you should be able to import a journal entry with multiple lines.
For more information on transforming data into a usable format, see the following articles: