Publish Optimizely PIM updates to Optimizely B2B Commerce
Once your product data is fully complete and built out in Optimizely PIM, you will want to publish your products to Optimizely B2B Commerce so they can be viewed on your website. This is a several step process. First, you will log in to B2B Commerce and ensure that the jobs that handle PIM publishing are set up correctly and with the appropriate recurrence. Then, when your products are fully built out and customized, you will approve them from PIM. Approved products will become Published when the PIM jobs run.
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 your implementation process by your implementation team. This job should be run at initiation to pull in languages, websites, product relationships or product custom properties. This job should only be run from a valid environment Sandbox or Production environment and only needs to be run when the data it pushes to PIM changes, which should not be with great frequency.
- 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 them as Published.
- PIM: RefreshPublishedProducts keeps your environment refreshed and is run as needed. You can also set the lookback days to tell the job how far back you want to look for changes. This job pulls in products with the status of Published based on the last date published.
- 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.
To learn more about the difference between refreshing and publishing, see the Refreshing and Publishing Products in PIM article.
Best Practices
You must decide how often you want the Publish and Refresh jobs to run. Optimizely recommends setting both the Refresh and Publish jobs to run overnight. This will likely involve a conversation with the team who manages B2B Commerce, or the internal team who manages other jobs in B2B Commerce. You must also decide how far back to set the lookback days for the RefreshPublishedProducts job - this will likely correlate to how often the jobs are set to run.
Note that if you set the Refresh and Publish jobs to run overnight, any changes you make in PIM in regards to publishing or updating products will not show on your site right away; you will need to wait until the following day to see changes. However, setting the jobs to overnight will allow for better performance than setting the jobs to run more frequently. You will need to decide what this trade-off will look like for you and your team.
When the job to publish products runs, any fields with null values will replace any existing data in that field for that product.
Set the Connection Type and Recurrence for PIM Publish and Refresh Jobs
- Log in to your B2B Commerce site.
- Go to Administration > Jobs > Job Definitions.
- Edit the job for which you want to set the Connection Type and Recurrence.
- Set the Connection to Internal.
- Scroll down to the Recurrence section and toggle the Run as a Recurring Job setting to Yes.
- Set an optional start date and end date.
- Set the recurrence based on minutes, hours, days or months.
- Click Save.
- Repeat this process for both jobs.
Set the Lookback Days for the PIM Refresh Job
- Go to Administration > Jobs > Job Definitions.
- Edit the PIM: Refresh Published Products job.
- Click the Parameters tab.
- Edit the LookbackDays parameter.
- Change the Default Value to the number of days you want this job to look back. This will only refreshed Published products within the designated time frame.
- Click Save.
Submit Products from PIM for Approval
Only users with the Admin or Manager role can approve products to be submitted to B2B Commerce. All other users can submit products to the Admin or Manager role for approval. Once approved, products will be pulled into B2B Commerce using the PublishApprovedProducts job.
- Log in to your PIM site.
- Click Products.
- From the product grid, click the product number of the product you would like to submit for approval.
- Ensure the product status wheel on the left side is at 100%.
- In the upper right, click Submit for Approval.
Approve Products in PIM
- Log in to your PIM site.
- Click Products.
- From the product grid, click the product number of the product you would like to approve.
- In the upper right, click Approve.