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 Data Replication

Learning Objectives

After completing this unit, you’ll be able to:
  • Describe the two types of data that replication handles.
  • List three situations when partial data replication is useful.
  • Describe the data replication process types.
  • Describe the data replication activation methods.
  • List three steps in a manual data replication process.

Introduction

Linda Rosenberg, Cloud Kicks’ new administrator, wants to get started with data replication. This is when she copies data, metadata, and files from a Salesforce B2C Commerce staging instance to a development or production instance.

She knows that in Business Manager, she can configure one or more sites within each instance. The multiple sites on a particular instance are considered an organization. When she configures settings, for example, she can configure them as site-specific (one site) or across all the sites (the organization).

Data replication also functions at these two levels.

  • Global replication: Includes configuration information and data that applies to the entire organization
  • Site replication: Includes data belonging to one or more specified sites, such as product and catalog data, XML-based content components, and image files

Cloud Kicks recently launched a new storefront and got a new primary instance group (PIG) for its implementation. Cloud Kicks ran a full global replication to each target instance before running any site replications to it. The Cloud Kicks storefront is already live, so Linda focuses on new data.

Tasks

Linda can configure the data by selecting specific replication tasks at a granular level. She can also combine global and site-level data in a single process. The more she understands the data and its application, the better she can move the data to where it needs to be.

In Business Manager, she can review potential replication tasks to understand the importance of hierarchy and data granularity. For example, she can replicate a single catalog, but she can't replicate a specific product. For campaign data, however, she can replicate at a lower level of granularity such a specific storefront’s promotions and coupons. This is called partial data replication.

Partial data replication can be useful in these situations.

  • To roll out new promotion definitions, text, graphics, and coupons across a storefront
  • To update the storefront homepage design with seasonal messages
  • To update product price changes

When she replicates data, the data she selects replaces the corresponding data on the target instance. For example, the PIG instances (staging, development, and production) include catalogs A, B, and C.

Catalogs A, B, and C are on all instances: staging, development, and production.

On the staging instance, she updates catalog B, deletes catalog C, and adds catalog D. When she replicates catalogs from staging to development, on the development instance, catalog A is unchanged, catalog B is updated, catalog C is deleted, and catalog D is added.

After a replication from staging to development, catalog A is unchanged, catalog B is updated, catalog C is deleted, and catalog D is added.

Note

Remember, you must test all storefront changes on the development instance before you push them to the production instance.

B2C Commerce overwrites only the data you selected for replication on the target instance. Other data is not affected, such as in the previous example, where catalog A remained unchanged.

Data Included

When Linda replicates data, she carefully considers the affected files for both global and site data. Data can include content assets, products, and price books or settings, such as preferences and permissions. Here are the global and site-specific storefront data and settings that she can include in a replication.


Storefront Settings
Global (Organization)
  • Catalog content
  • Customer lists and their settings
  • Geolocation data
  • Price books
  • Shared library content
  • Global static content
  • System object type extensions and custom object types
  • Certain organization-scope custom objects
  • CSRF allowlist pipeline and start nodes
  • Customer Service Center (CSC) settings
  • Global Open Commerce API (OCAPI) settings
  • System and custom preferences
  • Site definitions
  • Global WebDAV client permissions
  • OAuth providers
Site
  • A/B tests and experiences
  • Active data feeds
  • Campaigns and promotions
  • Coupons
  • Customer groups
  • Content slots
  • Private library contents
  • Dynamic content
  • Custom objects
  • Search indexes and dictionaries
  • SEO and static mapping
  • Sorting rules and options
  • Source codes
  • Stores
  • Taxation
  • Cache settings
  • OCAPI settings
  • Site-specific system and custom preferences
  • Payment processors and methods
  • Shipment and shipping methods

Linda selects one or more tasks in Business Manager that correspond to the data types she wants to replicate. See the Data Replication Tasks in B2C Commerce for a complete list of tasks.
Global Replication tasks

Data Not Included

You can’t replicate the following data types. Instead, you must create or import this data into the development and production instances.

  • Active data
  • Batch processes
  • Catalog and content import feeds
  • Custom error pages
  • Customers and customer group assignments
  • Files that are uploaded but not imported
  • Gift certificates
  • Inventory data
  • Job schedules and history
  • Organization profile
  • Payment information
  • Order information (for example, tax and shipping)
  • Sitemaps
  • Source code redemptions
  • Users, roles, and permissions

Dynamic recommendations are another data type that you cannot replicate. That’s because Commerce Cloud Einstein dynamically generates these on the production instance.

Process Types

Data replication is a two-step replacement process where the data is:

  1. Transferred from staging to the target instance
  2. Published on the target instance

Linda can run both steps as a single replication process, or she can run them separately. Running them separately can help identify any sources of failure if it occurs. All replication processes run on the staging instance, even publish and undo, which affect only the target instance.

These are the types of data replication processes.

  • Transfer: B2C Commerce transfers data on the source instance to the target instance, but doesn’t replace it. You must also run a publish process to update the target.
  • Transfer and Publish: B2C Commerce transfers data on the source instance to the target instance and immediately replaces the existing data.
  • Publish: This process is available only after a successful transfer process. It replaces the existing data on the target instance with the previously transferred data. The replication tasks must match the transfer process tasks. You can’t transfer data and then publish just some of it. If it doesn’t match, the replication fails.
  • Undo: This process is available only after a successful transfer and publish or publish process. It reverts the target instance to the data that existed before the last replication process.
Note

You must disable incremental indexing when you run a publish replication process.

Activation Methods

Linda can specify how she wants to run a replication process. Her choices are:

  • Manual: The process runs when she triggers it.
  • Automatic: She schedules a day and time when the process runs.
  • Recurring: She schedules a recurring time when the process runs.
  • Job Step: The process is available to run as part of a job. We talk about jobs in the Salesforce B2C Commerce Scheduled Jobs module.

Remember, B2C Commerce replicates data in its state at the time the process runs, and not the time when you defined the process.

Create a Data Replication Process

Linda plans to create replication processes in a variety of ways, based on the kind of data and its frequency of change. For now, she wants to run a quick manual process to update some new prices.

Here’s how she creates a manual replication task.

  1. Open Business Manager.
  2. Select Administration > Replication > Data ReplicationBusiness Manager data replication processes
  3. Click New. (You must be on a staging instance to see this button.)

  4. B2C Commerce automatically creates a process ID, or you can enter the text you want.
  5. Select the Development target instance.
  6. Enter an optional description. This can help you find it later.
  7. Select Invalidate to refresh the page cache on the target instance at the end of the replication process. Invalidate is selected by default. Clearing cache temporarily degrades site performance, but if you don’t refresh the cache, shoppers won’t see the new data on the storefront.
  8. For activation type, select Manual. (Manual, Automatic, Recurring, or Job Step).
    For Recurring, specify Every Day, Every Week, or Every Months, and a start date and time.
  9. Select a notification email trigger: When Process Ends
    (When Process Ends, When Process Fails, or Periodically)
  10. Enter multiple target email addresses separated by commas. The email contains the start and end time of the process, target system, replication type, and replication tasks. If the process fails, the email notification includes an error code. Each process in a recurring series triggers its own notification.
  11. Specify what happens for these events.
    • Process ends: B2C Commerce sends an email to the addresses when the process ends, whether it succeeds or fails. If it hangs, it doesn’t send an email.
    • Process fails: B2C Commerce sends an email to the addresses if the process fails. If the process succeeds or hangs, it doesn’t send an email.
  12. Click Next.
  13. For replication type, select Transfer and Publish.
  14. Select the Price Books task. This is based on the data that you replicate.
  15. Click Next and review the details.
    Click start to begin the replication process.
  16. Click Start to run the process immediately.

Linda tests the data on the development instance. When it looks good, she replicates the same data from the staging instance to production.

Next Steps

In this unit, Linda learned that data replication can handle global or site data, or both. She also learned about replication process tasks, process types, and activation methods. She ran a manual replication process that pushed new pricing data. In the next unit, she learns how to perform a code replication.

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios