top of page
Search
  • Writer's pictureLoren Christiansen

How to Use Salesforce Inspector to Import Data in Seconds



Have you ever been busy building a fancy new Salesforce flow or Lightning Component for your org, and a colleague or manager asks for help with a 'quick' data import? They just need all the contacts of a certain account tagged with a checkbox, or need to transfer ownership of a few hundred accounts because of a new hire. After some messages back and forth, you realize the shiny new piece of automation you've been working on is going to have to wait.


Importing data into Salesforce can be tricky because data requires precision. Spreadsheets need to be formatted just right, columns need to be mapped to exactly the right fields, and so on. Out of the box tools like the Data Import Wizard are great, but their slower speeds can become cumbersome after a while, especially once you've gotten familiar with the Salesforce data model and don't need your hand held.


Enter Salesforce Inspector(or "SF Inspector"). If you've never used it, you're missing out on a huge speed boost to your workflow. SF Inspector can do a lot more than import data, but that would take numerous posts to cover. For now we'll focus on how it can cut the time it takes to import data in half -- or more!



SF Inspector Basics

If you're using Chrome, get the extension here. If you're using Firefox, get it here. You'll know you've got it set up correctly if you have this blue box on the edge of your screen when you open your Salesforce org(note you may need to refresh the page):


Click on the blue box and you'll see a window to access some of the features of SF Inspector. In this post we'll be looking at 'Data Export' and 'Data Import'.


Data Export


If you know any SOQL, this button will make life a whole lot easier. Data Export is a super simple interface to run most SOQL queries against your live Org data. Note that this is only for SELECT statements, you can't execute any DML statements such as UPDATE or DELETE. You'll handle those in the next section, Data Import.


Once you have the Data Export window open, there's not much more to explain. That is, unless the term SOQL is confusing you! Enter your SOQL query in the text box at the top and hit 'Export' (or ctrl/cmd + enter) to see your results in a grid view below. Pay special attention to the copy buttons below the export button. If you need to move the data into a spreadsheet for some data manipulation, these are your friends.



There's a ton more to be said about Data Export. If you'd like to learn more, and especially if you'd like help learning SOQL, check out the section at the bottom of this post to see where you can get a free eBook all about SF Inspector.


Data Import


If you're in the Data Export page still, click on the blue box on the edge of the screen again and choose "Data Import." Here's where the magic happens. Select the correct Action from the drop down, and type in the API name of the object you're working with.


Copy & paste excel (or csv) data directly into the box labeled, "Data." If done correctly, your data should show up at the bottom of the screen. Each column header will appear on the right side of the screen under the 'Field Mapping' label. Make sure that the column headers of the data you're importing are field API names. If any of them aren't valid fields in your org, they'll be highlighted in red(see screenshot below). You can click in the red highlighted box and edit the spelling of the field name. The red highlight will disappear once it's a valid API name. This is a huge win - no need to restart the whole upload process just because a column header isn't exactly right. SF Inspector gives you immediate feedback on which API names aren't in your org, and you can change the mapping on the spot.


Those are the basics. You can click 'Import,' and your upload will process. Here are a few more tips:

  • If you are getting record locking errors, adjust the 'Batch Size' and 'Threads' fields. Decrease them until you stop getting the errors.

  • If you need to edit failed records before re-importing, use the 'Status' checkboxes to isolate only the failed records. Click on the 'Copy (Excel format)' button and paste into your favorite spreadsheet editor. This method can also be used to save a backup of successfully imported records.

  • Test carefully before using this in Production. There's no way to reverse a data import done this way, even if there are errors encountered! Ensure that you have formatted your data correctly and aren't violating any validation rules.

  • If you're doing an update or delete, you need the 18 digit ID of the records.


Example Import

Let's run through a quick example. Say you need to update a checkbox to true on all Accounts with an Industry of 'Agriculture.' This is probably overly simplistic, but it will showcase how SF Inspector enables you to work with data extremely quickly.

  1. Run this query in Data Export:

    1. SELECT Id, My_Checkbox__c FROM Account WHERE Industry='Agriculture'

  2. Hit the 'Copy (Excel Format)' button in Data Export, and paste the data into a spreadsheet editor(I'll use excel for this example).

  3. Change all of the cells in the My_Checkbox__c column (or whatever your field is called) to TRUE.

  4. Copy all of the data in Excel, including the ID column, and paste it into Data Import.

  5. Click 'Import,' and then 'Import' again to confirm the update.

That's it! You can use a similar process to update any field that you have edit permissions on.


Want to Learn More?

I love Salesforce Inspector. It has saved me more time than probably any other single piece of technology. I wrote an ebook (completely free) that goes into much more depth on SF Inspector than this post. If you'd like more information, go to the home page to get it. Again, totally free. I hope you enjoy it!


-Loren




































10 views0 comments
bottom of page