Skip to content

Enabling CSV Upload

The extension allows for uploading data from CSV files to an arbitrary Salesforce object.

Setting up the CSV upload page involves the following tasks:

Assigning CSV Upload Page

You must add the ONBSE1.UploadCSV Visualforce page to your site to expose the account statement display.

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. In the Site Visualforce Pages section, click Edit.

  3. Add the ONBSE1.UploadCSV page.
  4. Click Save.

Configuring Data Upload

The upload is configured via the custom metadata type CSV Upload Settings.

The most relevant settings include the field Target, which specifies the sObject target object, and the the field Mapping, which specifies the mapping from the CSV columns to the target object fields.

In addition, you can write the account and contact data from the login session to the target object. To this end, set the values for Account Field and Contact Field to the field API name of the corresponding target object.

Field Required Possible Values Description
Active true|false Determines whether the configuration is available in the UI.
Target API name of an sObject Determines the target sObject for the upload.
Account Field API name of an sObject field Determines the target field for the login session account value.
Contact Field API name of an sObject field Determines the target field for the login session contact value.
Mapping map in JSON format Mapping from CSV row to sObject API field name.
Parse Chunk Size size in Bytes Determines the chunk size for reading from the input file on client side. Default is 10 MB.
Upload Scope number of records Determines the number of Salesforce records that are uploaded to the server in one step, defaults to 100.
Delimiter delimiter character Allows to overwrite the automatic delimiter detection of the parser.

Info

If Multi-Currency Support is enabled, use CurrencyISOCode as target field name for the currency ISO code.

Data mapping example
{
  "Total Amount" : "Amount__c",
  "Start Date" : "Date__c",
  "Currency" : "CurrencyISOCode",
  "Info" : "Text__c"
}

Note

You must create at least one CSV Upload Settings record. Otherwise, the CSV upload page is not displayed.

To edit the custom metadata type CSV Upload Settings:

  1. In Setup, open Custom Metadata Types.

    In Salesforce Lightning, navigate to Custom Code > Custom Metadata Types.

    In Salesforce Classic, navigate to Develop > Custom Metadata Types.

  2. Click Manage Records in the row of CSV Upload Settings.

  3. Click New, or click Edit to modify an existing custom metadata record.
  4. Specify the information as necessary.
  5. Click Save.

Info

You can create multiple CSV upload settings to support different data upload scenarios. Note that in this case, JustOn always uses the first active setting found, so make sure to activate/deactivate the settings as necessary.

Configuring Target Object Permissions

The upload requires Read, Create, Edit and Delete permissions for the target object as well as Edit access for all fields that are specified by the CSV Upload Settings.

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. Click Public Access Settings to open the site profile.

  3. In the Original Profile User Interface, click Edit.

    If you use the Enhanced Profile User Interface, click Object Settings > Target Object > Edit.

  4. Enable the object permission settings Read, Create, Edit and Delete to the target object, and the enable the field permission Edit Access for all required fields.

  5. Click Save.

Adjusting CSV Upload Page Labels

The Visualforce pages packaged with the JustOn Self-Service Extension make use of custom labels. The custom labels can contain up to 1000 characters and can include HTML markup.

You can overwrite the custom labels to adjust them to the needs of your business use cases.

Note

To modify custom labels, you must enable the Translation Workbench. For details, see Enable and Disable the Translation Workbench in the Salesforce Help.

The account statement page uses the following custom labels:

  • CSVUploadTeaser
  • CSVUploadNoSettings
  • CSVUploadInvalidTarget
  • CSVUploadInvalidData
  • CSVUploadNoMappedData
  • CSVUploadCheckDelimiter
  • CSVUploadSetValueError
  • CSVUpload
  • CSVUploadSelectFile
  • CSVUploadSkipFirstHelp
  • CSVUploadSkipFirst
  • CSVStartUpload
  • CSVUploadStarting
  • CSVUploadSuccessful
  • CSVUploadInProgress
  • CSVUploadError
  • CSVParseError
  • CSVFileError
  • CSVUploadFailedAtLine
  • CSVUploadWarnClose
  • CSVUploadFinePrint
  • PleaseSelectFile
  • PleaseSelectOnlyOneFile
  • NoValidNumber

To modify them:

  1. In Setup, open the Custom Labels list.

    In Salesforce Lightning, navigate to User Interface > Custom Labels.

    In Salesforce Classic, navigate to Create > Custom Labels.

  2. Click the name of the label you want to modify.

    To better find the relevant labels, create a filter for the namespace ONBSE1.

  3. Click New Local Translations/Overrides.

  4. Select the target language and specify the text as required.
  5. Click Save.

Info

For help about modifying custom labels, see Create and Edit Custom Labels in the Salesforce Help.

Note

Set the locale in the global settings in order to select the intended translation.