Synchronization in Backoffice

Synchronization is a process of transferring data of an item from one catalog version to another. You can synchronize between Staged and Online versions, where Staged means your draft work and Online means the published content.

Synchronization can be performed after changes made to a product or to a catalog. You can either Push to Target from a Staged version of a Catalog to Online, or Pull from Source from an Online version of a Catalog to Staged.

Synchronization of Single Products

Procedure of performing single products synchronization in Backoffice.

Context

You can run synchronization of a product in the Collection Browser and Editor Area widgets. The steps below are an example of performing synchronization on a single product, from the Collection Browser and from Editor Area:

Procedure

  1. Select a product in Collection Browser.
  2. Make changes to the product in Editor Area.
  3. Click Save.
  4. After you click Save, the Sync action in Editor Area's action toolbar becomes active. Click the icon.
  5. Choose the job you want to perform and click the Sync button.

    After refreshing the Collection Browser the Sync Status of the product changes from Out of Sync to In Sync. The red Sync icon changed into the green one.

    You can also check your synchronization jobs in the Processes Widget, by clicking on the Processes Widget icon, next to Localization, in the System Toolbar.

Synchronization of Multiple Items

Procedure of performing multiple items synchronization in Backoffice.

Context

The steps below are an example of performing synchronization on multiple products, from the Collection Browser.

Procedure

  1. Make changes to two or more products.
  2. Select the products you edited, and which are out of sync, in the Collection Browser.

  3. Click the Sync icon in the actions toolbar.
  4. You can now perform synchronization of the items you selected. Choose the job you want to perform and click the Sync button.

    After refreshing the Collection Browser, the Sync Status of the product changed from Out of Sync to In Sync. The red Sync icon changed into the green one.

    You can also check your synchronization jobs in the Processes Widget, by clicking on the Processes Widget icon, next to Localization, in the System Toolbar.

Synchronization of Catalogs

Procedure of performing catalog versions synchronization in Backoffice.

Context

The steps below are an example of performing synchronization on Catalog Versions:

Procedure

  1. Make changes in the selected Catalog Version.
  2. Click Save.
  3. After you click Save, the Sync action in Editor Area's action toolbar becomes active. Click the icon.
  4. You can now perform synchronization of the items you selected. Choose the job you want to perform and click the Sync button.

    You can check the process of synchronization job in the Processes Widget.

Next Steps

When trying to modify and save a product from a catalog that is being synchronized, a relevant warning is displayed. You have two options available: Cancel and Ignore&Save. You can also configure the Editor Area widget, and make saving unavailable, by using disableSaveOnSync setting to true.

Lazy Task Executor

The feature shows long running operations in the Collection Browser widget.

You can see wait message and then the synchronization result appears. It is done without blocking your current UI. If more than one product is synchronized, we don't have all statuses in one background check and displayed to the user. DefaultLazyTaskExecutor creates and appends list of LazyTasks and sends an EchoEvent (ZK specific) with operations to do.

LazyTask has two steps:
  1. Executing an operation
  2. Utilizing the result of the executed operation

EchoEvent is always executed in next UI call, it means all tasks scheduled in one UI call are collected together and send via EchoEvent to further processing.

When EchoEvent is processed, each LazyTask from the list is executed in a loop and its result is saved in the LazyTask. All LazyTask operations are executed in one LongOperation and when the LongOperation finishes, all results are available in the same time. When then results are available, utilization logic is executed for each LazyTask, also in a loop.

The Lazy Task Executor works only when the lazyRenderer setting is set to true. The default value for this setting is false, and when the default value is used, the statuses are rendered in a standard way.

The Lazy Task Executor feature is used to display sync statuses in list view. Each sync status cell creates its own LazyTask and sends it to LazyTaskExecutor. In next UI call, all those tasks are executed in one LongOperation. When results are available, final rendering is called for each cell.

The SyncStatusCellRenderer renderer is responsible for rendering sync status has three main methods:
  • first: for rendering some default or unknown sync status
  • second: for getting the sync status, it's called when LazyTask executes its logic
  • third: for rendering final result, it's called when LazyTask utilizes received result

Defining Synchronization Jobs

Define a set of attributes which will be taken into account while performing synchronization.

Context

Selective Synchronization widget allows the user to perform a types' instances synchronization only for the attributes set of types.

Procedure

  1. Login into Backoffice.
  2. Go to Start of the navigation pathSystem Next navigation step Multithreaded SynchronizationEnd of the navigation path.
  3. Choose a synchronization job you wish to modify.
  4. Go to the Configuration tab in the editor area.

    In the bottom, you will see a synchronization job definition configuration panel.

    The panel provides a summary of your included and excluded properties.

  5. If you wish to configure the synchronization job, click the Edit Configuration button.

    A popup window appears.

    In the popup window, you can see a legend at the bottom of the popup. The button indicates that the attribute is excluded from synchronization. The button indicates that the attribute will be taken into account during synchronization. Clicking those buttons will result in changing the attribute from included to excluded and the other way around. The button means that the set of attributes is partially included during synchronization (not all of the attributes in a set are included). You can use the search panel to find a particular attribute. Use the arrow button to expand a list of attributes. You can also use the "hamburger" to access the details panel.

  6. Click on the attribute which has next to it the "hamburger" icon to access the details panel.
  7. Decide which attributes you want to include and exclude during the synchronization.
  8. Click the Save button.

    You can now see in the Synchronization Attributes Configuration panel that the number of included and excluded properties had changed according to your changes.