Skip to main content

How the Data Import Wizard and Data Loader works is somewhat complex, (and helpful info seems to be spread far and wide). I'll try to put the important stuff here in one place. Does anyone want to add to it?

7 件の回答
  1. 2022年1月14日 22:32

    General Import/Export Management

     

      Quick  Notes:

    • Salesforce always runs Validation Rules on records before they are imported. Records that don't validate aren’t imported. (Consider deactivating the validation rule before importing.)
    • Workflow Rules are always triggered in Data Loader, but in the Import Wizard it's optional.
    • Assignment Rules do NOT trigger on import, (but they can be made to).
    • If a Required Field is left blank the record import fails. (I can't find this info in Salesforce docs, but every other site says this).
    • You can NOT cancel an import once it's started. (Can anyone confirm?)
    • The Import Wizard is more helpful/graceful when matching and updating existing records.

     

        Fields and Mapping in CSV Spreadsheet Files:

    • By default, a blank spreadsheet cell does nothing. It treats the record as though you do not want to make any changes to that field. 
    • Checkbox fields must use 1 or 0 for checked/unchecked values.
    • Date/time formats must match your Org's locale setting.
    • Formula fields cannot accept imported data because they are read-only.
    • Multi-select picklist values must be separated by a semicolon in your spreadsheet.

          If you import a picklist value that doesn’t match an existing picklist picklist value...

    • For an unrestricted picklist, the Data Import Wizard uses the value that’s in the import file.
    • For a restricted picklist, the Data Import Wizard uses the picklist’s default value, (if any) Note: The restricted picklist option in Fields and Relationships> ...is specifically to prevent imports or external Applications/APIs from using a picklist value not in the dropdown list.
    • What about dependent picklists??
    • Specify record ID Fields for updating/upserting (eg: ACCOUNTID = 0015e0000cbJhaaA).
    • Alternatively, specify an External ID field for updating/upserting if you are trying to sync an external database, (you must set up an External ID field on your Org's internal records).
    • Specify record ownership ID Fields to set record ownership, (eg: OWNERID = 005e00004tTUSAA2).
    • If importing contacts, opportunities, or other objects that have parent records, you'll need to add a spreadsheet column for the parent record, (this can be the account name if using the wizard, but if using Data Loader this must be the record ID).

     

      Unlike the Data Loader, the Data Import Wizard tries to be a little more helpful when matching/updating records. You can use spreadsheet values like email address instead of record ID to update records, and the Wizard is more gracious when matching field data: 

    • Case is ignored, (Forbes is the same as FORBES).
    • Punctuation is ignored. (IBM is the same as I.B.M.)
    • The following words are ignored if surrounded by white space or punctuation: Co, Company, Corp, Corporation, Inc, Incorporated, International, Intl, Limited, LLC, Ltd, PLC, The, (".com" is NOT ignored, so you could have two accounts with for Forbes and Forbes.com).

     

     Data Import Wizard

       You can add new records, Update existing records, or Add new and update existing records. (Insert, Update, or Upsert).

       Use the Wizard when you want to prevent duplicates by uploading records according to account name and site, contact email address, or lead email address, (instead of record IDs).

        If importing data for others, you must specify the record owners in your spreadsheet. This can be the user name or email, (instead of owner IDs).

     

       Import any custom object, and the following standard objects:

    • Accounts and Contacts
    • Leads
    • Solutions
    • Campaign Member

     

      Features:

    • Choose whether imported records should trigger workflow rules and processes.
    • Optionally choose an assignment rule to assign Leads.
    • Optionally use the Lead assignment rule to send notification emails to record owners.
    • Optionally assign all Leads to Campaigns.
    • Choose whether to overwrite existing Account data.
    •  Auto-mapping will be attempted based on CSV header. You can also map fields manually. Unmapped fields are not imported, (but you also have the option to map fields into "notes" for either accounts or contacts- each note is allowed up to 4,000 characters.).
    • Users who aren’t admins can access the Data Import wizard from their personal settings.
    • The Wizard home page lists the status and metrics of Recent Import Jobs . Alternately, see Environments> Jobs> Bulk Data Load Jobs>.

     

       Notes:

    • If updating records, you can only import records in batches of those of the same record type.
    • Do NOT run more than one import job at a time, even from separate browser windows.
    • Data Import Wizard doesn’t support importing custom objects into Experience Cloud sites.
    • If you have workflows that add new objects when importing, selecting add new and update existing records fires them, but selecting update existing records doesn't.
    • For picklist, multi-select picklist, and checkbox fields, if you do not map the field in the import wizard, the default value for the field, (if any) is used on the new or updated record.
    • To erase a field you can use #N/A in the spreadsheet cell. The exceptions are a checkbox, (where you have to use 0 for unchecked values) and lookup fields as the Import Wizard cannot null a lookup (you must use an API tool like the Data Loader).

     

    Data Loader

       Insert, Update, Upsert... Delete, Hard Delete... Export, or Export All (even the Recycle Bin).

     

        You can use Data Loader in two different ways:

    • Data Loader's easy to use Wizard interface lets you configure parameters, view and specify CSV files, and use drag-and-drop for field mapping.
    • The Command line (Windows only) lets you specify the configuration, data sources, mappings, and actions in files. This enables you to set up Data Loader for automated processing.

     

       Notes:

    • Data Loader will ­*always* trigger workflow rules and processes.
    • Data Loader will NOT trigger assignment rules, (unless you copy the assignment rule ID into the Assignment Rule text box in Data Loader Settings).
    • If you want Data Loader to remove the value of a fields for blank spreadsheet cells, (so they will appear as blank or NULL) adjust Data Loader settings by selecting: Insert Null Values. 

       Data Loader Features:

    • Supports all objects. 
    • Allows you to process 50 thousand to 5 million records.
    • Schedule daily imports/exports, (using the command line with Windows Task Scheduler).
    • Detailed success and error log files in CSV format
    • Built-in CSV file viewer.

     

    Resources:

0/9000