Given a scenario, identify the options and considerations when importing and exporting data into development environments.

After studying this topic, you should be able to:

  • Identify Salesforce tools that are used for importing and exporting data into another environment
  • Define the considerations when using the Salesforce tools to export and import data
  • Understand the capabilities and limitations of Data Loader and Data Import Wizard
  • Determine which Salesforce tool to use given a scenario that requires a data import or export operation

Table of Contents

  • Data Management
  • Data Loader
  • Data Import Wizard
  • Import Articles
  • Data Export Service
  • Exporting Reports
  • Scenarios and Solutions

Introduction

  • For imports, there are two main options: Data Import Wizard or Data Loader
  • For export, Data Loader or exporting via Reports can be used
  • Other tools include: Data Export Service and importing Knowledge articles

Data Management

  • Data Import Options:
    • Data Loader: up to 5 million records
    • Data Import Wizard: accessed in Setup, can import up to 50,000 records
    • Data Loader CLI: use dataloader through the command-line interface for repetitive, complex operations
    • Third Party Tools: ETL tools such as Jitterbit for enterprise-scale import jobs
    • Import Knowledge Articles: ‘Import Articles’ page in setup can be used to import Knowledge artciles
  • Data Export Options:
    • Data Export Service: available to export data manually every 7 days or 29 days
    • Data Loader: can be used to export records. Export All option includes records in the Recycle Bin.
    • Report Export: can be exported in CSV or XLSX format
    • Third Party Tools: ETL tools like Jitterbit can export enterprise-scale data
    • Data Loader CLI: use it from the command-line interface
  • Considerations for import/export:
    • Must always be in CSV format
    • Irreversible: imports/exports cannot be undone. Back up data before any actions.
    • Workflows & Processes: imported records trigger workflows/processes
    • Required Fields & Validation: follows required field rules (at field level security level) as well as validation rules
    • Hard Delete option in Data Loader: deletes records without moving to the recycle bin
  • Import/Export Tools:
    • Data Import Wizard:
      • Does not support all standard objects but does support all custom objects
      • Does not support export
      • No additional software needed
      • Prevents duplicates by uploading according to account name/site, contact email address, lead email address
      • Does not provide a command line interface
      • Field mappings cannot be saved
      • Option to not run Workflow Rules & Processes
    • Data Loader:
      • Supports all standard and custom objects
      • Supports export
      • Requires client software to be installed
      • Only detects duplicate records on unique fields such as the record ID or external-unique ID
      • Command line interface available for Windows for scheduled or scripted jobs
      • Field mappings can be saved
      • No option to prevent workflow rules and processes
    • Report:
      • Report can be created with the required data, exported as CSV or XLSX
    • Dataloader.io:
      • Free cloud-based tool that allows importing/exporting data
    • Workbench:
      • Can be used to export data, by selecting an object and fields or by defining a SOQL query
    • Other paid tools:
      • ETL tools like Jitterbit, Talend, Informatica, and Mulesoft require more setup, but allow for sophisticated enterprise grade import and export

Data Loader

  • Workflow is triggered
  • Upsert updates and existing record if a match is found, otherwise inserts
  • Hard Delete deletes records without moving to the recycle bin
  • Enforces validation rules
  • If picklist values do not exist, record is still imported, but value is not added to the picklist values and cannot be selected for other records
  • For repetitive and complex operations, same data loader engine can be used through the Command Line Interface (CLI)

Data Import Wizard

  • Can be used for Accounts, Contacts, Leads, Solutions, Campaign Members, Person accounts, and Custom objects
  • Allows selecting the fields for matching accounts and contacts
    • Ex: Contacts match on Name or Email, Accounts match on Name and Site, Leads match on Name or Email, Solutions match on Title
  • Field mappings can be edited

Import Articles

  • Knowledge articles can be imported into Salesforce knowledge from the “Import Articles” page of the “Data Management” section in Setup
    • User permissions required to import articles:
      • Manage Salesforce Knowledge
      • Manage Articles
      • Manage Knowledge Article Import/Export
      • Create, Read Edit and Delete on the Article Type
    • Requirements and considerations for importing Knowledge articles:
      • Knowledge license is required to see the “Data Management” section in Setup
      • Only one Knowledge article type can be imported at a time
      • Article’s field level security should allow editing the fields
    • To import, a .zip file with the following is needed:
      • .csv file that maps imported article’s content with article type’s fields
      • .properties file containing parameters that define how the articles should be loaded
      • HTML files for uploading HTML articles instead of plain text

Data Export Service

  • Exports the org data in a monthly or weekly schedule, depending on org edition (once every 7 or 29 days)
  • All selected objects, included custom objects, can be included
  • Export file is included in an email with a link
  • Link Expiration after 48 hours
  • Attachments like images, documents, and attachments can be included
  • Files & Contents like Chatter files and Salesforce CRM content document versions can be included

Exporting Reports

  • Export Reports user permission is required to export from reports
  • Format: possible to export in CSV and XLSX format
  • Encodings: different encodings are available, such as ISO-8859-1 (Genera US & Western European, ISO-LATIN-1)
  • No limit on the number of rows and columns that can be included
  • Delimiter depends on the “locale settings” of the user who initiated the export
  • Joined Reports can be exported, preserving their layout. These are always in XLSX format.

Scenarios and Solutions

Reference FoF Slides