V3 Bulk: Custom Field

user151814
Rookie
0 Votes

Hi,

 

We are trying to Import Contacts Using JSON, and set custom fields as stated in documentation:

 

cf:custom_field_nameoptional, Max. Length:255This 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_longevitytd_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

9 REPLIES 9
Jimmy_D
Employee
0 Votes

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


Regards,
Jimmy D.
Tier II API Support Engineer
user151814
Rookie
0 Votes

Hi 

 

 

 

 

David_B.
Employee
0 Votes

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

user151814
Rookie
0 Votes

Hi David,

 

I've emailed and example.

 

Thanks,

Sveta

HonestA
Campaign Expert
0 Votes

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)

Jimmy_D
Employee
0 Votes

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.


Regards,
Jimmy D.
Tier II API Support Engineer
HonestA
Campaign Expert
0 Votes

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.

Jimmy_D
Employee
0 Votes

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?


Regards,
Jimmy D.
Tier II API Support Engineer
HonestA
Campaign Expert
0 Votes

Thanks Jimmy. I just sent the email as you suggested.

Resources
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up