Prepare Data to Ingest
Format and organize your CSV files for upload.
-
The first row in a CSV file lists the field names for the object that you’re processing. Each subsequent row corresponds to a record in Salesforce.
-
These examples demonstrate different ways to use CSV data with Bulk API 2.0.
-
Valid Date Format in Records (2.0)
Specify the right format for
dateTimeanddatefields. -
Relationship Fields in a Header Row (2.0)
Many objects in Salesforce are related to other objects. For example, Account is a parent of Contact. You can add a reference to a related object in a CSV file by representing the relationship in a column header. When you’re processing records in the Bulk API, you use
RelationshipName.IndexedFieldNamesyntax in a CSV column header to describe the relationship between an object and its parent, where RelationshipName is the relationship name of the field and IndexedFieldName is the indexed field name that uniquely identifies the parent record. Use thedescribeSObjects()call in the API to get therelationshipNameproperty value for a field.