You need to sign in to do that
Don't have an account?
Alex Drew
API Integration Lead Creation Problem
Hi
I am working with our dev team to get an API set up to create leads in our Salesforce. The Authentication is fine and the API can access our Salesforce. The error returns when we try to create the Lead. The fields mapped are all correct with the API names etc so struggling to see where the issue is.
The USER set up has access to Leads and create them.
Any recommendations on what I might have missed would be great!
Thanks
I am working with our dev team to get an API set up to create leads in our Salesforce. The Authentication is fine and the API can access our Salesforce. The error returns when we try to create the Lead. The fields mapped are all correct with the API names etc so struggling to see where the issue is.
The USER set up has access to Leads and create them.
Any recommendations on what I might have missed would be great!
Thanks
That is your org id, it should not be set as recordtype id. Recordtypeid starts with 012 (e.g. 01230000000N9Z1AAK). It is different for each object.You can log in to SFDC and go to Setup -->Lead-->RecordTypes to view all Lead record types.Then click on the any of the record type (or the specific one you want to set). In the browser URL you will see that id (starting with 012). Please set that id in the lead creation request. It should work.Alternately, you can query recordtype in SFDC -
SELECT Id,IsActive,SobjectType FROM RecordType where SobjectType='Lead' and IsActive = true
Please let me know if this is helpful.
Regards,
Shashi
All Answers
Can you please post the error description. I will see if I can help you.
Regards,
Shashi
Probably the data that you are sending is not correct.Can you send the request body or the Lead fields data.
Regards,
Shashi
We are posting to the fields below with the data being submitted per fields.
{"FirstName":"test",
"LastName":"test",
"Email":"test@test.net",
"Region_Location__c":
"United Kingdom",
"Brand__c":"Insight Vacations",
"Web_Request_Type__c":"Request a rochure",
"LeadSource":"Web",
"Selling_Company_Code__c":"IVUKLS",
"RecordTypeId":"00DJ000000374F3"}
Record tyype is Org ID for our SANDBOX we are posting this too.
All fields are mapped correctly, API names matching etc.
Thanks
Alex
That is your org id, it should not be set as recordtype id. Recordtypeid starts with 012 (e.g. 01230000000N9Z1AAK). It is different for each object.You can log in to SFDC and go to Setup -->Lead-->RecordTypes to view all Lead record types.Then click on the any of the record type (or the specific one you want to set). In the browser URL you will see that id (starting with 012). Please set that id in the lead creation request. It should work.Alternately, you can query recordtype in SFDC -
SELECT Id,IsActive,SobjectType FROM RecordType where SobjectType='Lead' and IsActive = true
Please let me know if this is helpful.
Regards,
Shashi