SOLVED

REST API | Create Or Update Lead | Company update not allowed

Go to solution
Anonymous
Not applicable

REST API | Create Or Update Lead | Company update not allowed

Hi,

I am using REST API for leads' sync with multiple instances of marketo. I am syncing a lead via Leads API call for Create and Update [http://developers.marketo.com/rest-api/lead-database/leads/#create_and_update ]. It is working fine for most of the instances. But for one of the instance, I am getting "Company update not allowed". I found this in list of record level error codes [http://developers.marketo.com/rest-api/error-codes/ ]. But, there is no further documentation on how to resolve this error. Is it due to some permission issue for particular field? How can I resolve this error?

Sample Service Call: https://988-AGF-883.mktorest.com/rest/rest/v1/leads.json

Sample Request Body: {"action":"createOrUpdate","lookupField":"email","input":[{"phone":"123456","mofEndpointsLeadForm":"abc","state":"Massachusetts","facebookId":"","linkedInId":"","mBDR":"Yes","address2":"","city":"test","mPrimaryBackupDataRecovery":"test","title":"Marketing Manager, Demand Generation","postalCode":"","firstName":"test","twitterDisplayName":"","lastName":"test","email":"test@test.com","company":"test"}]}

Response: {"requestId":"780c#161ba0dc40e","result":[{"status":"skipped","reasons":[{"code":"1021","message":"Company update not allowed"}]}],"success":true}

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: REST API | Create Or Update Lead | Company update not allowed

To quote Greg from here:

If the persons in Marketo are linked to contacts and accounts in your CRM, the company fields are locked and cannot be updated.

View solution in original post

8 REPLIES 8
SanfordWhiteman
Level 10 - Community Moderator

Re: REST API | Create Or Update Lead | Company update not allowed

To quote Greg from here:

If the persons in Marketo are linked to contacts and accounts in your CRM, the company fields are locked and cannot be updated.

Anonymous
Not applicable

Re: REST API | Create Or Update Lead | Company update not allowed

Sanford Whiteman​,

As greg mentioned in the link, do I need to remove all company fields? How can I get the list of fields that should be removed?

Jep_Castelein2
Level 10

Re: REST API | Create Or Update Lead | Company update not allowed

You can do a 'describe' to get all field details: http://developers.marketo.com/rest-api/lead-database/leads/#describe

Grégoire_Miche2
Level 10

Re: REST API | Create Or Update Lead | Company update not allowed

HI Faryal,

I am afraid that, with the API, you might have to check the SFDC type field before trying to push account data.

-Greg

Anonymous
Not applicable

Re: REST API | Create Or Update Lead | Company update not allowed

Hi Jep Castelein​/Grégoire Michel,

I am already doing a "describe" call for displaying available fields in marketo. But it only returns name and readOnly information of a particular field. Is there any other API call to check SFDC type of company related fields?

Jep_Castelein2
Level 10

Re: REST API | Create Or Update Lead | Company update not allowed

Faryal Ali​ I was expecting 'describe' to return more details, however, that is not the case. Instead, go to Admin > Field Management > Field Mapping (tab). All fields mapped to Object Type "Account" are not updateable if SFDC Type = "Contact". You can also export this list using the export button on the bottom of the page (to the left of the search box)

Grégoire_Miche2
Level 10

Re: REST API | Create Or Update Lead | Company update not allowed

Hi Jep,

Unfortunately, Field mapping is not accurate, because it's not updated after the initial sync...

There are quite a few posts in the community on this issue.

-Greg

Jep_Castelein2
Level 10

Re: REST API | Create Or Update Lead | Company update not allowed

Ah, my bad. Then the only option is to go into Field Management and check field-by-field whether it's mapped to an Account field in SFDC 😞