Skip to main content

Hi there,

I’m looking into the bulk profile importation method via SFTP and it seems straightforward enough.

The challenge I currently have is with importing custom properties that have JSON values, for example a checklist of multiple values will be rendered as JSON within Klaviyo: ["example 1","example 2"]

It seems that the SFTP CSV interprets double-quotes and commas as special characters, so adding those same characters in a JSON field is tricky. I tried something like:

"Email","Custom Property"
"example@example.com","[\"example 1\",\"example 2\"]"

I can only assume that this is not currently supported by the SFTP import method, or that there’s some way to format the JSON data that is not visibly documented (I haven’t been able to find anything yet that covers this specific use case).

I’ve tried encoding using \uXXXX notation for the double quotes and commas as well, however it just imports in the same value I give it (which makes sense).

Could it be possible to change the content and column delimiters for interpreting the CSV file? It could even be based on the file extension (e.g. TSV for tab-separated values instead of CSV). Using a backtick (`) as an optional content delimiter could help too, e.g.
`["example 1","example 2"]`

@mscheurichpatou I recently had to do the CSV import of events for a client and below is how I structured the list column.  Hopefully below helps you:
 

"["" AS Colour Men's Ringer Tee"", ""AS Colour - Official Zip Hood"", ""AS Colour - Premium Zip Hood"", ""American Apparel Unisex Fine Jersey Short-Sleeve T-Shirt"", ""Next Level - Ladies Boyfriend Tee"", ""Next Level - Ladies CVC Crew""]"

Thanks ​@whereisjad, that helped a lot! Seems like it should be more obvious in the documentation. I misinterpreted the documentation:

  • Given row values with commas or other special characters, we expect double quotes to wrap cell values or we will interpret commas as delimiters.

in this section to mean a single quote " (double apostrophes) when it should have been ""