You need to sign in to do that
Don't have an account?
Sourav Chandra
Using Bulk API to import leads
Hi,
We are thinking to integrate salesforce with out existing website. On our website, users have already existing leads created using our lead capture form. We want to import these existing leads to users connected salesforce account.
To do so, I am using user's access token and instance url as received from /token call. Instead of doing soap login, I am passing X-SFDC-Session header set to access token value and it works fine. I did not find any supporting document for this and sceptical whether its fine to go ahead with this approach. Please let me know if its ok.
Sample request:
curl -i -X POST -H 'X-SFDC-Session: <access_token>' -H 'Content-Type: application/json' -d '{"operation" : "upsert", "object" : "Lead", "contentType" : "CSV", "externalIdFieldName" : "Email"}' https://ap5.salesforce.com/services/async/39.0/job
Thanks,
Sourav
We are thinking to integrate salesforce with out existing website. On our website, users have already existing leads created using our lead capture form. We want to import these existing leads to users connected salesforce account.
To do so, I am using user's access token and instance url as received from /token call. Instead of doing soap login, I am passing X-SFDC-Session header set to access token value and it works fine. I did not find any supporting document for this and sceptical whether its fine to go ahead with this approach. Please let me know if its ok.
Sample request:
curl -i -X POST -H 'X-SFDC-Session: <access_token>' -H 'Content-Type: application/json' -d '{"operation" : "upsert", "object" : "Lead", "contentType" : "CSV", "externalIdFieldName" : "Email"}' https://ap5.salesforce.com/services/async/39.0/job
Thanks,
Sourav
You can use tools like the apex data loader to create the leads with an admin/integration user that has "Set Audit Fields upon Record Creation" if you want to keep the original created date and created by user.
When you are defining the mapping and you notice that you have fields in the source that don't have corresponding fields in salesforce that you want to see in salesforce then you need to add these fields to the lead object in salesforce.
An example mapping could look like this when created in the UI:
or when shown you look at the .sdl file: The result will be that record will look like it was created by the user corresponding to CreatedById and the record owner will be the user whose user id matches to the OwnerId.
Regards,
Nagendra.
Hi Nagendra,
As mentioned in my ticket, we will do this export programmatically not using any ui tool.
Thanks,
Sourav