Exporting and importing data via Workbench – Getting to Know Data Management

Workbench stands as a potent collection of web-based utilities created for administrators and developers to engage with Salesforce.com organizations using the Force.com APIs. It encompasses strong backing for various Force.com APIs such as Partner, Bulk, Rest, Streaming, Metadata, and Apex. These APIs empower users to articulate, inquire, manage, and transfer both data and metadata within Salesforce.com organizations, all conveniently accessible through a straightforward and user-friendly interface within their web browser. Just to summarize: Workbench is a free but not official Salesforce tool that can be used in many situations while working with Salesforce data and metadata.

To use Workbench to export Salesforce data, do the following:

  1. Sign in to Workbench – just go to https://workbench.developerforce.com/.
  2. Place your cursor over the Queries menu item and opt for a SOQL query.
  3. Pick Bulk CSV from the View as radio input field.
  4. Compose your query within the Enter or modify a SOQL query below input field. To do this, you may select the object and its fields or just write the SOQL query from scratch:

Figure 3.9: Workbench – main screen

  1. Click the Query button. You will be directed to the Bulk API Job screen (if the SOQL query is error-free).
  2. Be patient and wait for the Status to transition to Completed.
  3. Select the download icon to download data (on the left in the Batches section).

Figure 3.10: Workbench – job status

OK, we have just exported data via Workbench. But do we use this tool to import it into Salesforce? Is this even possible? Yes, it is! Just follow the steps:

  1. Return to Workbench and choose data | Insert from the top menu.
  2. Choose Object Type and opt for the From File radio option:

Figure 3.11: Workbench – action choice

  1. Select the file with the data that you want to import by clicking the Browse button and then proceed to click Next.
  2. Click the Map Fields button, and then confirm the insert by hitting the Confirm Insert button.

Figure 3.12: Workbench – fields mapping

5. Finally, click the Download Full Results button.

As we’ve described a few possible options to export data from Salesforce, you may now wonder which tool to use for exporting your data. The answer is simple: use the tool that best suits your situation. If you just want to export some Salesforce data, for example, to use in a presentation, the Report export would be fine. However, if you frequently work with data imports and exports, Data Loader sounds like a better fit. If you’re a Salesforce enthusiast, you may also want to try using Workbench.

What’s crucial to note is that each tool has its own limitations. For example, when using the Data Import Wizard, you can import a maximum of 50,000 records at a time, and you won’t be able to import some important object records such as Opportunities or Cases. To bypass these limitations, you can use the Data Loader tool, as Data Loader is supported for loads of up to 5 million records and can handle multiple Salesforce objects. Understanding these differences is important as they often come up as questions on the Salesforce Certified Administrator exam.

Many times, data exporting is related to archiving the old Salesforce data. After moving it to a safe place for the future (this can be Salesforce Big Object or an external database), you may have to delete it from Salesforce. Let’s cover this topic in the next section.

Leave a Reply

Your email address will not be published. Required fields are marked *