Kill the spreadsheet, build an app
Businesses seem to run on spreadsheets. Everywhere I look there is a spreadsheet to store this, a spreadsheet to calculate, that but in a lot of cases this just seems archaic to me. 

Spreadsheets are hard to share and collaborate on, tracking changes between staff can be problematic, you end up with multiple copies of the same spreadsheets, no granular security permissions, the potential for viruses... the list goes on.

Getting your data into Salesforce means you can benefit from all the features on the Salesforce platform: reporting, security, collaboration, tracking changes, ability to automate processes and track events and tasks on the records. My aim for this blog is to show you just how easy it is to import data into Salesforce and get working on it.

In the following example I'm going to create a recruiting application which stores a list of the positions I need to fill. If you don't want to so this in your Salesforce you can create a Sandbox or use the free developer edition version.

My positions spreadsheet looks like this:

Step12a - File to upload
TIP: Clicking any of the images will allow you to see a larger version


Step 1: Access the setup menu
Get into the Salesforce setup menu by clicking your name and then 'Setup'

 

 

Step2 - Add app buttonStep 2: Create a new application
Click the 'Add App' button. This starts the application creation wizard. 

 

Step3 - Add app creationStep 3:
You will be presented with the App quick start box. This allows you to create your application. Think of the app as a collection of spreadsheets and the label of the 'Main type of data' (also called an object) as the name of the spreadsheet. You can see how it's going to look in Salesforce as you type the app name and label. Then click 'Create'.

Click 'Go To My App' on the next page and bingo! You've created your first application in Salesforce!

Step5-blank - App selectedYou can see your application name in the top right corner (select this to go back to your normal Salesforce). You will also see along your tab bar your new tab 'Positions'.

Step5 - config TabStep 4: Adding a new field
We now need to add fields to our new object called 'Positions'. For each column in the spreadsheet we need to create a corresponding field in Salesforce. Make sure you're on the 'Positions' tab and click the triangle, it will pop open. Hover over the 'View fields' and click the '+ New' link.

 

Step8-blank - Add rich text fieldStep 5: Selecting the field type
You will now see a list of all the different types of fields you can have on an object. A couple of standard fields are automatically created when you create an object, one of those is an object name field so I'm going to use that as the 'Position Name' (you can change this to an incrementing number if you want). Now you need to create the other fields. First up is the 'Description' field so we can use one of the 'Text Area' fields for this.

Select 'Text Area (Rich)' and fill out the field label and help text details.

Click 'Next'.

Step 6: Field level security & Page layouts
The next two pages allow you to configure the access to your fields and which page layouts you want your field to appear on. I'm going to skip this but if you want to know more about security checkout Geraldine Gray's post on Salesforce Security.

Click 'Next' and then click 'Save'.

Step9 - Add picklist fieldStep 7: Creating the other fields
Now you need to create the other fields for the object. After clicking save you land on the objects configuration page. You can either click 'New' under 'Custom fields and relationships' and go back to step 5 and repeat, or go back to step 4 and repeat the steps. You just changing the field type each time:

  • 'Status' field (use a Picklist); See the screenshot but make sure you have Open value first in the list and then tick 'Use first value as default value'.
  • 'Number of Positions' field (use a Number field); Entering '1' in the default value field will mean every time a record is created the 'Number of Positions' will default to 1.

Step11 - Create new positionStep 8: Create a Position record using your new fields
Now we have the fields created click the 'Positions' tab.

Click 'New'.

Fill out the fields and click 'Save'.

You can now see your record as well as the other features from Salesforce. Logging a call, tracking tasks all against this position etc. Your object and fields will also be automatically available in Reporting. You can also extend it to say which fields are required and/or changes tracked etc.

Congratulations you now have a running Salesforce application!

 

Step12 - Import Setup menuStep 9: Importing your Spreadsheet data into your 'Positions' object 
The final couple of steps! There are two main ways to import data into Salesforce: via the Salesforce Import wizard or via the Salesforce Data Loader (if you have Enterprise edition or above). Both have advantages and disadvantages. The Data Loader allows you to upload a vast amount of data but doesn't allow de-duplication. The import wizard allows de-duplication but you can only upload a maximum of 50,000 records. For more information on the differences take a look at this presentation.

For this example I'm going to use the Import Wizard.

Go into the setup menu again (step 1).

Type in 'import' into the search box at the top of the setup menu and click the 'Import Custom Objects' link.

Step13 - Select the objectStep 10: The Salesforce Import Wizard
Have a quick read of the notes displayed and when you're ready:

Click 'Start the Import Wizard' link.

Depending on how many other custom objects you have you may have a list but hunt out the 'Position' object, select it and click 'Next'.

Step14 - Dedupe or createStep 11: Preventing duplicates
As we are doing an initial import of data so we don't need to worry duplicates, keep the defaults and click 'Next'.

 

Step 12: Specifying Relationships
The relationships page allows you to link the records we are uploading with records already within Salesforce (users, accounts, contacts, custom objects etc), as we haven't created any of these lookup fields on our object keep the defaults and click 'Next'.

Step16 - Browse to fileStep 13: Selecting the file to upload
I always make sure that the column names in my spreadsheet are the same as the field names in Salesforce. I also run a quick test with only a handful of records just to test everything is uploading ok. If your using Microsoft Excel, Calc Open Office or another application make sure you save your file as CSV or "Comma seperated values" otherwise the upload will fail. Once you have clicked browse to find your CSV file (you can usually accept the defaults) and click 'Next'.

Step17 - Field mappingStep 14: Field Mappings
If you have the same column names in your spreadsheet as in Salesforce this is an easy page, just check that the field in your spreadsheet maps to the correct field in Salesforce and click 'Next'.

 

Step18 - Import Verification owner issueStep 15: Import Verification
This page part of the wizard just verifies your configuration is ok. As we didn't have a field in the spreadsheet for the record owner this will give a warning that all records will be assigned to you.


Step19---Import-in-queueClick 'Import Now' and then 'Finish' and your done!

Salesforce then queues your data load and will email you when the data load is complete.

Want to learn more?
A good video is 'Force.com Workflow and Approvals Demo' for adding automation and approvals to your object. Otherwise checkout the Salesforce developer site.

Hope you found this blog useful, if you have any questions you can post a question on the Community Answers board.