GetintheLoop / intercom-cli

Intercom SDK abstraction layer
MIT License
0 stars 3 forks source link

Feature Request: Unflatten Function for CSV parsing #20

Open MacMcIrish opened 6 years ago

MacMcIrish commented 6 years ago

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:

company_id,custom_attributes.enabled
0,true

Requirements

Unflatten function to parse the CSV headers into parent/child objects appropriately.

simlu commented 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