Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Line Ending Header

Use the Sforce-Line-Ending header to specify how line endings are formatted.

When you create a Bulk API 2.0 job, specify a line ending that matches the line ending used to create the CSV file using the lineEnding request field. Bulk API 2.0 supports two line-ending formats:

  • LF linefeed
  • CRLF carriage-return plus linefeed

The default line ending, if not specified, is LF. Different operating systems use different characters to mark the end of a line.

Unix / Linux / OS X uses LF (line feed, '\n', 0x0A).

Windows / DOS uses CRLF (carriage return followed by line feed, '\r\n', 0x0D0A).

For example,

1{
2    "object" : "Account",
3    "contentType" : "CSV",
4    "operation" : "insert",
5    "lineEnding" : "LF"
6}

Note that it’s possible that the text editor used to create the CSV file is configured for a specific line-ending format and might supersede the default operating system format.