Refresh and publish products in Optimizely PIM
As you implement Optimizely PIM, you will most likely need to manage products in both a Optimizely B2B Commerce Sandbox site and your B2B Commerce Production site. Both PIM and B2B Commerce have several settings that will help you accomplish this goal.
Jobs
There are four PIM jobs in B2B Commerce: PIM: Synch Setup Data, PIM: Refresh Published Products, PIM: Publish Approved Products, and PIM: Establish New Products:
- PIM: Synch Setup Data is set up early in the implementation process by your implementation team. This job should be run at initiation 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 "active" environment of your choice - either Sandbox (early in the project) or Production (once live). It pulls in products with a status of Approved and then updates the status in PIM to Published. This job can be set as recurring or it can be 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 then based on the date last published into the environment you are running the job from. This can also be used for development environments; it should typically only be run on-demand.
- PIM: Establish New Products is used to post new products created in B2B Commerce over to PIM. This is primarily used to allow exposure to PIM for products that have been refreshed into B2B Commerce from an ERP.
Settings
In B2B Commerce, there is a setting for Environment in appSettings.config . This setting can point to any environment, including a partner's QA environment, but the PublishApprovedProducts job will only run if this setting points to an InsiteCommercce Sandbox or Production environment. You can run the RefreshPublishProducts job in any environment - as noted above, this uses a lookback days parameter to determine what product data to refresh.
In PIM, there is a setting called Active Publishing Environment. This 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.
How do I sync my sandbox and production sites?
After publishing to your production site, you may reach a point where your Sandbox and Production sites are out of sync. Follow these steps to ensure your sites are both up to date. 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 is sufficiently high enough to match when you last refreshed. Try to keep this as low as possible to minimize the volume of data that has to be potentially reprocessed.
You do not need to change any settings in Optimizely B2B Commerce or in Optimizely PIM; the Refresh job will update any products with the Published flag regardless of environment.