When you upload Custom Contact Variables (CCV) the type of the CCV can be set.
This typemap is used to convert strings in both the Contacts Manager on the portal and via the API.
types that can be set include
- String (used for text - this is the default)
- Date
- Boolean
- Float
- Integer
- Array (multiple variables separated with a delimiter)
You set the CCV type in the Contact Manager.
To open the CCV type setting dialog
- Click the 'pizza' button on the right hand side and select CCV type map in the contact manager
- Once open you can set the type
In the example the column 'mymeasure' is a type array .
This is used when the column has multiple variables separated by a delimiter.
When you set type Array, you must also set the delimiter. In the example below it's a | but it must reflect the delimiter that you use in the file.
Press Save.
Date Type
By default dates are parsed in ISO 8601 format.
It is also possible to define a custom format e.g. "MM-DD-YYYY"
The list of all available parsing tokens is:
Input | Example | Description |
---|---|---|
YY | 18 | Two-digit year |
YYYY | 2018 | Four-digit year |
M | 1-12 | Month, beginning at 1 |
MM | 01-12 | Month, 2-digits |
MMM | Jan-Dec | The abbreviated month name |
MMMM | January-December | The full month name |
D | 1-31 | Day of month |
DD | 01-31 | Day of month, 2-digits |
H | 0-23 | Hours |
HH | 00-23 | Hours, 2-digits |
h | 1-12 | Hours, 12-hour clock |
hh | 01-12 | Hours, 12-hour clock, 2-digits |
m | 0-59 | Minutes |
mm | 00-59 | Minutes, 2-digits |
s | 0-59 | Seconds |
ss | 00-59 | Seconds, 2-digits |
S | 0-9 | Hundreds of milliseconds, 1-digit |
SS | 00-99 | Tens of milliseconds, 2-digits |
SSS | 000-999 | Milliseconds, 3-digits |
Z | -05:00 | Offset from UTC |
ZZ | -0500 | Compact offset from UTC, 2-digits |
A | AM PM | Post or ante meridiem, upper-case |
a | am pm | Post or ante meridiem, lower-case |
Do | 1st... 31st | Day of Month with ordinal |
Please note - New mapping will be applied going forward not retrospectively.