Hello,
I am facing the following issue.
When the JSON payload contains a comma in the value of a custom field, the imported contact is not correct.
For example:
The import of the following
Custom Field 1: test, test
Custom Field 2: value 2
Custom Field 3: value 3
Has the following result in Constant Contact:
Custom Field 1: test
Custom Field 2: test
Custom Field 3: value 2
Custom Field 4: value 3
I believe this is not by design, but perhaps I need to escape the comma someway? However I do not understand this, because the field's value is wrapped between double quotes in the JSON string.
Can anyone shed some light on this?
Hello,
Thanks for posting. What your experiencing definitely seems like a defect in the processing of the custom fields. Would you mind sending me a PM with the details of the API call? Thanks.
Andrew B.
Constant Contact
API Support
Thanks for your reply Andrew. I have sent you a JSON string via PM.
Here's an update. We have been able to reproduce the problem and it is logged as a defect to be fixed. We were also able to determine a workaround until the fix is live. If there is a custom field with a comma in the value, you can wrap the field in escaped double quotes to ensure correct processing.
So this:
{
"name":"Custom Field 1",
"value":"test, test"
}
Becomes this:
{
"name":"Custom Field 1",
"value":"\"test, test\""
}
I'll provide another update once I know when the fix should be released.
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article