As you implement Optimizely PIM, you might manage products in both an Optimizely B2B Commerce Sandbox site and Production site. Both PIM and B2B Commerce have several settings that help you accomplish this goal.
B2B Commerce has five PIM jobs: PIM: Synch Setup Data, PIM: Refresh Published Products, PIM: Publish Approved Products, PIM: Establish New Products and PIM: Sync Product Data.
- PIM: Synch Setup Data is used early in the implementation process to pull in languages, websites, product relationships and product custom properties. This job should be run from a Sandbox or Production instance, not a Partner QA site. It should be run when new languages, websites, relationship types or product custom properties are added.
- PIM: PublishApprovedProducts runs whenever you want Approved products to be pulled into the environment of your choice - either Sandbox (early in the project) or Production (once live). It pulls in products with an Approved status and updates the status in PIM to Published. You can set this job as recurring or run on-demand.
- PIM: RefreshPublishedProducts keeps non-production environments synced with PIM as needed. It uses the lookback days parameter in the job to pull in products with a status of Published and into the environment you are running the job from. This can also be used for development environments. You can run this job on-demand or recurring.
- PIM: Establish New Products pushes new products created in B2B Commerce over to PIM.
- PIM: Sync Product Data is an optional job used if you have any PIM properties configured as externally managed. This job should be setup to run on a recurring basis and sends data for these externally managed properties to PIM. Use this article to learn more about externally managed properties.
B2B Commerce's appSettings.config points to any environment, including a partner's QA environment. The PublishApprovedProducts job will only run if this setting points to a Commerce Sandbox or Production environment. You can run the RefreshPublishProducts job in any environment because it uses a lookback days parameter to determine what product data to refresh.
PIM's Active Publishing Environment setting determines the environment to which products will be published. It has two values: Sandbox and Production. Optimizely recommends completing implementation and testing with this setting set to Sandbox and switching to Production when you are ready to make the transition to the production site. You should only need to touch this setting once.
Sync sandbox and production sites
Follow these steps to ensure your Sandbox and Production sites are both up to date after publishing. Assume at this point that your Active Publishing Environment in PIM is set to Production.
- Wait for the PublishApprovedProducts job to run, or run the job manually to ensure your Production site is up-to-date.
- Run the RefreshPublishedProducts job, making sure the lookback days parameter matches when you last refreshed. Try to keep this low to minimize the volume of data that has to be potentially reprocessed.
You do not need to change any settings in B2B Commerce or PIM; the Refresh job updates any products with the Published flag, regardless of environment.