Getting started! Salesforce Superbadge here I come! |
As always, I printed the requirements and carefully read the instructions twice before diving into:
Challenge #1 - Data Import
The instructions provided specific items to address in the data import file, but I did not see any needed corrections. The states were all listed with the proper 2-digit abbreviations and the dates were already in a yyyy-mm-dd format. I did add a few columns to the spreadsheet in order to reserve space for the new Salesforce record ID's.
Hint: Before starting a import operation, think about the order of operations first- before attempting to restore data. I created columns in the spreadsheet to denote the order, with the column headers stating which record ID's were necessary.
I started with the easy data - no ID patching needed- using Salesforce's data import wizard and double checked the field mapping.
Field Mapping |
- Accounts/Contacts
- Hobbies
Injecting opportunities required the
record ID's of the accounts, so I used data loader to extract the ID's and inserted them into the spreadsheet. Once the data was patched, I used data loader to insert the opportunities.
record ID's of the accounts, so I used data loader to extract the ID's and inserted them into the spreadsheet. Once the data was patched, I used data loader to insert the opportunities.
Contract Hobbies required two Salesforce ID's. The data patching took time! I used data loader to extract the record ID's, then, after patching, used the data import wizard to insert.
Note: If there were more than 240 records in the Contract Hobbies object, I would have used a different approach. My mom's company, Capstorm, has two applications that would have made this process much faster. I would have used CopyStorm to backup the schema of my Salesforce into a relational database. I can insert the records into the database, then use CopyStorm/Restore to restore the records with relationships intact. No need to copy & paste! CopyStorm/Restore does the heavy lifting by restoring records in the correct order.
Contact Hobbies spreadsheet |
I have done same but error is
ReplyDeleteWhoops! We found at least one contact with a mailing state that is longer than two characters.
could find where i did wrong..
Here's how I would find the mailing state issue:
Delete- Use dataloader to extract the contact's "lastname", "firstname", "otherstate", and "mailing state"
- Then you can quickly scan the CSV to find the incorrect state - and manually make the record change.
You can also do a quick scan of the import file, but the contacts listed all have 2 digit state abbreviations. It is likely a contact that was pre-existing in the org as part of the pre-loaded data.
Let me know if this helps!
Hi Sid! This is a frustrating challenge! Here are the steps that I took. Let me know if this helps!
Delete1) Download the export file and open with excel. (You will have to save the excel file as a .CSV file in order to upload, but I kept the original excel spreadsheet open until the challenge was finished. I simply saved the .CSV with a different name.)
2) On the tab with accounts, insert a column to store the AccountID.
3) On the tab with Contact Hobbies, insert a column to store the ContactID and HobbyID.
4) Use the Salesforce data import wizard to insert the accounts & contacts.
5) Use the data import wizard to insert the hobbies.
6) breathe. Almost there!
7) Use data loader (not the data import wizard) to extract the AccountID's. (Plus the account names so that you can match the ID's with the names.)
8) Insert the AccountID's into the spreadsheet. Opportunities must be associated with accounts, so the AccountID's allow Salesforce to link the objects. Then, use data loader to upload the opportunities.
9) For Contact Hobbies, extract the ContactID / Contact Name and HobbyID / Hobby Name using data loader & patch these values into the excel file. Then, upload with data loader.
10) Have a beer. (Or apple juice if you are closer to me in age.)
How do I insert Account Id in to spreadsheet?
DeleteYou extract the accountID's via data loader... then open the file that data loader provides with a spreadsheet program like Excel, OpenOffice, or GoogleSheets. Next, copy/paste the appropriate ID's into your original data import spreadsheet.
DeleteOf course, you will also want to extract the record names as well as the ID's so that you know which ID matches which account name.
Make sense?
This comment has been removed by the author.
DeleteHello, I am completely lost. there is a field called Account ID in Opportunity Object. Is that filed you are referring to? If yes then How would I know which Id belongs top which Account?
DeleteI dnt see a Account name option in Opportunity object. Please help me out I been working
on it for 4 hours.
Before you go further in this challenge, I recommend doing this Trailhead project:
DeleteImport and Export with Data Management Tools.
This project explains the basic of using data loader for import / export operations.
I also recommend the Data Management module.
You can also reference Salesforce Knowledge Article: 000003141
(Import Opportunities into Salesforce)
Hello,
DeleteI did those module before. The only thing I am not able to understand when I Export the Account IDs from Opportunity Object They are numbers not the actual account names so If
I patch them how would I know which ID belongs to which Account name. Please explain.
I am stuck at this step.
Hello,
DeleteI did those module before. The only thing I am not able to understand when I Export the Account IDs from Opportunity Object They are numbers not the actual account names so If
I patch them how would I know which ID belongs to which Account name. Please explain.
I am stuck at this step.
Extract the account name field along with the accountID field. Then you will know which ID goes with which record. You can extract multiple fields at one time.
DeleteHi Sid,
ReplyDeleteAre you asking how to perform steps 7-8? I can definitely help, but I do not understand the question. Could you provide additional detail?
To what should contact id and account id mapped to in data import wizard
ReplyDeleteThe accountID is needed to insert the opportunities. This will map to the accountID of the existing account within Salesforce. Each individual record is assigned a unique accountID in Salesforce. The accountID allows the opportunity to be matched to the account. Articles to reference:
ReplyDeletehttps://help.salesforce.com/articleView?id=000003141&type=1
The HobbyID and the ContactID are needed to specify the master/detail relationships for the Contact Hobby upload. You select to match on Salesforce.com ID on the second page of the data import wizard. (The same block of text where you select to "add new records.")
I am having issue with step 8)
ReplyDelete"Insert the AccountID's into the spreadsheet. Opportunities must be associated with accounts, so the AccountID's allow Salesforce to link the objects. Then, use data loader to upload the opportunities".
Can you please elaborate what you mean by inserting the account ID's in spreadsheet. i was able to follow along up to this point
Sure! Each account record in Salesforce will have a unique record ID. For example- Account "A" may be assigned record ID 00113001234zEAD - a random collection of letters and numbers. This is how the record is identified within Salesforce. If you want to view the record ID for any record within Salesforce, it is the block of letters following " my.salesforce.com/ ". The record ID's for the accounts are used when you upload opportunities, to identify that "opportunity B" belongs with "account A." To match them, use data loader to extract the account ID's and another identifier, such as account name. You will get a file that lists account names and account id's. Open the originally data import spreadsheet, and insert a new column after the account name column. Name this column "AccountID." Use the data loader extract to copy / paste the correct accountID's next to the name of each account on the data import spreadsheet. Save the spreadsheet as a .CSV file, and use data loader to import the opportunities. Note- You will have to use data loader, NOT the data import wizard. The data import wizard can not (currently!) import opportunities.
DeleteIf you need additional help, send a screenshot to: rebecca@capstorm.com (My mom's work email) or send a message on the Salesforce Success Community @RebeccaGray (The Rebecca Gray profile that is a Salesforce User Group leader and has 102 Trailhead badges.)
I am glad that you figured it out! Congrats!
DeleteHi,
DeleteVery useful blog. I am really stuck on the Opportunity import. I exported the account IDs correctly and added them in a new column to create a file ready for Import using DataLoader. But the import always fails.
I am sure I am not mapping the fields correctly. I have 3 fields that need to be mapped, Account Name, Account ID, and Opportunity Name. I just cant seem to find the right mix to make the import work. Any tips?
Are you still stuck? I'm back from a little vacation and catching up on comments.
DeleteIf so, are you getting a specific error message from data loader?
I'm happy to take a look at your mappings if you would share them.
Hi,
ReplyDeleteHow do I insert Account ID in to spreadsheet after I extract them from salesforce?
how do we patch values in to Excel file?
ReplyDeleteCopy / paste. Insert a column as shown in the blog post then copy and paste the appropriate accountid next to the account name.
ReplyDeletesame thing for the Contact hobbies? Copy and Paste Or Vlookup?
ReplyDeleteSame thing for the Contact hobbies ? Copy and Paste or Vlookup?
ReplyDeleteI simply copied / pasted the values as this is a relatively small data set.
ReplyDeleteHello,
ReplyDeleteI am working on the Contact by Hobbies and Rating Report. When I add Rating field in Report It does not show the Picklist values Hot, Warm, Cold .
I already checked Picklist values are Activated, I assigned the colors to the values.
My Report is already showing details.
AM I missing anything?
Bareera- Next time, please leave a comment on the blog post related to your questions so that other can see. From the screenshot, Your report is showing a hyphen next to the rating field. I'd start by checking to make sure that each of the hobbies are assigned a rating.
DeleteAlso- Did you create/ use the custom report type?
DeleteNow that I am working on the Next Challenge "Create marketing dashboards in Salesforce Classic" I am keep getting this error message " Challenge Not yet complete... here's what's wrong:
DeleteThe Marketing Manager 'Type (with account rating)' component does not have either the correct chart type or report source."
I am sure I am getting this because Rating field does not showing picklist values with respective colors. I have already checked my Excel sheet each of the Account name and hobby has assigned a rating. I could not see any hyphen next to Rating field. I was searching around it says it may be because of the Record Type. But when I checked it does not show any Record type in Account so I can edit the picklist values for that Record type. Please help!!
This comment has been removed by the author.
ReplyDeleteDo we have to assign the rating to each hobby in excel sheet?
ReplyDeleteYes I did created the custom report type " Account with Contacts and Contact Hobbies"
ReplyDeleteOk so I was able to find the root cause of it. When I did import for some reason it Rating field was empty it did not populated with the values. I did pass the first challenge for data import but now it is causing a problem. I dnt want to do this all over again. There has to be way to populate this field. I did tried to export it and then fill the Rating field but when I import it Rating field is still empty. Please help!! I am only 1 challenge away to get this superbadge.
ReplyDeleteI wouldn't want to do the whole data import again either!
DeleteThere are two approaches:
1) Manually enter the ratings into the records - click on each record and pick the rating.
2) Extract the data that you need using data loader (I would guess that you would need "account name" and "accountid." Open the extract with a spreadsheet - fill in the rating field- then update the records with data loader, making sure that the "rating" column in your spreadsheet maps to the "rating" field in Salesforce. I remember that we went back and forth several times regarding the original import- so I would test this first in a new Trailhead Playground before pushing to the Playground that you are using for the Superbadge. (I'd hate for you to accidentally corrupt your data.)
Frankly, I'd take approach #1. I only see 112 total accounts, so manually associating the ratings would likely be faster if you are not totally confident with data loader.
Hello there...I have been able to accomplish everything except for step #8 related to the contact hobbies. I set up the excel sheet as you explained, but there is no way to patch BOTH hobby name/id AND contact name/id when uploading, so this is not working. How can I successfully upload the contact hobbies?
ReplyDeleteI believe that this upload uses only the hobbyID and the contactID.
Delete(I included the names in the spreadsheet for my own reference.)
If the wrong data is imported - ie - you need an ID but provide a name, data loader should give you an error message stating "ID value of incorrect record type."
First of all thank you for all that information Trailhead Baby! I have a quick question regarding the last step which is Contact Hobby part for you. You said that we need to have 4 columns namely, Contact Name, Contact ID (extract from data loader), Hobby and Hobby ID (Extracted from data loader). It is ok until this point, but when I try to upload the contact hobby object into the system, I cannot map the hobby ID. There is no option neither in the import wizard nor in the data loader. So, I am stuck here. Can you help me how can I map all these 4 columns in the wizard or in the data loader. Thank you very much.
ReplyDeleteYou will not need to map all 4 columns- just two. The hobby name and contact name are included in the spreadsheet as reference points, but you will only need to map the ID columns. (When you are in data loader, there are only two available fields for mapping- hobby__c and contact__c. Both of these should reference the ID's of the the records that already exist within Salesforce. The purpose of this upload is to tie the hobby record to the contact record. The data already exists in your org, but the data is not tied together. The upload provides the connection.
DeleteMake sense?
I am happy to help if you give this a try and are still having trouble!
Thank you for the prompt reply!
DeleteI did all steps (1-10) and created two custom objects `Hobby` and `Contact Hobby` also 2 master-detail relations (for contact and for the hobby) for `Contact Hobby` object and everything as you suggested above.
However, I still get the error mesage, it says:
`There was an unhandled exception. Please reference ID: HJZFOXJO. Error: Faraday::ClientError. Message: INVALID_TYPE: select id from Hobbies__c limit 100 ^ ERROR at Row:1:Column:16 sObject type 'Hobbies__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.`
Do you have any idea about this error. I have tried many times. I think this badge is the far difficult one :( Thank you in advance.
I agree - this is definitely a tough badge!
DeleteDid you install the unmanaged package prior to starting the data import? You should not have to create the custom objects...They are created by installing the package. Once you install the package, you should be able to hop straight into the data import without creating any object relationships.
I do not believe that I forgot to install this unmanaged package. Actually, it is clearly stated in the challenge that we need to install that package. Instead of doing this, I was trying to create my own custom objects :( Anyway, I am just learning :)
DeleteBtw, I took your time, sorry about that. First step was completed. Thank you so much for your help.
I am very glad to hear that you passed the first step! Congrats!
DeleteHi, Trailhead Baby
ReplyDeleteFirst off thank you for this walk through.
I am having an issue with step 9 that I need some additional assistance with. I am not that familiar with the data loader so I may be missing something from this step.
I was able to match all Contacts and Hobbies to their appropriate IDs as directed.
However, I seem to get an error when trying to upload the data.
1. I select Contact Hobby (ContactHobby__c)
2. Map Contact_C to Contact Name and Hobby_c to Hobby
3. 240 Errors -- the program claims "Contact: id value of incorrect type:
- However, I went back through each of these contacts and made sure that the IDs were correct...
Any thoughts?
Thanks!
The "ID value of incorrect type" error means that data loader is looking for a different "style or type" of value than what was provided. IE- You tried to match a text column with a record ID column. Try instead to select "contact_c" to contactID. Same for hobby.
DeleteFor more details on this error reference: How to Guide- Salesforce Data Import: Error Messages & FAQ
https://trailheadbaby.blogspot.com/2018/03/how-to-guide-salesforce-data-import_21.html
Thank you!
DeleteStep 8)
DeleteOn dataloader.io, im experience an issue mapping fields.
both "Account Name" and "Opportunity Name" have salesforce field, so dataloader gives me 88 errors while uploading
Hello! Could you define what you mean by "Salesforce field"? Are you referencing the AccountID and OpportunityID fields?
DeleteThe hints that I provided are for using the data loader and the native data import wizard. I did not use dataloader.io.
I found your article to be thought-provoking. The way you presented the facts and arguments was clear and concise. Thank you for shedding light on this issue. Your article was informative and helped me gain a better understanding of the subject.
ReplyDeletetarpaulins