Import Data with Special Characters
You need to format the data, if your import file includes special characters. Follow the methods described in this topic to ensure that source data is properly parsed and imported by Sales and Fusion Service.
Build the CSV File
To build your CSV file for importing data:
-
Click
. -
On the Import Object Details page, click the Download icon to save the CSV template file for your object to your desktop.
-
You can edit the file to include only those fields that you import. For more information on using the import object template, see the topic Use Import Object Templates to Import Data.
Enter Data in the CSV File
After creating the CSV file, you must enter the data to be imported. Some of the special characters are quotation marks(") and a comma(,). You must prefix the special characters with quotation marks(").This list shows the different formats in which the input data can be entered for the Lead object CSV file and how it's interpreted due to the presence of special characters. LeadName and LeadNumber are the header fields for the file.
This table lists five Lead records of a CSV file, each with the LeadName first, followed by the LeadNumber (120, 121, and so on).
LeadName |
LeadNumber |
---|---|
Mark Twain lead |
120 |
"Twain "secondary" lead" |
121 |
Twain, Mark |
122 |
Twain, Mark "Spring 2015" lead |
123 |
"Twain "Fall 2014" lead |
124 |
You can use escape characters for the Lead Name source data records, as shown in this table.
Row Number |
Source Data for LeadName |
How LeadName is Written to Database if no Escape Characters are Added |
Data with Escape Characters to Preserve Original Data |
How LeadName is Written to Database When Escape Characters are Included |
Comment Regarding Escape Characters |
---|---|---|---|---|---|
1 |
Mark Twain lead |
Mark Twain lead |
Not applicable |
Not applicable |
No escape characters are needed as the source data contains no special characters. |
2 |
"Twain "secondary" lead" |
Twain secondary" lead" |
"""Twain ""secondary"" lead""",121 |
"Twain "secondary" lead" |
The two series of three quotation mark each:
|
3 |
Twain, Mark |
Twain |
"Twain, Mark",122 |
Twain, Mark |
Double quotation mark is required to surround the field entry, as a comma is in the source data. No additional escape character is required to precede the comma. |
4 |
Twain, Mark "Spring 2015" lead |
Twain |
"Twain, Mark ""Spring 2015"" lead",123 |
Twain, Mark "Spring 2015" lead |
A double quotation mark is required to surround the field entry, as at least one special character is present in the source data. Every double quotation mark in the source data requires a double quotation mark escape character. No additional escape character is required to precede the comma. |
5 |
"Twain "Fall 2014" lead |
Twain Fall 2014" lead |
"""Twain ""Fall 2014"" lead",124 |
"Twain "Fall 2014" lead |
Although the missing end quotation mark in the source data is likely a typo, the source data must be written as it appears. Enter three double quotation marks at the beginning, but only a single (surrounding) double quotation mark at the end. |
-
If the source data contains at least one special character, the field of source data must be entered in double quotation marks in the CSV file.
-
If the data for a field contains separator such as a comma (,), you must enclose the content within two double quotation marks.
-
If the first field has a special character at the beginning but not any matching special character at the end, the content of the second field will also be considered as part of the first field, and the second field is blank. You must provide a matching escape character.
-
If you don't precede the special characters by an escape character, the import process may write incorrect data for a field, or incorrectly write data to the subsequent fields.
When you import files with special characters, the special characters are converted into unreadable characters. You can resolve the issues by saving the import file in UTF-8 format.To save a file in UTF-8 format:
-
Choose File->Save as from the menu.
-
In the 'Save as type' drop down > select 'Text (Tab delimited) (*.txt)'
-
Select 'Web Options' in the 'Tools'
-
Select the 'Encoding' tab.
-
In the 'Save this document as:' drop down, select 'Unicode (UTF-8)'"
-
Click Save