Updating program member custom fields with API.

David_Mezkiriz
Level 2

Updating program member custom fields with API.

Hi everyone,

 

I want to update some program member custom fields of already existing members of the program.

As reported in the documentation, I've already checked the available program member custom fields using this method

https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads...

 

and I got this information 

 

{
    "requestId": "165da#177dd67a6f1",
    "result": [
        {
            "name": "Program Membership",
            "fields": [
                 .....
                {
                    "name": "Track Name",
                    "displayName": "Nurture Track",
                    "dataType": "string",
                    "length": 255,
                    "updateable": true,
                    "crmManaged": false
                },
                {
                    "name": "Waitlist Priority",
                    "displayName": "Waitlist Priority",
                    "dataType": "integer",
                    "updateable": true,
                    "crmManaged": false
                }
              ]
        }
    ],
    "success": true
}

 

 

So as you can see the "Track Name" custom fields is updateable and I tried to update this custom field of an existing membership who belongs to 1111 program, using this method.

https://developers.marketo.com/rest-api/bulk-import/bulk-program-member-import/

and following the example:

curl -i -F format='csv' -F programMemberStatus='Registered' -F file='@example.csv' -F access_token='accesstokenexamplehttps://xxxmktorest.com/bulk/v1/program/{programId}/members/import.json

 

And checking with this url:

https://xxxmktorest.com/bulk/v1/program/members/export/340e292f-1571-4d6c-ad7a-296a93c394cc/status.j...

having this content in the csv file:

 

Status Reason,Member Date,Status,email,Lead Id,Track Name,Webinar Url
My reason,2019-09-04T19:20:04Z,Registered,myemail@test.com,11122,221133,https://www.testingurl.com/1234

 

 

I check the status of the job, and once finished.

https://developers.marketo.com/rest-api/bulk-import/bulk-program-member-import/#polling_job_status

 

I got this return code:

 

{"requestId":"c1bf#1773fd05b3d","result":[{"batchId":2366,"importId":"2366","status":"Complete","numOfLeadsProcessed":1,"numOfRowsFailed":0,"numOfRowsWithWarning":0,"message":"Import succeeded, 1 records imported (1 members)"}],"success":true}

 

 

As you can see the numberOfRecords parameter is 1, numOfRowsWithWarning is 0 and failed is 0,  however if I check the program member and download all available fields for that member, the Track Name program member custom field is empty along with the other program custom fields I try to update. 

Ex:

 

Email Address,Track Name
myemail@test.com,,

 

 

Is there anything I'm doing wrong or I'm overlooking.??

Thanks a lot for your help!!

David

1 REPLY 1
Benjamin_Murra1
Level 1

Re: Updating program member custom fields with API.

I'm having issues just pulling Track Name via the bulk program member export even though it says it is a field available for interaction. I wonder if there is an interface issue with that field specifically.