This topic describes how to install and configure Optimizely PIM (Product Information Management) for Optimizely B2C Commerce. With the PIM integration, you can manage detailed product information and synchronize the data to B2C.
About Optimizely PIM
PIM is built for convenient management of detailed product information for your commerce site, including item information like size, weight, color and associated images. You can quickly set up catalog and product data requirements and efficiently manage the data acquisition and curation process.
The diagram below shows how PIM processes data by receiving, updating, approving and passing the data into B2C with a scheduled job.
Installation and configuration
The EPiServer.Commerce.PIM integration nuget package contains a set of scheduled jobs for data synchronization.
After installing the package, add these configuration settings to the <appSettings> section in the web.config or appsettings.json file, and define values as described in the following.
<appSettings> <add key="episerver:PIM.Environment" value="" /> <add key="episerver:PIM.ClientId" value="" /> <add key="episerver:PIM.ClientSecret" value="" /> <add key="episerver:PIM.NumberOfLookbackDays" value="" /> <add key="episerver:PIM.APIAddress" value="" /> <add key="episerver:PIM.TokenEndpoint" value="" /> </appSettings>
|episerver:PIM.Environment||Values: Production or Sandbox.
Setting for current site environment.
This must match the setting in PIM > Configure > Settings > Active Publishing Environment.
|episerver:PIM.ClientId||Client ID key to connect to PIM API.|
|episerver:PIM.ClientSecret||Client Secret key to connect PIM API.|
|episerver:PIM.NumberOfLookbackDays||Number of days, used in Refresh mode to get product records based on the published date. Default value is 5 days.|
|episerver:PIM.APIAddress||Root URL of PIM API endpoint.|
The PIM integration package contains a set of three scheduled jobs for managing data synchronization with B2C Commerce. Scheduled jobs are managed from the CMS Admin view.
Synchronize setup data
PIM: Synchronize setup data pushes information about your catalog and product types to PIM. You should run the job any time you have made changes to content types or properties that have B2C attributes (for example, PIMSync). Run the job from a Sandbox or Production instance, not a partner QA site, including when new languages, websites, relationship types or product custom properties are added.
Publish approved products
PIM: Publish approved products should be run 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 the status "Approved", and then updates the status in PIM to "Published". The job is typically set as recurring but can also be run on-demand.
Refresh published products
PIM: Refresh published products keeps non-production environments synced with PIM as needed. It uses the lookback days parameter in the job to pull in products with "Published" status, and then based on the date last published into the environment you are running the job from. You also can use this for development environments. It should typically only be run on-demand.