For the complete documentation index, see llms.txt. This page is also available as Markdown.

CSV Parser

The Avonni CSV Parser simplifies importing data from smaller CSV files into any Salesforce object, with options for handling various formatting.

The Avonni CSV Parser lets users upload a CSV file and map its columns to Salesforce object fields — all inside a Screen Flow. The parsed records are exposed as output variables you can use in downstream flow elements to create or update Salesforce records.


Tutorials


Overview

The CSV Parser operates on three steps:

Accessing the CSV File

  • Direct File Upload — users upload a CSV from their local machine through the component.

  • Using a Stored File — supply a ContentDocument ID, a Base64 string, or a CSV string via the File Value property to bypass the file picker and act as a pure CSV mapper.

Targeting the Salesforce Object

Specify which Salesforce object the parsed data maps to. This determines which fields are available in the mapping UI.

Connecting CSV Data to Salesforce

Map each CSV column header to the corresponding Salesforce field. You can:

  • User Mapping — let the user perform the mapping themselves at runtime.

  • Default Mappings — pre-configure column-to-field mappings to save users time, especially for recurring imports.

Keep Your CSV Files Organized Inside Salesforce

Enable Save as Content Document to store the uploaded CSV inside Salesforce (linked to a specific record if needed). This keeps data secure, shareable, and versioned alongside your Salesforce records.


Configuration

To configure it, click the component on the Flow screen. The Edit CSV Parser Component panel opens on the right with three tabs: Properties, Interactions, and Style. The sections below mirror the Properties tab.

Properties

Object Name specifies the Salesforce object whose fields are shown in the column mapping UI.

File Value accepts a ContentDocument ID, Base64 string, or CSV string. When provided, the file upload input is hidden and the component acts as a mapper for the supplied data.

Required Fields To Map designates specific Salesforce fields that must be mapped before the user can proceed. Use this to ensure critical fields are never skipped.

Default Mappings pre-maps CSV column headers to Salesforce fields. Configure these as column header / object field pairs to reduce manual work for recurring import tasks.

Hide Clear All removes the button that resets all mappings at once.

Hide Mapping hides the mapping section entirely and performs automatic column matching.

Hide Sample Data hides the sample row shown below each column header in the mapping UI.

Show Preview shows a preview of the parsed data after mapping is complete.

Show Row Count displays a text message telling the user how many rows were found in the CSV.

Label sets the label for the file upload input.

Required makes the file upload mandatory before proceeding.

Disabled makes the component visible but non-interactive.

Parser

Fine-tune how the CSV file is parsed.

Comments sets a comment prefix (e.g., # or //). Lines starting with this string are ignored.

Delimiter specifies the field separator character. Leave blank to auto-detect from common delimiters.

Delimiters To Guess provides an array of candidate delimiters to try when auto-detecting.

Encoding sets the file encoding (default: UTF-8). Supports all encodings accepted by the FileReader API.

Escape Character sets the character used to escape quotes within a field (default: ").

Fast Mode enables faster parsing for large inputs that contain no quoted fields.

New Line specifies the newline sequence. Leave blank to auto-detect.

Quote Character defines the character used to wrap quoted fields (default: ").

Save As Content Document

Save As Content Document stores the uploaded CSV as a Salesforce Content Document (file). When enabled, you can also link the file to a specific Salesforce record and give it a custom title.


Styling

The Style tab gives you fine-grained control over the CSV Parser's appearance. Configure it from the Style tab of the Edit CSV Parser panel.

Controls outer spacing.

  • Top: Sets the top margin.

  • Right: Sets the right margin.

  • Bottom: Sets the bottom margin.

  • Left: Sets the left margin.

Output Variables

The CSV Parser exposes these output variables you can reference in your flow after the screen. To use them, select the screen element in Flow Builder, then the CSV Parser component, and pick the output variable you need.

Parsed Records

Updated each time the user completes the column mapping and the CSV is parsed.

Output variable
Type
What it returns

Records

Record Collection

The parsed rows as a collection of SObject records, each field mapped to the column the user connected it to. Use this to feed a Create Records or Update Records element.

Records Serialized

Text (String)

The same record collection serialized as a JSON string. Use this when you need to pass the data to an Apex action or a downstream flow that expects a string payload.

Example: After the user maps their CSV columns to Contact fields, store Records in a flow variable and pass it to a Create Records element to bulk-create new Contacts in Salesforce.

Others

Output variable
Type
What it returns

Content Document Id

Text (String)

The Salesforce ID of the Content Document created when Save As Content Document is enabled. Use this to link the stored file to another record or to reference it in a downstream element.

Last updated

Was this helpful?