cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Fields Order, API V2, Bulk Import

Occasional Contributor

Custom Fields Order, API V2, Bulk Import

Hello,

 

I'm using:

- API V2

- java sdk - https://github.com/constantcontact/java-sdk

- bulk import activity.

 

It looks like order of custom fields is different than it looks in UI. I'm sending custom fields using same order as in UI (Custom Field 1 is on top of list), however when I look at custom fields of imported subscriber it's a mess. I can see also that custom fields order in settings view and in subscriber view is different.

 

Is this known problem? How I can obtain correct custom fields index mapping?

 

Thanks

4 REPLIES 4
Honored Contributor

Re: Custom Fields Order, API V2, Bulk Import

Hello,

 

What you are experiencing does not sound like normal behavior. I am investigating the issue on this end and I will be able to follow up once I hav esome more information. One thing that may help to speed this up is if you can provide a sample of the JSON payload that is being sent to the Constant Contact API. The JSON payload is generated on line 46 of src/main/java/com/constantcontact/services/activities/BulkActivitiesService.java.

 

Best Regards,

Elijah G.
API Support Engineer
Highlighted
Occasional Contributor

Re: Custom Fields Order, API V2, Bulk Import

Thanks for feedback, more details below:

 

JSON payload:

{
   "lists":[
      "1864907989"
   ],
   "column_names":[
      "Email Address",
      "First Name",
      "Last Name",
      "Zip/Postal Code",
      "Country",
      "US State/CA Province",
      "Custom field 1",
      "Custom field 2",
      "Custom field 3",
      "Custom field 4",
      "Custom field 5",
      "Custom field 6",
      "Custom field 7",
      "Custom field 8",
      "Custom field 9",
      "Custom field 10",
      "Custom field 11",
      "Custom field 12",
      "Custom field 13"
   ],
   "import_data":[
      {
         "addresses":[
            {
               "line1":null,
               "line2":null,
               "line3":null,
               "city":null,
               "address_type":null,
               "state_code":"",
               "country_code":"",
               "postal_code":""
            }
         ],
         "email_addresses":[
            "t2@testemail.com"
         ],
         "first_name":"",
         "middle_name":"",
         "last_name":"",
         "job_title":"",
         "company_name":"",
         "home_phone":"",
         "work_phone":"",
         "custom_fields":[
            {
               "name":"Custom field 1",
               "value":"Thu Jan 01 01:00:00 CET 1970"
            },
            {
               "name":"Custom field 2",
               "value":"Mon Aug 04 16:43:33 CEST 2014"
            },
            {
               "name":"Custom field 3",
               "value":"no"
            },
            {
               "name":"Custom field 4",
               "value":"no"
            },
            {
               "name":"Custom field 5",
               "value":"no"
            },
            {
               "name":"Custom field 6",
               "value":""
            },
            {
               "name":"Custom field 7",
               "value":""
            },
            {
               "name":"Custom field 8",
               "value":""
            },
            {
               "name":"Custom field 9",
               "value":"product name"
            }
         ]
      }
   ]
}

 

 

You can see that custom fields 1 and 2 are dates. When I look at t2@testemail.com details view via UI I can see:

Additional section
- First Purchase Date: Thu Jan 01 01:00:00 CET 1970
- 1 Product Id: Mon Aug 04 16:43:33 CEST 2014

 

In manage custom fields settings view, first two:

- First Purchase Date

- Last Purchase Date

Occasional Contributor

Re: Custom Fields Order, API V2, Bulk Import

I just want to provide some more clarifications what is wrong here.

 

Custom fields 1 and 2 should be populated by two dates: Thu Jan 01 01:00:00 CET 1970 and Mon Aug 04 16:43:33 CEST 2014.

Name of first two fields in settings view is: First Purchase Date and Last Purchase Date.

I expect that subscriber will have those two dates populated instead it looks like it's populating First Purchase Date and Product ID (field that is later in list).

Honored Contributor

Re: Custom Fields Order, API V2, Bulk Import

Hello Ron,

 

After reviewing this further, it appears that the source of the mismapped data is that the original 15  Custom Fields you had in your account have been renamed. While there is no issue with renaming these fields, each of those fields will stay associated with the original field name for the purposes of API imports.

 

The easiest way to verify the mappings between the old Custom Field numbers and the current names is to perform a contact import that places an idetifier (Such as CF1-CF15) as the value of each custom field. You can then view the contact was that imported and verify which fields are mapped to which names.

 

If you are still having any trouble, please let us know!

 

Sincerely.

Elijah G.
API Support Engineer