Content and Content Library Folder Object Import and Export

Use the library.xsd schema to import and export content and content libraries.

When importing or exporting content and content libraries, keep the following in mind:

  • You can use pipelets to zip or unzip content images.
  • You can manually upload gzipped files using Business Manager, as long as the files or images can be validated.
  • You can manually upload zipped files using Business Manager. When uploading zipped files, make sure to use a utility that doesn't include extraneous files. For example, the _MacOS folder created by the Mac system compression utility.
  • You can't use WebDAV to move files on staging or production instances.
  • To move files into their correct location in the cartridge, create a job that uses FTPClient or WebDAVClient.
  • When creating job steps to import or export a private library, along with the library ID, you configure site specific context as a scope for the job step flow.
    • Organization: Executes the flow for the instance and exports the shared library with the given ID.
    • Specific Sites: Use if the export is site specific. Executes the job flow and exports the private library only on the site you select.
    • All Storefront Sites: Use if the export is for all instance sites. Executes the job flow and exports the private library to all sites.
  • Private libraries are listed in the Business Manager UI and appended with the site name for better reference. When configuring a private library for export, only use β€œlibrary” and the ID. Appending the ID with the site name returns an error.

To export a content asset part of a private library, navigate to site > Merchant Tools > Content > Import & Export and continue the export. The <library> tag does not take library-id as one of its attributes. To import a content asset part of a shared library, add the shared library ID under <library> tag with library-id attribute.

Object Information Details
Schema file library.xsd
Granularity Entire library.
Business Manager import and export location

site > Merchant Tools > Content > Import & Export

Administration > Sites > Import & Export

Pipelets
  • ImportContent
  • ExportContent

Granularity: Passed folders and content assets of passed folders.

For Images: Create a job that uses FTPClient or WebDAVClient to move files into their correct location in the cartridge.

A site import results in an archive file (x.zip) containing a structured representation of all exported data including a folder structure, XML files, and static files. You can select which libraries (either private or shared) you want to export:

Note: The site import or export workflow enables you to select the libraries to export.
Library Type Details
Private
  • XML appears within /<archive name>/sites/<site id>/library/library.xml.
  • The library-id attribute is omitted on the top-level <library> element.
  • Static content appears in a static subfolder in the folder structure.
  • During site import, Salesforce B2C Commerce assumes that a library.xml file in this location refers to the private library for that site.
Shared
  • XML appears in the /<archive name>/Libraries/<library ID> folder.
  • The XML file is called library.xml.
  • The library-id attribute on the top-level <library> element is specified.
  • The Content object supports site-specific attributes.
  • You can import and export custom attributes defined on the Library system object.
  • Static content appears in a static subfolder in the folder structure.
  • During site import, B2C Commerce assumes that a library.xml file in this location refers to a shared library with the given folder ID.