Configure Data Replication
- 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.
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.
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.
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.
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.
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.
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.
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)
- 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.
Data replication is a two-step replacement process where the data is:
- Transferred from staging to the target instance
- 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.
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.
- Open Business Manager.
- Select Administration > Replication > Data Replication.
- Click New. (You must be on a staging instance to see this button.)
- B2C Commerce automatically creates a process ID, or you can enter the text you want.
- Select the Development target instance.
- Enter an optional description. This can help you find it later.
- 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.
- 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.
- Select a notification email trigger: When Process Ends
(When Process Ends, When Process Fails, or Periodically)
- 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.
- 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.
- Click Next.
- For replication type, select Transfer and Publish.
- Select the Price Books task. This is based on the data that you replicate.
- Click Next and review the details.
- 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.
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.