1. Learning Objectives
So now we’re going to take a look at data management, specifically how we get data into salesforce and how we pull data out, as well as the features within salesforce that can help us mass-transfer records and things like that. So what we’re going to look at is we’re going to describe the considerations for when you import, update, and transfer data in Salesforce and the implications of doing that. Also, we’re going to look at the different tools that we can use to get data in and out of salesforce and, based on different scenarios, determine which ones will be best.
We’re also going to look at the implications of using data validation rules in Salesforce and how that could affect our data. We’re then going to take a look at duplicate and matching rules within Salesforce, which are in Salesforce’s GD Duping Tool, and again see how that could impact importing data into of salesforce. Then we’re going to describe the different ways that you can backup data within Salesforce, and then the final step will be looking at Salesforce content and the capabilities of that. So I look forward to seeing you in the next video.
2. Duplicate Management
So now we’re going to take a look at managing duplicate records in Salesforce. So it’s part of our data management piece. So we’re going to take a look at Salesforce’s internal JUP management tool. So let’s take a look at it now. So here I am in the Salesforce setup, and I’m just going to search for duplicates. There’s duplicate management, and you can see that we have matching rules and duplicate rules. So this is basically a Salesforce tool to stop people or alert people if they’re trying to create a duplicate record somewhere in Salesforce. And you can set up rules to warn them or stop them from creating that duplicate. So I’m going to go into duplicate rules here.
And now I’m just going to create a new rule. So at the moment, the rule will work on both custom objects and these standard objects. So we have account, contact, and lead, as well as this invoice and invoice product custom object that I’ve created. But I’m going to create mine on the contact object. So I’m going to click Contact, and then you’ll be shown this screen. So I’m going to name my rule “Contact duplicate Rule One,” which will apply to users of duplicate contact records. That’s my description of what this rule does. It shows that, yeah, it’s on the contact object. So what we’re saying for record-level security is that when Salesforce does a check to see if a duplicate record can be found, does it search all the records in Salesforce regardless of the security of the user? Or are we just looking at the records that that user has access to?
So if you say enforce sharing rules, that’s telling Salesforce that when the user creates the record, only search for the records that that user has access to, but potentially that will create a duplicate if they’re creating a record that has another corresponding record that they don’t have access to. Alternatively, you can circumvent the sharing rules, which essentially state that Salesforce should keep all records in Salesforce regardless of whether the user has access to them, and notify them if there is a record somewhere in the system.
So I’m just going to say “bypass” the sharing rules because, to me, that makes a bit more sense. And then we go on to the actions. So the actions define what to do when the user creates or edits a record and that record matches another corresponding record, or potentially many records within Salesforce. And you’ve basically got two options in this drop-down menu. You’ve got Allow, which essentially just gives the user an alert but allows them to then override that and create the record.
And here we’ve got two options. We’ve got the option to actually alert the user. If we turn that off, the user is not alerted. But you can basically have this checked, which would log that they’ve created a duplicate record in Salesforce but that the user was not alerted in any way. So we can just keep alerts on and report off, or just report on, or whichever combination you like. But the Allow option essentially allows users to override that duplicate and create a new one. Potentially, the other option you have is to block. Now blocking stops the user entirely from creating a record, so this will warn that there’s a duplicate record there and not allow them to create a new one. So the report option has actually disappeared because the report is not tracking how many times the user has found a duplicate. It’s reporting. When a user overrides the duplicate warning and creates a duplicate record, then we have the alert text, which is the text that you want to display to the user to warn them that they’re potentially creating a duplicate record. And then that’s basically the end of what happens when a user creates a duplicate record or potentially tries to create a duplicate record.
And next is how the matching is going to work. So what records are we going to match on so that we can throw the alert? We could have different fields that you want to match on or different rules and objects you want to look at to find that matching rule. So I’m just going to say on create, I’m just going to say allow and alert that back so we can see how it works, and then we’ve got to say, “Okay, what are we going to match with?” So this user is creating a contact, but potentially, we don’t have to look at other contact records. We could match against accounts or potentially warm leads. So we could be creating a contact, but actually it would warn them that a lead already exists for this user and maybe that they have to close that lead off before they create the contact or something like that.
If you want to kind of deduce your leads as users are creating contacts, I’m going to keep it on the contacts, and then we’ve got the matching rule that we can use. Now Salesforce has a standard contact matching rule that does a fuzzy match on the name of the user and emails and things like that, or we can create a brand new matching rule, so we’re going to create a brand new matching rule, so I’m going to save my duplicate rule and come back to it. So here, I’m just going to match on email address, and I want to say there needs to be an exact match, and I don’t want to match blank fields. Then also, I’m going to look at the contacts’ names. There it is, the first name, and actually I’m going to use a fuzzy match on this, and finally I’m going to do the last name as well, and I’m going to do a fuzzy match on that. And what the fuzzy matching is essentially saying is that if I put in the name John Spelt, I’ll find a match on J-O-N as well.
So it’s these various types of names that could have been entered incorrectly into your salesforce.org. And you can create these mappings if you want as well, but I’m just going to use the internal ones for the first name and last name. And I’ve got an exact match on email as well, so I’m going to save this as my matching rule. There it is. And it’s created the matching rule, as well as the filter logic. Actually, I didn’t mention that. So we’ll just dive in there. If you add the filter logic now, it tells you if the email is an exact match and the first and last names are fuzzy. So I’m actually going to change that to “or two and three.” So it’s going to say if the email is an exact match, then throughout there is an error, or if the first name and last name have a fuzzy match on them. So I’m going to click save on that.
Now I’m going to go back to my duplicate rule. So I’ve just created that. So I’m going to go back to my duplicate rule. So this little warning is basically saying that I haven’t activated this matching rule. So if I go back to the matching rule, we just need to click activate. So it’s inactive at the moment. So I’m going to click “activate,” and then it’s going to send me an email when it’s kind of indexed all the data in there so that the matching rule works. So it actually made it active immediately. So that’s great. So I’m going to dive back into my duplicate rule. Yes, there’s a nice green tick in there. So that’s good. And you can see that, actually, this isn’t active yet because we still need to edit it. So I’m going to edit. So, let us return to our duplicate rule. We filled in all this information in.I’ve got my custom matching rule that I’ve created, and this is the logic that we created. So the contact email is an exact match, or the first name is a fuzzy match with the first name field, and the last name is a fuzzy match with the last name field, which all sounds good. And then finally, we’ve got conditions. So, given the conditions, we can exclude, for example, profiles or users from this. So I could potentially say that if the current user’s profile equals that of the system administrator, then don’t allow this to work. So if it’s not equal to the system administrator, then it’s going to run this rule. So the system administrator can potentially override the rules and just create duplicates as much as they like, or not, as the case may be. And you could create a whole host of different duplicate rules for different types of users. So, for example, I do this where the system administrator gets alerted that they’re creating duplicates, but they can override it.
But then a user could potentially be blocked entirely. As a result, we have super users who can potentially override and create duplicates, but regular users are blocked. So it’s a little bit of an approval process before the record gets created. But I’m going to leave that out for now; otherwise, it’s not going to work when I test it. The only other thing is this matching rule. You can add additional matching rules. Now this is really handy if you want to match across different objects. So I kind of mentioned earlier that you could potentially match this contact against the leads, but we could also do a match against other contacts as well as leads. So I could add another rule for leads, and now when the user creates a contact record, it will match not only with contacts, but also with leads. And then we’ve got essentially a lead mapping here to map those fields between the contact we’re creating and the lead that we’re mapping.
So if I click on this now, you can see here are all the lead fields, and here are all the contact fields. Now this is really useful if you’ve got custom fields on your lead and potentially custom fields on your contact, and you want to just use those fields to create the match. But I’m going to ignore that. Keep it nice and simple. So I think that’s about it. So we’ve created the name. We’ve said that it’s going to bypass the sharing rules and see all data within Salesforce. We’ve said we’re going to alert the user on create, so they’re going to allow them to override it. They’re going to get an alert, and if they do override it, it will get logged in Salesforce so you can report it, and then on Edit, I’m going to allow it. And actually, I’m going to report if they do make a duplicate, but it’s not going to alert them. So I can take a look, and I think that’s about it. We have our matching rules in place, so it will match when the contact is created or edited. It’s going to match on these fields, which all look good to me. And we haven’t got any conditions to stop this from working. Okay, click “Save.” So there we go. There we have it. So I’m going to activate that. So now it is activated. So I’m just going to dive back into my rule list. Yes, that’s active. That’s all well and good. And now let’s create our contact. So let’s take a look at somebody. So let’s say Sean.
Okay, this guy seems good. So I’m going to try and create a contact, and let’s see what happens. So I’m creating an employee; give it the email. So I’m giving it the same email. So this should match the email, but I’m going to give it a Jeff B. So now it should match on the email when I click save, and sure enough, it has. It said, “Hey, duplicate detection.” And as you can see here, it’s a duplicate. So you can see the list of records here that it’s duplicated on. So it’s only found one, and it’s giving me the warning. It hasn’t stopped me from creating that record because, then, I can actually save and ignore this record or I can save and create a new one. So I’m just going to save it and ignore it. So it’s now created that duplicate record, but now that I’ve created that, I’m going to create another record, basically using the same method, but changing this guy’s name to John B, and let’s show you that fuzzy matching.
So I’ve got John B there, and I make a new record, but this time I’ll call it JonB and use a different email address. Now this should do a fuzzy match on the name and match the j. So let’s give that a go. Sure enough, it has. So, Joe E. O. N., you can see that it found a match on my John record. And you can see now that fuzzy matching is working well because the email address is completely different. So that is basically duplicating the rules. There’s not a lot to it; you really just need to know the concepts of what it does. So it can basically stop a user from creating a record. You can log if they’ve overridden that, and it’s basically for duplicate management and can be used across accounts, contacts, leads, and custom objects. but that’s about it. So if you do have any questions, be sure to throw them in the chat. Otherwise, I’ll see you in the next video.
3. Methods for Importing Data
So now let’s take a look at the methods for importing data into Salesforce. Now, Salesforce basically has two tools that allow you to bring data into Salesforce. One is the import wizard, and the other is the data loader. Now you must understand the differences between the Import wizard and the data loader, as they may appear on the exam when Salesforce asks you scenario-based questions about which tools or features you want to use when importing data, creating data in Salesforce, deleting data, and so on. So these are my breakdowns of the import wizard and data loader. Now, the import wizard is first accessible from inside Salesforce. So you can navigate to the import wizard and upload your data from within Salesforce. But you need to download and actually install the data loader on your computer. Now there are two different versions.
There’s a Windows version and a Mac version that you can install. I actually use the Mac version, but if you’re using the Windows version, it’s exactly the same. It does kind of have the same kind of concept, and we’ll go into more detail about how they work in a later video. However, this is only a high-level overview of the differences. Now, the main difference is that one application is through the web interface, and the other is the number of records you can essentially use to upload into Salesforce. So the Import Wizard only allows you to upload 50,000 records. Any more than that, and you just can’t upload them. But the data loader allows you to do a lot more uploads of records. You can actually do up to 5 million records in one data-loaded job. And also, the data loader actually supports a number of different things.
Now, the import wizard literally allows you just to import data into Salesforce, but the data loader allows you to do other operations. So you can actually delete records in there; you can update records; you can also upend records as well as insert records. But we’ll go into that in a little more detail later on. You can also access more objects within the data loader. The Import Wizard really limits you to a couple of standard Salesforce objects and then your custom objects. So there are things like cases, opportunities, contracts, and those kinds of standard objects in Salesforce that you can’t use when you’re importing data using the Import Wizard.
So if you ever need to import data using something other than the standard couple of objects that it supports, then you need to use the data loader. But we’ll show you that when we come through the Import Wizard video a bit later on. Then the next one is scheduling. Yes, you can create a data loader schedule now that you have this. That is, you can set it up so that every night at 2:00 a.m., all of my account objects are downloaded from Salesforce so that I can get a backup. For example. Now you can do it in Data Loader, but it is a little bit fiddly. You have to kind of mess around with text files and other things and configuration files to get it done. But for the exam, you can do it in Data Loader, and Import Wizard doesn’t allow you to do that. It’s literally just a web interface.
You fill out the information that you need to upload your CSV file with the data contained in it, and it will process it, and that’s it. There is no way to schedule recurring operations like you can with Data Loader, but we do have the prevent duplicates feature. According to Salesforce, Data Loader does not prevent duplicates while Import Wizard does. Finally, data is exported for backup. Import wizard, it’s an import wizard, and you can only import data, whereas Data Loader allows you to insert data, export data, delete data, and do a lot more with it, as well as use a much larger number of records. So essentially, this is the high level of what the differences are that you need to know for the exam.
So you might get questions about the number of records you need to upload, or you might get questions like, “Hey, you want to use Data Loader to do regular backups or prevent duplicates, or something like that.” So just make sure you understand this for the exam. The other part of data import is no longer required to be entered by the Him bought Wizard or Data Loader. You can actually use partner apps to get data into Salesforce. Now, one of the popular ones is Data Loader IO, which is a website that you can use. Jitter Bit is quite a cool little app that is kind of like Data Loader but has a lot more functionality within it. So if you want to really properly schedule jobs, you can do so declaratively through Jitter Bit, which is quite cool. Excel is yet another cool app that is housed within Excel. So you can see your Salesforce data in Excel, make changes to it in Excel, and it kind of pushes it directly into Salesforce from within Excel, as well as pull data out and stuff like that.
And then finally there’s Informatics, which is another big tool that’s used. And also, I use Talend Open Studio, which is another tool you can use. Now, you don’t need to know these tools; you just need to understand that you could use a partner app to import, export, or do data manipulation within Salesforce. So not these specific tools, but there are tools out there to do it. So that’s essentially it. So if you do have any questions, give me a shout. Otherwise, I’ll see you in the next video.
4. Salesforce IDs and External IDs
Talk about salesforce IDs and external IDs. Now salesforce. IDs are essentially unique. Identifiers for a record in salesforce Every record has a Salesforce ID, and this allows you to update those records based on dataload or another tool outside of Salesforce. Because when you want to talk to Salesforce and say, “Hey, Salesforce, I want to update this record,” you’ve got to uniquely identify it to tell Salesforce which record to update because potentially there could be multiple. If you want to update, say, a record using somebody’s name, there could be multiple people with the same name. So you don’t want to update all those records, thinking that you’re only supposed to be updating one.
So you can use the Salesforce ID to update those records. So let’s dive in and take a look. So here I am on an opportunity in Salesforce, and if I dive up into the URL, you’ll see it says “EU Six Salesforce.com” and gives a crazy number. Now, it may be that your EU-6 is slightly different. It might be called something else, but you should be able to see an ID here. And this is the unique identifier for the particular record I’m on. So, if I want to update this record, say, with a data loader, I need to specify which fields I want to update. And I can say I want to update this opportunity record using the opportunity ID, which tells Salesforce that I want to uniquely update this one particular opportunity because potentially all the other information on this opportunity could be the same as other records.
So I want to really tell Salesforce only this record I want to update, and Salesforce will update it. When you want to create your own custom unique identifier, external IDs come into play. So it may be that you’ve got an invoice system outside of Salesforce, and your sales operations are coming in and creating these sales opportunities. It gets to the point where you’ve kind of won the deal, because this opportunity looks very much like an invoice. It has a total cost. You’ve got the product prices down, and when it gets to the one stage or you’ve won that opportunity, the salesperson may go off to the invoice system, which is an external different system, to create that invoice based on all of the same information on Salesforce.
Now, that’s great, but it might be that you want to visualise that invoice information within Salesforce and attach it to this opportunity so you can see if the client has actually paid the invoice and you can track that on the opportunity. But to do that, you want to suck the data out of your invoice system and push it into Salesforce. However, your billing system has no idea what an opportunity is. And Salesforce needs a unique identifier to say, “Hey, use this to update the information in Salesforce.” so because the invoice system doesn’t know what that is. What we can do is create an external field or a field on the opportunity, which is an external ID, which we can use to do this. So I’m going to dive over here. I’m going to create a new field on my opportunity. I’m going to scroll down, and I’m going to basically give it a text field. And I’m going to call this invoice number; give it a length of 20. And this is my unique invoice number. Now, as I mentioned earlier, you’ll notice that it says external ID.
So I’m going to click that, and as it says, “Set this field as a unique record identifier from an external system.” So what I’m doing here is I’m going to say that when the user Salesperson goes to create their invoice in that external system, I’m going to ask them to come back to Salesforce and just tap in what the invoice number is on the opportunity, and that then makes the link between the two systems. So now I can export data out of my invoice system and update any opportunity that matches the invoice number and not the salesforce ID. So it’s kind of like creating this unique identifier in Salesforce. The strange thing about this is that you just did it to make sure you ticked the unique box there so it doesn’t get confused. So you got the external ID and the unique identifier, and I clicked next to save that record. And now I have an invoice field on my opportunity. If we take a look at it, there it is: the invoice number.
So now if the salesperson dives in and creates whatever the invoice number is after they’ve created the invoice in the external system and clicks save, Now they’re ready for me to do a data load to update the information on this opportunity, which I’ll show you all about a bit later on. But essentially, this is the concept of external IDs and Salesforce IDs. You need to understand that a Salesforce ID is a unique identifier of a record in Salesforce. And an external ID can be used to update records if, potentially, a bit of information from an external system is used. But we’ll go through a lot more detail when we start using the data loader and start updating records within Salesforce. So if you do have any questions, give me a shout. Otherwise, I look forward to seeing you in the next video.
5. Data Loader
Now we’re going to take a look at the data loader. Now, the data loader is a client application that you need to download from Salesforce and install. But it does have a lot of cool functionality. As we mentioned in the previous video, you can upload and delete far more records than the wizard allows. So let’s take a look at it and see how we can install it. So here I am with my setup in Salesforce.
So all you need to do is search for “data loader” in the menu, and you get an option for the Mac and Windows data loaders. So I’m on a Mac computer, so I’m going to choose the Mac version. It’s going to download and start to install. There it goes, just opening it up. And then I’m just going to drag and drop it into my applications. There we go. It’s installed, and now I’m just going to search for it. There we go. It just gives me a warning that I downloaded something from the Internet, which I’m happy with. So I’m going to click open, and there we go. This is the data loader. As you can see, it has a bunch of buttons in the middle of it. And these are the actions that you can perform by pushing or pulling data into and out of Salesforce. Now the first one is insert.
So this allows us to insert records into Salesforce. So, in a moment, we’ll generate a CSV file and use it to insert records. Then we got the update. This now updates Salesforce records. But the important thing to understand about Data Loader versus the wizard is that Data Loader needs those Salesforce unique IDs so that it knows which records to update. So without those in your CSV file, which we’re going to kind of create in a bit, the records won’t get updated. Then we have the upset, which is a very cool little action. It essentially combines insert and update. So, if you pull an upset, salesforce will go on the hunt for the record. If it doesn’t exist based on the unique ID you’ve given it, then it’ll go and create it. But if it does find that record based on the ID, it’ll update it, which is quite cool. So it kind of does an insert or an update depending on if it finds the record based on the ID; if not, we have a delete, which is pretty obvious.
It deletes records in Salesforce. But again, you need to have the IDs of the records that you want to delete. So you give Salesforce the list of all the IDs, and Salesforce will go and delete those records. Now we’ve got hard deletion. Now you can see here that it’s greyed out. That’s based on the security within Salesforce. And hard delete is slightly different from regular delete. And what happens when you delete a record in Salesforce? If it is placed in the recycle bin, up to a certain number of records will be included. But using the hard delete, it will basically skip the recycle bin and actually physically delete that record. So there’s no way of getting it back by using the recycle bin in Salesforce because it just won’t be in it. So that’s why it’s greyed out. So it’s really a security feature, because you should just delete them on a regular basis.
And if you make a mistake, you can always go into the recycle bin and recover them as long as they are still in the recycle bin. Then there’s Export, which allows us to export records from Salesforce as well as any fields that may be associated with them. And then we’ve got Export All, which is very similar to Export except that Export All will also export all those records that have been deleted or are still in the recycle bin. Now the recycle bin has a limit on the number of records that it can store there. So you won’t get all your deleted records back, but you will get a proportion of them back. So those are the options. So we’re going to start off by just exporting some data out of Salesforce to see what it looks like. So I’m going to click export. It then requests that I sign in to my account at salesforce.org. And there are two different ways you can login: either using OAuth or password authentication. Now, password authentication is the old way of logging in. Now we’ve got this new flashy OAuth, so keep it on OAuth. It’s the simplest way to do it. Then you need to pick your environment.
So there are basically two environments set up here. Production and sandbox are both options. Now if you’ve got a dev.org that we’ve created, so the dev.org that we created right at the beginning of the course, then you need to select production. But if you’ve heard of a sandbox and you’ve created one in the past, then you need to choose Sandbox if you want to log into sandbox organizations. But if you don’t know what they are, don’t worry; you don’t need to know that for the exam. So we’re going to select Production and click Login. It then displays a login box to me. So I’m going to log in, enter my password, and then click Login. This is an important screen. It’s basically saying I’m logging in using OAuth.
You may have seen a similar screen like this before, and it’s saying, “Well, what access do you want to give this app?” And you can see here that I’m giving access to my basic information, but also access to manage all the data in salesforce.org. So I’m basically giving permission for this app to access my basic information and all my data in my salesforce.org. So if you’re logging into apps online, then watch out for that because you’re potentially giving control of your account to another app on the Internet. So I’m going to allow that because I trust this app. And then it says, “Login successful.” So I’ve actually authenticated correctly in the app. And then we just click the next button at the bottom, and then we get a choice of which objects we want to export from our salesforce. Now this just shows you a short list of the objects. But if you want to show all the objects that you can potentially export, just click this box at the top, and it shows you literally loads and loads and loads of them. But I’m going to keep it simple and keep it unticked. And I’m just going to export all my accounts.
So I’m going to select my account object. I’m then going to select where I’m going to download it to, which is going to be here, export. I’m going to give it a name like “accounts” because that’s the object that I’m exporting from, and then click Save. So now it’s giving me a path to that export, and then I’m going to click next. So I’ve selected the object and selected where it’s going to extract that information from. And now I’m going to select the fields that I want from that object. So a really important one to take out is the ID field, which is the unique identifier for the record. So if we want to do any updates or deletes, we need this ID. Then I’m going to pick a handful of fields. So just type the name and possibly the billing address. You can see some additional fields that may not be visible on the UI or the Fax website or industry.
Yeah, I think that will do for now. And then on the right side, you can add conditions. So what we can say is that I only want to extract all those accounts that we’ve got active say.So this is a custom field because it says underscore, underscore C, so where that equals yes, And then I can click Add, and it adds the condition to this query that Data Loader is going to use to extract my data. But I don’t want to do that. So I’m going to clear all my conditions because I want to export all my records. When I’m satisfied, I’ll simply click “Finish,” and it will confirm. Are you absolutely sure you want to extract all this data? And I’m totally positive, so I’m going to click yes. It then extracts all the records. So you can see I’ve successfully extracted 13 records extracted.
And I can click “view extraction” here. And if I expand this out, you can see all the fields that I selected that have been pulled out, as well as this ID. And this is the unique identifier for each of these records. If you’re using the Windows app, you’ll notice another button down here that allows you to open this sheet in an external application.
So if you do click that, it’ll pop open in Excel, which is really handy. But unfortunately, the Mac version doesn’t have this. But I think that’s the only difference between the two versions of the app. So I’m happy with that. So I’m just going to close that, and I’m going to hit OK on that. And now we’ve extracted that data, so if I take a look to see where it is on my computer, So here is my extract. So if I double-click on that, it’ll open it in Excel because I have Excel installed on my computer, and we can see all the fields in here, but I’ve noticed that there are two accounts at the bottom here that don’t have any address or type information. So I’m actually going to fill those out now. So all I need you to do is confirm this.
So I’m going to select this ID, copy it, and if I just tap in the URL, it doesn’t matter if your instance is different from mine, but essentially whatever’s in the salesforce.com ID of the record, hit enter. And this is me looking at this record, and I can see, yeah, it’s hardly got any information on it at all. Naughty James, who probably created it in the first place, But anyway, I’m going to dive back into my record. So I’m going to update the information in this spreadsheet. So I know that the shire account is customer direct and the S Force is a channel. Also, I’m going to just type in the website account of shire.com, and I’m going to save that. Yes, I’m happy. Okay, so I’ve now saved that on my computer with the new fields filled out.
So we just confirmed that they’re not there. So, was this a type field and type yes, no blanks? It’s not there. So I’m going to go back to my data loader now. What you can do now is update your spreadsheet to only include the records that you’ve changed. So I’m going to delete all of these because someone could potentially use them. In the time it’s taken me to export this data and push the new data in, people may have changed these records. So I don’t want to overwrite their changes. I only want to update the records that I’ve just changed on this spreadsheet.
So I’m going to delete all the ones that are not relevant, just to leave me with the two that are relevant that I’ve updated. So I’m going to save verwrite Now I’m going to go back to my data loader, wherever it’s gone. Oh, there is a cloud. And now I’m going to use the Update command to update those records. So I’m going to click “update.” I’m going to choose the object that I want to update. So I’m going to update the account object, click Browse, and select that spreadsheet. Now make sure it is a CSV file, not an Excel file. So when you’re saving the file in Excel, make sure that when you go to file save as if you’re creating a new one from scratch, you’ve selected comma-separated values or somewhere where it says CSV. Don’t save it as an Excel spreadsheet; it won’t import properly. So make sure it’s CSV. But mine was originally exported as a CSV.
So I’m going to select that. I’m then going to click “Next.” Now confirm that the number of records shown here is the number of records in your spreadsheet, which it is. I’ve got two records here, which is brilliant. And now we need to map the field. So we’re mapping the fields that are in Salesforce to the Excel spreadsheet that we’ve just created. So I’m going to create, click to create, or edit a map. Now, here we have at the top all the fields in the Salesforce.org account object, and below we have all the columns of my spreadsheet.
Now, the most important field to map first is the ID field. So if I go to the ID field, I can drag and drop this in. And it has now created a mapping between the Salesforce field and my field in my spreadsheet. Now you can click “Auto Match Columns,” which is a lot easier. So I’m going to do that. And what that does is that Salesforce will look at the name of the field in Salesforce and the column name in your spreadsheet, and if they match, it’s going to make a match. So I’m going to click that instead of dragging and dropping.
And sure enough, there we go. All the fields are mapped. But actually, I know I’ve only updated the website and the type field, so actually I don’t need to change any of these other fields. So I’m actually going to drag these out because, again, I only want to update the things I’ve changed because if somebody’s potentially changed the billing address of one of these accounts, I’m going to overwrite it with the old billing address, which is not great. So I’m just going to pull that out, and I’m going to make sure I keep the ID field in because Salesforce needs the ID to know which field in which record it’s updating. but that looks about right. all faxes as well. I didn’t change Fax, so I’m going to pull that out as well.
Yes, that’s good. And I click OK, so now I’m updating the type and the website columns in my spreadsheet with the type and website fields in Salesforce, and I’m thinking of using the ID field to link the records. So I’m going to click next. I’m then going to select a directory for where the errors and successes of this data load are going to go. So I’m going to click Browse, and actually I’m going to create a new folder in here called SF Logs, and it’s going to store all the logs in that folder for every data load that I do from now on.
So it’s kind of handy. And then click “finish.” Am I happy to proceed? Yes. It’s then showing me the errors and the successes for that data load. So you can see here that I’ve got two successful updates and zero errors. So it looks like it’s worked fine. So if I click on “View Successes,” if I expand this out, I can see that the status column right at the very end says, “Yes, item updated, all good.” And if I look at the errors, you can see there are none, but at the end there’s a column for errors if you do get an error. So an important thing to understand is that for the errors in Salesforce, say I’m uploading 100 records and there’s an error on one of those records.
An error could be that Salesforce has a validation rule that prevents the record from being updated. Then Salesforce will return an error for that particular record, but all the other records will go in okay as long as there are no errors on those records as well. So it won’t kind of abort the entire transaction that you’re trying to make. It will just push in the ones it can, and if it gets any errors, it will display those back. And what I do is just view the error log, load that spreadsheet up, do the tweaks I need to clean up that data, and then re-upload those records again from the error log so I’m not uploading all the records again and again and again.
I keep doing that until all the records get in and they’re all successful. So now if we take a look at this record, actually, I think I’ve still got it do the tweakSo let’s refresh this page. So as you can see, the type has been updated to custom Direct and the website has been filled out as well, which is all good. And if I dive into the other record, that’s been updated as well, which is great. OK, so Upset does essentially the same thing, except you don’t need a field to match on. So you simply tell Salesforce which field to match on. But I won’t do that. But I am going to show you what a delete does. So I’ll click the delete button, select the account, but this time I’ll return to my spreadsheet, and I only want to delete this account for the Shire. And actually, I’m going to delete all these columns because Salesforce doesn’t need them; all it needs is the ID to perform a delete. So I’m just going to save that. Yes, I’m going to select the spreadsheet again. Oh, there are my logs. So you can load up the errors and successes from my previous attempts if necessary, but I’m going to select account again. Click next. Yes. One record.
Yes, that’s correct. It’s only got one column in the file. Click that auto-match button. Hit. OK, you can save the map. I never really do. I just make sure the columns in my spreadsheet are the same as the names of the fields in Salesforce; again, I just remember where my error log is located. So it’s going to log all the errors and successes, so I don’t need to update that again. And then I’m going to click “finish.” Yes. Proceed. Are you absolutely sure? And this is the warning. So, the number of records allowed in your recycle bin is limited. The action you’re about to take may cause irreversible data loss for records that may exist in your recycle bin.
Are you sure you wish to continue? And this is because the recycle bin has a limited number of records that it will remember that have been deleted. And if you delete more than the limit of those records, Salesforce will basically drop those old records and erase them completely, so you can’t get at them. So there you have it. And at the moment, I’m only deleting one record, so it’s fine. However, if you’re deleting a lot more than that, there could be a problem. Yes, go on that. And yes, it was successful. I didn’t get any arrows, which is good. I clicked OK on that. Now, if I dive in here and do a refresh, oh, that one is fine, but if I use the ID again for the one that I deleted, tap it in there. Oh, the record has been deleted, and I can’t access it. And there it is, if I look in my recycle bin. The account for the shire has been deleted.
Now, I’ve only got three records in here, so I haven’t reached my limit in terms of the number of records in here. So I know that nothing’s kind of dropped off the end, but if I click that and do an undelete, it’s going to restore that record. So if I come back here, copy that, and paste it into my URL again, we’re good to go. It’s been recovered. So if I did a hard delete and gave myself permission in my profile to do hard deletes, then I could essentially bypass the recycle bin, so I wouldn’t be able to undelete it and then export. We’ve already exported or would’ve exported this account as well after I deleted it and included any of the other accounts in the recycle bin. So that’s it for the data loader. You just need to understand the differences between the data loader and the wizard and what you can do in the data loader versus what you can do in the wizard. So if you do have any questions, be sure to ask a question in the comments. Otherwise, I’ll see you in the next video.
6. Import Wizard
The Data Import Wizard, where we’ll look at the differences between the Data Import Wizard and the data loader, as well as the new additional features that the Data Wizard provides that the data loader does not, and vice versa. So it’s probably best if we go through and do a test import. So now I’m in the setup. I’m just going to search now for wizard, and it comes up with the Data Import Wizard. So I’m going to select that, and this jumps into the Data Wizard. So here at the top of the wizard, you can see the recent import job.
So you can get a list of the different objects for which you’ve imported records, the records that were created, updated, or failed, and the start time and how long they took to process. The key is this section down here. There are four steps to getting your data into Salesforce. First is the preparation of cleaning up the data and making sure it’s compliant to get into Salesforce. Now, some common things are email addresses that are not in the correct format or you’ve got two email addresses in the same field, and things like this can trip the salesforce up. So you should do some sort of data cleansing before putting it into Salesforce, because bad data out of Salesforce is just bad data in Salesforce. Next is choosing the type of import that you want to do, so the object you want to select, then how it’s going to map together, and then finally, the data source. So, is it a CSV file, does it come from Outlook or act, and so on, as we’ll demonstrate in a moment?
And then, when you’ve got kind of all that in your mind, we just need to launch the wizard. So you click this big button here, and here we are in the wizard. Now the first thing that will probably be really evident is that it says you can import up to 50,000 records at a time, and that’s the limitation of the wizard. If you want to upload more than 50,000, then you need to use the Data Loader tool. You’ll also notice that when it says standard objects. These are the only objects that you can upload that are standard. So accounts and contacts, lead solutions, and campaign members If you want to upload to other objects, such as opportunities, solutions, and so on, you must use the data loader. You can also access all your custom objects. So I’ve got these two custom objects. I’ve created invoices and invoice products, but I’m going to upload some accounts and contacts in this example.
So I’m going to click here and then get the option of uploading new accounts, updating existing records, or adding new and updating existing records. So this is similar to the upset in dataloader, but it has some great additional features. So if we click there and open it up, you’ll see that it actually can match existing contacts and accounts, and that is how it will do the update. The data loader can only update IDs within Salesforce, whereas the wizard can update based on the name of the contact or the email of the contact. Similarly to the account, the data loader could only update if a salesforce ID was specified. But actually, in the wizard, you can insert or update records based on the name of the account, which is kind of cool. So, if I have a list of records that only have the account name or only have the contacts’ email addresses, Salesforce will check to see if that email address exists in your salesforce. And if it does, it will update the record instead of creating a new one. So that’s kind of cool. Then there are a couple of additional features. Now you can actually disable workflows and processes within Salesforce by just checking this box. Again, this is something you can’t do with a data loader.
With data loader, everything is fired: all the code in your system, all the workflows in your system, for that specific record, for that specific scenario. But with the wizard, you can bypass this by just ticking this box, and it’ll still fire the code and the validation rules. They’ll disable the workflow rules and the processes. Finally, you have the option to add all of these contacts to a campaign down here. And this is really handy because you could have gotten all these contacts from an event. Assume you have all of these email addresses and company names and want to import them all into SalesForce, but you want to tag them as if they all came from the same campaign or event. So that’s a really cool feature as well. And then finally, once you’ve set this up so I can just check, I’m going to match my contact’s email address rather than their name because email is more unique. And then you get to pick the data source that you want to import.
So I’m going to just use CSV. So I’m going to click there and then choose my file. So I’m actually going to choose my event contacts, and then I’m going to click Next. So we get all of the CSV header information here. So these are the columns in my CSV, and then this is Salesforce’s guess as to which fields they should map to within Salesforce. So you can see here that I picked the title as the contact title. Now, if I look at my data, it’s actually Mr. Miss and things like that. Now, that’s actually the wrong field for Salesforce. It isn’t a title; it should be “salutation.” So I’ll just scroll down here, select Salutation, and turn off the title. Now you can update two fields at the same time. So if I’ve kept these on, it will update the title field as well as the salutation. But I want to pick a salutation. So then that’s mapped to the correct field. And then you can see here that it’s got a little exclamation mark. Salesforce doesn’t know what this name field means. Is this the company name or the contact name? And as you can see from my example data that’s been pulled out of my CSV file, this is obviously the person’s name. So I’m going to change this to my contact name. Actually, untick that because that’s not the account name. Wiz down to my contact name. Yes, it has already been checked. So click okay; that’s all good.
Now my company name isn’t mapped, so Salesforce couldn’t find that mapping. So I’m going to click Map and just select the company name. Then we’re down here. Now I’m happy with the phone number and fax being updated for both the account and the contact. So I’m going to update both of them if they exist, and if they don’t exist, it’s going to just create them. So I’m happy with that. So I’m just going to leave it at that, and then I’m going to click next. Now it gives me an overview of what I’m mapping. So I’m going to create accounts and contacts. I’ll add new and update existing records as it finds them, and I’ll use the event contacts CSV. It then just marks out how many fields I’ve mapped and how many I haven’t. So I’ve actually mapped all of them, and then I clicked “Start Import.” There we go. And now it’s importing all those records. If I hit OK, it jumps to my bulk uploading, and I can see the status of it. So I just need to refresh this page and hopefully it will show “Oh, there we go, completed.” So it’s updated or inserted the seven records, and that is my request and result. So I did it exactly at 3:43 in the afternoon. Right.
So now, if I check my spreadsheet, this is the spreadsheet that I imported. So all these companies actually already exist within Salesforce, and these are the new ones. So these should have been updated if they needed to, and these should have been created. So, if I search for my new company right now, oh, there we go, we’ve got my new company and a contact, James Peterson. Yes, that was created. So if I have a look at the timestamps on these, if it’s 344, So that was created just a couple of minutes ago, and it’s created the contact underneath it and linked it to the account as well. So if I dive into the contact, I get the contact as well. And that email address filled out, which is brilliant. And it didn’t have any address information, so none of that was filled out. And again, if I search for another new company, we get the other new company that was created with a new timestamp a few minutes ago, as well as the two records that were created under that company. So I’ve got Sarah and Claire, which is Sarah and Claire.
That’s great. link to the right. It has received all of the email and contact information. You can also see if I double-click on it that the salutation is filled out, so it doesn’t populate this title field. So that’s something to look out for. Make sure you don’t get the title and salutation the wrong way around. But other than that, I think that looks all right, and that’s basically it. So the wizard is quite straightforward. You can import data. The main distinction is that you can only update up to 50,000 records at once. You can also disable the workflows if you need to, but you can also do this matching based on names, so the company name or the user’s email address, and update the records rather than constantly creating them, which is cool. And that’s essentially it—the differences. So make sure you kind of keep that in mind. You don’t really need to go into the detail of how it works; it’s more about the differences between the two and choosing the right solution for the right need. So if you do have any questions, be sure to slap them in the chat; otherwise, I’ll see you in the next video.