馃攳
Data Import: Owner IDs and Parent IDs | Salesforce - YouTube
Channel: Salesforce Support
[1]
welcome to this screencast brought to
[3]
you by salesforce
[7]
every record in salesforce is assigned a
[9]
unique id
[11]
even each salesforce user
[14]
this id can be found at the end of the
[16]
url
[18]
in reports if you add a column for the
[20]
object id
[22]
or through the api
[24]
for example through an export file from
[26]
data loader
[28]
this video will be useful for anyone
[30]
importing child records using an api
[33]
based tool such as the data loader
[36]
if you look closely you'll see that both
[38]
the url and the id in reports is 15
[41]
digits long
[43]
api tools such as the data loader return
[46]
an 18-digit id
[49]
salesforce will recognize both the 15
[51]
and the 18-digit ids
[54]
excel however does not differentiate
[56]
between upper and lower case characters
[59]
so it's a best practice to use the 18
[61]
digit version especially if you are
[64]
manipulating your data in excel
[67]
all records in salesforce have an owner
[70]
this must be specified in your import
[72]
files
[73]
if this field is left blank or the
[76]
column is omitted then the user doing
[78]
the import becomes the default owner
[82]
if you're using the data import wizard
[84]
you can use name or id
[87]
and in the case of custom objects an
[89]
external id
[91]
if you're using the data loader you must
[93]
use the salesforce id
[96]
child records are associated with a
[99]
parent in addition to an owner
[102]
this must be specified in your import
[104]
files
[105]
if this field is left blank or the
[107]
column is omitted then the import will
[110]
fail
[111]
use the data loader or other api based
[113]
tool
[114]
to import your child objects
[116]
and you'll need to indicate the parent
[118]
record by the salesforce record id
[121]
in this video we'll walk through
[123]
importing a list of opportunities using
[125]
the data loader
[127]
opportunity import file will need both
[129]
owner ids and parent account ids
[133]
this means that the users
[135]
and the accounts
[137]
must be added to salesforce before you
[140]
can import opportunities
[142]
once you get your users in
[144]
you can export their ids and match them
[147]
to the owner names in your import file
[150]
once your accounts are in salesforce you
[153]
can export their ids and then match them
[156]
to the account names
[158]
we're logged in to aw computing as the
[160]
administrator and we've got a big job of
[163]
adding users and importing accounts and
[166]
opportunities let's start with the users
[168]
since we will need their ids in order to
[171]
match the correct owners with each of
[173]
the accounts to be imported
[175]
in the setup pages use the quick find
[178]
box to locate users
[180]
we'll select users and we'll click add
[183]
multiple users
[184]
here we can add several users at once
[194]
once we have all our users in the system
[197]
we'll use data loader to export their
[199]
ids
[201]
so we're going to click export
[203]
we'll choose the user object and rename
[206]
the extract file and save it to a place
[208]
where we can find it again
[223]
next we'll choose the fields to export
[226]
the fields you choose will depend on how
[228]
your import data is structured
[231]
if your data uses an email in the
[233]
owner's column then you should export
[236]
username
[237]
so that the value can be matched with a
[239]
vlookup
[240]
if your import file uses last name to
[243]
denote ownership then export the last
[245]
name field
[247]
we're using name so we'll export that
[256]
let's finish up and then view the
[258]
extracted file
[271]
our account import file uses name in the
[273]
owner or created by column
[276]
so we'll move the column with the names
[279]
in it to be first in this extract file
[284]
and we'll sort this column a to z so
[287]
it's ready for vlookup
[291]
for more on vlookup see the video
[293]
cleaning and preparing data in excel in
[295]
this series
[296]
let's open the account import file which
[298]
is ready and just needs the owner ids
[302]
we'll use vlookup to match them
[314]
then we'll use paste special as values
[318]
to convert the formulas to values
[320]
so we can delete the name column since
[323]
data loader will throw an error if you
[325]
use an import file with unmapped columns
[329]
then we'll save both files
[333]
we'll also save a small set of five
[335]
accounts that we will use as a test
[338]
import before we import our entire file
[341]
we'll run through the insert process
[343]
starting with our test batch of five
[344]
records
[346]
and we're going to select the account
[348]
object
[349]
and choose our local file with the five
[351]
records
[355]
now we need to map our fields
[358]
we'll use auto match and if any fields
[360]
are not mapped we can drag them down to
[363]
map them manually
[366]
and then import
[370]
let's open the success file in excel
[373]
and save it as account ids
[384]
once we've inserted all of our accounts
[386]
we'll combine all the ids into one file
[391]
and since our opportunity import file
[393]
uses account name
[395]
let's move that field to the left of
[397]
this file
[399]
and then sort the column a to z so we
[402]
can use it for vlookup
[408]
now we'll match the owner name
[410]
with the user ids and account names with
[414]
account ids in our opportunity import
[416]
file
[418]
we'll demonstrate this with all three
[420]
files open
[423]
we'll use vlookup to match the user ids
[426]
to the owner id column in our
[429]
opportunity import file
[436]
then we'll match the account ids to the
[439]
account names again using vlookup
[448]
we'll convert the formulas to values by
[451]
using paste special as values
[461]
so now we can delete the owner name and
[463]
account name columns
[467]
we're going to save the opportunity
[469]
import file as a csv
[482]
and then we'll insert these records into
[484]
salesforce using the insert command in
[487]
data loader
[499]
then we can spot check several of the
[502]
opportunity records to make sure they
[504]
imported with the correct information
[508]
the order in which you import your
[509]
objects is important make sure you get
[512]
your users and parent objects in first
[515]
so that the child records can be
[516]
properly matched to their owners and
[519]
their parent records
[525]
to summarize we added users and used the
[528]
data loader to export their ids
[531]
we used vlookup to match these ids to
[534]
the opportunity owners
[536]
we used data loader to insert accounts
[539]
and we saved the import success file to
[542]
get the account ids
[544]
we used vlookup to match account ids to
[547]
account names
[549]
once we had ids for both the record
[551]
owner and the parent account we inserted
[554]
the opportunities
[556]
to learn more about data import check
[558]
out this whole video series
[560]
and come join us on the trail at
[562]
trailblazer.salesforce.com
Most Recent Videos:
You can go back to the homepage right here: Homepage