Print this page

Order for creation of objects and records through API calls using Integration

Knowledge Article Number 000176893
Description When integrating a third party application to Salesforce, API calls can be made to create or update records at either end. This article specifies the specific callout order required to create objects and records. 
Resolution There are two ways to create or update records during integration.

1. Make a single API call for different sObjects/records.
2. Make different API calls for all sObjects/records that have to be created or updated.

In case you are creating the records:
  • Parent Object needs to be available before you create child object or map it. This means, parent object will precede the child object.Example, Account needs to be created before creating Contact and other child objects.
In case you are updating records:
  • If the parent object/record already exists, then you do not need to update or create it again. You can directly update/create a child object through API call and map it.
  • For example, if you already have an existing Account and would like to create an associated Contact, you can directly create a Contact and map it to the existing Account.
You can use the following developer guide for additional information on the subject:

promote demote