When sending data to ChurnZero via the JavaScript, the HTTP API, or CSV Uploads there are some requirements for how the data should be formatted so that it can be parsed properly. The table below should help identify how to format each data type so that it gets stored properly and all the calculations within ChurnZero can happen properly.
| Type | Format | Example |
| String | Any | ExampleString |
| Number | No Spaces No Commas Decimal Separator |
12345667.89 |
| Date | ISO-8601 |
2012-03-19T07:22Z
|
| Single-Select Picklist | Enter the value exactly as it appears in the picklist. Commas and other punctuation need no special handling. | Collaboration: Calling, messaging, meetings |
| Multi-Select List | Comma-separated values in one cell. Spaces after commas are optional. | Value1, Value2, Value3 |
| Multi-Select List (a value contains a comma) | A JSON list: square brackets, each value in straight double quotes, values separated by commas. See Multi-Select Lists with special characters. | ["Collaboration: Calling, messaging, meetings", "Value2"] |
| True/False | One of the 3 value sets shown in the Example column. | True, False Yes, No 1, 0 |
Multi-Select Lists with special characters (CSV Uploads)
ChurnZero splits a multi-select cell at every comma. If any value in the cell contains a comma, enter the whole cell as a JSON list so the comma stays inside the value.
| You want to store | Enter this in the cell |
| Collaboration: Calling, messaging, meetings | ["Collaboration: Calling, messaging, meetings"] |
| Collaboration: Calling, messaging, meetings and Security | ["Collaboration: Calling, messaging, meetings", "Security"] |
| [Legacy] | ["[Legacy]"] |
| Tier 1 "Strategic" | ["Tier 1 \"Strategic\""] |
| Data\Analytics | ["Data\\Analytics"] |
Rules for the JSON list format:
- Use it for the whole cell. You can't mix a JSON list and plain comma-separated values in one cell.
- Any cell that starts with
[and ends with]is read as a JSON list, even if no value has a comma. That's why[Legacy]needs the list format. - Use straight double quotes (
"). Curly quotes (“ ”), which often get added when pasting from Word, Slack, or email, cause the row to fail. - Put a backslash before any double quote or backslash inside a value (
\",\\). - Keep each value to 255 characters or fewer.
- Don't use this format for single-select picklists. The brackets and quotes would be saved as part of the value.
Editing in a text editor instead of Excel or Google Sheets?
Excel and Sheets handle CSV quoting when they save the file, so you can type the values exactly as shown above. If you edit the .csv as plain text, wrap the cell in double quotes and double every quote inside it. For example, ["Value, with comma"] becomes "[""Value, with comma""]". Don't paste this text-editor form into Excel or Sheets, because it will be quoted twice and fail to import.
Code Examples
If you are using the Javascript integration reference these examples:
Javascript
|
If you are using the HTTP API integration reference these examples:
HTTP
|
Comments
0 comments
Article is closed for comments.