Skip to main content

Explore Business Manager Import and Export

Learning Objectives

After completing this unit, you’ll be able to:

  • List three data objects you can transfer via the import/export process.
  • Explain the purpose of Agentforce Commerce for B2C XSD files.
  • Explain one benefit of using the Read-Only Price Books feature.
  • Explain two benefits of object-specific schema files.
  • Explain how you use instances to roll out storefront data.
Note

Commerce Cloud is now Agentforce Commerce, and B2C Commerce is now Agentforce Commerce for B2C. You might see references to Commerce Cloud and B2C Commerce in our applications and documentation.

You’re a Commerce for B2C admin. Your top responsibility is data management. Specifically, you manage the transfer of storefront data between external systems and Commerce for B2C. You also help move site configuration and settings data from one instance to another to bring new developer instances online.

Your company develops catalog details such as SKUs, product descriptions, sizes, images, and prices, in a system of record. You use import processes to transfer that data into Commerce for B2C. Meanwhile, any time shoppers create orders, redeem coupons, and so on, in Commerce for B2C, you make sure that data goes to an external system for processing. For that transaction, you use export processes.

Note

A storefront is your online ecommerce site powered by Commerce for B2C. A single instance can include multiple storefronts.

In this unit, you learn some basics about how Commerce for B2C handles import and export. Later on, you put the concepts into action as you try out manually triggered or batch processes and site import/export with Commerce for B2C.

Before you try out the site import/export features in Commerce for B2C, you want to know:

  • The types of data that your company imports and exports.
  • The instance types that Commerce B2C admins and developers use.
  • How schema files work, and which schema files you need to be familiar with.
  • How Commerce for B2C handles data validation.

Storefront Data Import/Export

Your company imports and exports these types of storefront data.

Imports

Exports

Active data

Coupon redemptions

Catalog

Customer records

Coupons

Orders

New orders

Commerce for B2C doesn’t import data that updates existing orders. The order import process skips this data.

Price Books

Your processes are straightforward, and your external systems support the Agentforce Commerce for B2C file structure. That means you use the manual Business Manager import/export process for most things. However, your company maintains large and complex price books in a third-party product information management (PIM) system that it updates frequently. So instead of using the Business Manager import process, you use the Read-Only Price Books feature to import your price data. This feature makes the mass transfers much more efficient.

Import to Staging

Commerce for B2C gives customers four types of instances: sandbox, staging, development, and production. Sandbox instances are where the developers work. Use a sandbox instance when you work with a developer to edit or create an import or export process. After you test the new process in the sandbox, the developer moves it from the sandbox to the staging instance for you to use.

You use the staging and development instances to import and export storefront data. The staging instance is where you get ready for the data transfer. After testing the storefront data and code in staging, you replicate it first to the development instance and then to the production instance. You want to make sure that the staging environment closely mirrors your production environment. You use the staging instance to verify that the transfer was successful before pushing it to production.

Record archival and cleanup is an important and final step in the import process. Once a week, you use manual processes to archive the previous XML files and eliminate older files and unnecessary data. When you delete the record of an import you performed in Business Manager, it automatically removes the related log file.

Explore Schema Files

Commerce for B2C schemas are a significant part of what makes import and export happen. Schemas are a set of object-specific XSD files that define how you structure the XML import and export files. Commerce for B2C only accepts XML import files formatted by these schemas. When you import a file manually through Business Manager, Commerce for B2C automatically validates it against its respective schema.

Your company works with a partner to configure the external systems so they produce the XML files in the structure required by the schema. Make sure to familiarize yourself with the external jobs that produce import files so you can accommodate changes. For example, sometimes schemas change and you need to know how the change impacts your import or export processes.

Commerce for B2C automatically exports files in the proper XML format, except for coupon codes, which it exports to the CSV format.

These are the schema files to pay close attention to:

  • catalog.xsd
  • coupon.xsd
  • customer.xsd
  • order.xsd
  • pricebook.xsd

Validate and Structure Import Data

As we mentioned, when you import a file manually through Business Manager, data validation against the schema is automatic. If you use another way to import data, such as programmatically, ask a developer to help you validate the data programmatically.

Sometimes users create data manually in Business Manager–for example, when a merchandiser adds details to product data. If the product details don’t follow the schema, the data is invalid and the export (and maybe even the nightly backups) fails. To get the export working, ask the merchandiser to edit the data so you can try the export again.

Most Commerce for B2C schemas specify that schema elements are optional. This means that you only include the elements that you want in each XML file you use for import. Make sure to include any dependent elements. For example, if you import product data on “womens shoes,” include all the categories that they’re assigned to. If you forget to include one (such as the “running” category) in the import, Commerce for B2C ignores this category assignment and reports it in the error log.

Next, let’s take a closer look at elements.

Examine Elements and Attributes

You learned that schemas provide the rules, and the resulting XML file contains the data, in the correct format.

The schema rules consider the nature of a particular object and its attributes. This level of detail gives you granular control over object-specific data, and it helps you better understand your data. That’s where elements and attributes come in. Elements are data objects, and attributes describe those objects. For example, the catalog.xsd—this is the catalog schema—includes category and product elements.

Here’s an example of a category element in an XML file generated from a catalog schema.

<category category-id="womens-shoes-sandals">
    <display-name xml:lang="x-default">Sandals</display-name>
    <online-flag>true</online-flag>
    <parent>womens-shoes</parent>
    <template/>
    <page-attributes/>
</category>

The display-name attribute is the name of the category that displays on the storefront. The online-flag attribute, set to true, means that the category is visible on the storefront. The parent attribute names the parent category of the womens-shoes-sandals sub-category.

Here’s an example of a product element in an XML file.

<product product-id="008884303989">
    <ean/>
    <upc>008884303989</upc>
    <unit/>
    <searchable-flag>true</searchable-flag>
    <tax-class-id>standard</tax-class-id>
    <page-attributes/>
    <custom-attributes>
         <custom-attribute attribute-id="color">navy</custom-attribute>
         <custom-attribute attribute-id="size">007</custom-attribute>
         <custom-attribute attribute-id="width">N</custom-attribute>
    </custom-attributes>
    <pinterest-enabled-flag>false</pinterest-enabled-flag>
    <facebook-enabled-flag>false</facebook-enabled-flag>
</product>

The upc attribute indicates the product’s universal product code (UPC). Other attributes include the searchable-flag and the tax-class-id, in this case, set to standard.

Next, learn about some important import/export rules for the three most common elements you work with: category, product, and order.

Category Elements

These are some element-specific rules to consider when importing a category element.

  • Category elements can appear in any order in the XML file.
  • Use replace mode to update a catalog’s root category. (More about modes in the next unit.)
  • Deleting a category deletes the category’s category assignments (not the products within the category), category links (incoming and outgoing), and all subcategories.
  • The import sets the root category’s display name and description to the catalog’s display name and description.

Product Elements

Here are some element-specific details to consider when importing a product element.

  • Product elements can appear in any order in the XML file.
  • The bundle, product set, and base product types are mutually exclusive, so the bundled-products, product-set-products, and variation elements are also mutually exclusive.
  • You can’t specify variants of the bundle, product set, or base product types.
  • A base product owns its variation products and variation groups. You can change the ownership from one base product to another in a single import process.

Order Elements

You export storefront orders and process them in an order management system. Commerce for B2C automatically handles order-specific details such as order status, masked credit card numbers, rollback, and returns.

Note

To send full credit card numbers to an external processing system, a developer uses the ExportOrders pipelet configured with an encryption key to export encrypted credit card data. The external system is responsible for decryption and processing implementations.

Next Up

In this unit, you learned about the types of data you handle via import/export, instance types, schema files, and how Commerce for B2C validates data. Next, learn how to use modes for global and element-specific import and export processes.

Resources

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"