Hi,
We are trying to Import Contacts Using JSON, and set custom fields as stated in documentation:
cf:custom_field_name | optional, Max. Length:255 | This header column name is the name of an existing custom field prefixed with cf:. For example, enter cf:first_name if you have a custom field named “first_name”. As long as you use the cf: prefix, you can import custom fields that use the same name as the contact properties. You can add up to 25 different custom field headings for each contact. |
Problem is that not all custom fields are set. We are not exceeding limit of 25 fields per contact. We have two fields, both of them are "string" type, first is set, and second is not. There is noting special about field names (td_longevity, td_velocity), and both values are sent as strings. Activity summary shows no error.
If we try to update single Contact, both custom fields are set correctly.
Is there some non-documented restriction in field names when using bulk api? What could be the problem causing td_velocity not to be saved?
EDIT:
When using Import Contacts Using JSON it seems that system is updating wrong property. cf:td_velocity value is written into street_addresses[0].street_address.city.
Regards,
Sveta
Hello @user151814,
Thank you for reaching out to Constant Contact's API Support.
Using cf: is basically a shortcut/alias for custom fields. It only works if the custom field has already been created so that the cf: command has a name it can reference. You can create the custom fields separately from creating the contact by using the custom field endpoints. Once you have all of your custom fields created then you should be able to reference them using the cf: during a bulk import.
https://v3.developer.constantcontact.com/api_guide/custom_fields.html
Hi Jimmy_D,
Thanks for your answer.
Fields are created separately and we are able to set them by updating contact directly.
When we try to insert contacts using JSON bulk activity, fields are mapped into wrong properties (not omitted). cf:td_velocity (field with td_velocity name of type string exists) value is being set as a city (in address). This doesn't sound you like a possible bug in JSON bulk activity?
Thanks,
Sveta
Hello Sveta,
If you are seeing this data not going into the custom field and instead going into the street address, I would say that may be a possible bug. I'd like to research this a bit further in detail. Would you be willing to email us at webservices(at)constantcontact.com with an example of the body of your request, as well as the Constant Contact username that you are making the call to?
Regards,
David B.
Tier II API Support Engineer
Hi David,
I've emailed and example.
Thanks,
Sveta
I know we're having the 500 errors right now but i was able to get a couple bulk upload requests to go through today. Unfortunately I am running into this same problem. None of the cf field values are being set. Has this been a confirmed issue?
{ "import_data": [ { "contact_id": "", "email": "xxxx@hotmail.com", "first_name": "Mc", "last_name": "Tester", "job_title": null, "company_name": null, "phone": null, "street": null, "street2": null, "zip": null, "country": null, "cf:Account_Value": "0.00", "cf:Lead_Date": "7\/21\/2019 6:03:00 PM", "cf:Status": "Lead", "cf:Work_Type": "", "cf:Lost_Reason": "" } ], "list_ids": [ "1689df1e-0d2d-11ea-848f-d4ae528440e0" ] }
The bulk import activity report runs the insert/update without issue. It's just the custom fields that don't work at all. (edit: and yes, the custom fields already exist)
Hi @HonestA,
The cf fields will only work if they have already been created using the Custom Fields endpoints. Consider the cf fields to be an alias that is pointing to the custom fields, so they need to be created before the alias will work.
If you have already created the custom fields using the necessary endpoints let us know and we can look in to this further.
Jimmy,
The custom fields are already created. I tried again just now and they are not getting updated even with a brand new contact. The activity report shows a successful update and no errors. We are unable to go live with our integration at this time because the custom fields are important for our ability to segment. Any help you can provide would be appreciated. I have been successful in using the same custom fields when inserting a new contact via the /contacts endpoint though. It's just the bulk import that isn't working.
Thanks.
Hi @HonestA,
Would you mind sending an email to webservices(at)constantcontact(dot)com with the data you are importing along with your API Key so we can check our logs and dig in to this more?
Thanks Jimmy. I just sent the email as you suggested.
I am seeing the same issue. I have confirmed the custom field exists in the "contact_custom_fields" API call response with "name": "points". I am providing a "cf:points" value in the Bulk JSON upload alongside fields like "first_name", "last_name" which are being updated. The "cf:points" field is not being set on the contact. The /contact/XXX does not list any custom fields associated with the contact and the "updated_at" field has not changed.
Hello AndyH86,
Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.
I took a look in our logs and found your request body containing "cf:points". Here are my findings:
The contacts I tested from the request body did have custom field values for "Points" which matched those in the request, so it appears that these values were updated successfully, unless this was changed within the contact details later by other means.
In regards to the "updated_at" value, which identifies who last updated the contact’s personal information, the "update_source" will only appear for contacts who’s contact information has been updated since they were added (examples: "first_name", "last_name", "job_title", "company_name", "birthday_month", etc…).
However, while basic properties like those listed above are part of the contact object, custom fields are considered a subresource, and so if you are only updating the custom field like the example below, the "updated_at" property will not update from the previously listed date:
"import_data":[
{"cf:custom_field_1":"new value","email":"address@example.com"}
For further assistance, if needed, please feel free to reach our team directly/securely via email at webservices@constantcontact.com referencing case #32553424.
Please have a look and let us know if you have any other questions!
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up