Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Configure Import and Export

Learning Objectives

After completing this unit, you’ll be able to:
  • List three types of permissions an administrator needs to perform import/export.
  • List three basic steps of the import process.
  • List three basic steps of the export process.
  • Explain the purpose of site import/export.
  • Describe two ways to deal with transfer limitations.

Introduction

Linda Rosenberg, Cloud Kicks’ administrator, has learned a lot about import and export schemas and modes. Now she’s ready to configure and run her first import and export process. While Linda is responsible for a variety of import and export processes, for today she focuses on catalog import and order export. She learns the steps to complete these processes and the data transfer size limits.

But first, she needs to ensure that she and her backup administrator, Peter Wong, have the correct Business Manager and file transfer permissions.

She and Peter need access permissions to:

  • Site import/export, which includes all site information
  • Import/export of storefront information, such as products and content
  • WebDAV access to log files and import/export directories on the server

She also requests access to an FTP port from Salesforce B2C Commerce Support so she can use the FTPClient scripts provided by a developer.

Import a Catalog

To access Business Manager, you must have a B2C Commerce implementation. In this module, we assume you are a B2C Commerce administrator with the proper permissions to perform these tasks. If you’re not a B2C Commerce administrator, that’s OK. Read along to learn how your administrator would take these steps in a staging instance. Don't try to follow our steps in your Trailhead Playground. B2C Commerce isn't available in the Trailhead Playground. If you have a staging instance of B2C Commerce, you can try out these steps in your instance. If you don't have a staging instance, ask your manager if there is one that you can use.

Linda starts by running manual import and export processes in Business Manager. Later, she plans to work with a developer to create processes that use standard pipelets. These pipelets deal easily with large data sets, are fast and reliable, and use system resources efficiently. To improve her efficiency, she also plans to create batch jobs for both file transfer and import/export. For now, manual processes are just fine.

To import a catalog containing product data, she creates a file on Cloud Kicks’s PIM system using the catalog.xsd format, as described in the first unit of this module.

Here are the next steps she takes.

  1. Open Business Manager.
  2. Select cloudkicks > Merchant Tools > Products and Catalogs > Import & Export.
  3. In the Import and Export Files section, click Upload.
  4. Click Choose FileUpload a catalog file for import in Business Manager.
  5. Click Upload.
  6. Select the file and click Compressin Business Manager, select the file to be imported and compress       the file.
  7. Business Manager creates zip file.
  8. Click <<Back.
  9. In the Catalogs section, click ImportIn Business Manager, select the file to import.
  10. In the Catalog Import - Select File section, select the file to import and click Next>>.
  11. Business Manager validates the file and displays a file analysis. Linda checks the analysis to see that Business Manager recognized the expected information before continuing the import.
  12. Click Next.
  13. Select the merge import mode.

Export Orders

Linda wants to export orders so they can be processed by Cloud Kicks’s external order management system (OMS). Her export file uses the same schema definition as import. Business Manager builds the XML file automatically.

To export orders, she takes these steps.

  1. Open Business Manager.
  2. Select cloudkicks > Merchant Tools > Ordering > Import & Export.
  3. Click Export.
  4. Select the orders to be exported and click NextIn Business Manager, enter the order       export file name and click Export.
  5. Select Export Selected Orders.
  6. Enter the file name: orders-01-19-2019.
  7. Select Update Order Export Status and Inventory.
  8. Click Export.
  9. In the Import and Export Files section, click Download.
  10. Select the file name (Linda selects orders-01-19-2019), and click Compress.
  11. Click the zip file name, which downloads the file to the local system.

Linda transfers the XML file to the OMS using WebDAV, and imports the file on the OMS. She can also use FTP or HTTPS, but Cloud Kicks developed the implementation to use WebDAV. Her transfer process uses a secure connection due to PCI-DSS requirements for data transfer and OMS system requirements. This is a best practice!

View Import/Export files via WebDAV

Linda wants to make sure everything is perfect, so she takes a look at the files. Here’s how.

  1. Open Business Manager.
  2. Select Administration > Site Development > Development SetupBusiness Manager WebDAV log access page
  3. Click the Import/Export link. Business Manager WebDAV import/export log files
  4. Review the log files to ensure they are correct.

B2C Commerce limits export file uploads to 500 MB. This means that multiple site exports or exports with giant images can lead to data overage charges. So Linda only runs exports as needed, for example, once a day, and with only the data necessary.

Site Import/Export

Another type of import/export Linda handles is site data. Cloud Kicks is implementing a new site, with multiple development teams working in parallel on different development instances. The functional architect asks her to copy one development instance configuration and share it with another development instance.

Site import/export lets her save a snapshot (configuration and data) of an instance and restore it on the same or another instance.

To export site data, Linda takes these steps.

  1. Open Business Manager.
  2. Select Administration > Site Development > Site Import & ExportBusiness Manager Site Import Export page
  3. In the Export section, enter a file name for the archive.
  4. Select the data you want to export. Business Manager Site Import & Export page, select data       section
  5. Click Export.
  6. When the export finishes, click the export file link at the bottom of the page.
  7. On the next page, scroll down to the bottom of the page and click the file’s download link. A zip file is created on the local system.

To import site data:

  1. Open Business Manager on the receiving instance.
  2. Select Administration > Site Development > Site Import & Export.
  3. In the Import section, with Local selected, click Choose File.
  4. Browse for the file and click Open.
  5. Select the file in the Import section, and click Import.

Transaction Limits

Though standard imports are designed to handle XML files of arbitrary sizes, a single process is limited to 1,000 business objects. As Cloud Kicks grows, Linda must pay attention to this limit and others.

Limit Description
Upload A WebDAV push into a B2C Commerce instance has an upload limit of 100 MB. If it takes too long to transfer the file, Linda can try again with the files zipped.
Download File sizes must be under 200 MB for FTP or WebDAV for download into a file. The file sizes for download into a string are much smaller.
FTPClient Size Programmatic file fetches use enforced file limits that can be passed in an argument or defaulted.
HTTPClient Size The HTTP client doesn’t have a file size limitation.

Compressed XML Files

Linda reduced her XML file sizes through compression. This helps Linda stay within upload size limits and speeds upload/download times on slow network links.

  • gzip: Business Manager automatically compresses standard import files with the gzip algorithm, so she doesn’t have to run .gunzip on the instance. She just enters a file name such as catalog.xml.gz to the import pipelet or selects a gzipped file (extension must be .gz) in Business Manager.
  • zip: XML files can be zipped and unzipped (zip compression, not gzip compression) on a single file basis within Import/Export in Business Manager. Business Manager automatically unzips .zip files during an upload.

Delta Feeds

For imports other than catalog data, Linda creates XML files that contain only the differences between the current and previous XML files. These are called delta feeds. They are usually smaller and faster to import and less vulnerable to network interruptions.

While she can create a delta catalog feed, she can’t include elements that replace the global import mode with an element-specific import mode. It’s not possible, for example, to create a delta feed for a bundled product, because the bundled-products field automatically uses the replace mode.

Static Files

The persistent objects in the catalog and content library (category, products, and content data) have supplemental static files, such as product images. B2C Commerce stores these in the instance file system. Your XML files can only contain persistent database objects and references to the static objects. To export/import or download/upload static files, Linda must use the WebDAV interface.

Why Archive?

Because XML files can’t be rolled back, Linda always archives the previous XML file before an import, which is a best practice. She can import the previous version if the new XML file doesn’t validate. Once a week, she deletes old files (except the last file) so they don’t accumulate.

Let’s Sum It Up

Today, Linda learned how to import catalogs, export orders, and view the logs in WebDAV. With site import/export, she copied site data from one development instance to another. She learned how to deal with file and transaction size limitations and the importance of archives.

In this module you followed along as Linda learned about schemas, modes, and the steps required to run import/export processes. It’s time to test your knowledge and earn a badge!

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios