Multilingual Data Import into Salesforce Made Easy
If you have been working on Salesforce for a while, you will agree with me that no matter what application you build, importing large amount of data in Salesforce comes with its own set of challenges. This problem is compounded when you need to import multilingual data, and you can only imagine the magnitude of the problem when you are importing large amount of multilingual data!
My David vs. Goliath moment
I had this feeling last week, when I needed to important approximately 60,000 records in…hold your breath…five different languages: Vietnamese, Cantonese, Thai, Japanese and Korean! These languages have special Unicode characters, making my already unenviable task even more cumbersome. Some of my peers sympathized, some even sniggered!
What’s the big deal, eh?
To say that importing Unicode characters is difficult would probably be the understatement of 2015! The normal data import process of using Data Loader or the use of native Salesforce Import/Export Wizard does not work directly in an efficient manner for multilingual data, especially for Unicode characters. You can still import data in Salesforce using either of these approaches. However, most of the Unicode characters are converted into #,? and other random characters, thereby compromising the correctness of data imported.
So how did I wade through this labyrinth?
Keep it Handy!
Before I take you through this easy 6-step process, there’s one thing you’ll need ready with you: an Excel worksheet consisting of the multilingual data containing the Asian characters that you need imported in Salesforce.
Solving the Maze
- Save the Excel data sheet containing multilingual data as a file. For the purpose of this demonstration, I have named it Unicode Text.xls
- Open the file created in step 1 with Notepad
- In Notepad, navigate to File > Save As. Check if the popup shown has an option to set the ‘File Encoding’. If it does, change the encoding to UTF-8. If it doesn’t have an option that says UTF-8, then you have an older version of Notepad that doesn’t support this option. Here you would end up saving it as UTF-16 which can also be imported by Salesforce.
- Ensure the filename has ‘.csv’ as its extension in its name and the “Save as Type” has “All Files” selected in the dropdown. Save the file.
- Using Import Wizard/Data Loader, import the file created in step 4 into Salesforce. Select your file to Import and the Encoding in the drop down list. This could be either in UTF-8 or UTF-16 format, depending on the selection you used while saving the CSV files.
- Check the log. Although the .CSV file was not comma delimited, Salesforce is able to import it properly. The characters now show up accurately in Salesforce.
To give you a perspective, I have included snapshots of how it appears within Salesforce with and without encoding.
What a wonderful thing encoding is, isn’t it? So go on, try this out. I am sure all those sleepless nights when your imported data turned out to be totally screwed up will be a thing of past now!