Open MacMcIrish opened 6 years ago
The following are not generic. They should be and only depend on input csv. Eventually we can change behaviour by changing csv and not code.
https://github.com/GetintheLoop/intercom-cli/blob/master/lib/cmds/user-cmds/update.js https://github.com/GetintheLoop/intercom-cli/blob/master/lib/cmds/company-cmds/update.js
Issue:
Manually formatting data before sending to intercom is clunky and prone to errors. Data in the CSV can be ignored when sending if not explicitly included in the cmd line argument.
Solution:
Do the formatting in the input CSV so that nested data headers are of the format
parent.child
.Example:
A CSV formatted such as:
Requirements
Unflatten function to parse the CSV headers into parent/child objects appropriately.