loading table of contents...

5.7. Enabling Contract Based Preview

In Studio you can preview the effect of different WCS contracts on your pages. To enable the preview you have to do the setup in the WCS system and the CoreMedia system.

Setup within the IBM WCS

The IBM WCS Feature Enhancement Pack 8 enables the management of B2B extended sites, clients and organizations. In order to enable contract based preview in CoreMedia Digital Experience Platform 8 you need to create a dedicated commerce user in your IBM WCS. The user credentials (username and password) will be used in a public way and send as plaintext in an URL call. Furthermore, the user should be authorised to use the contract you intend to preview within Studio.

For more information on how to configure commerce users and organizations please refer to the IBM WCS documentation.

You have to enable the cookie leveler from within your WCDE-INSTALL/workspace/Preview/WebContent/WEB-INF/web.xml file of your preview web application, which is described in Section 3.4.5, “Configuring the Cookie Domain”

Setup within Blueprint

For contract based preview of shop pages in Studio, you can configure contracts to the test personas of a B2B enabled site.

Edit Commerce Contracts in Test Persona

Figure 5.16. Edit Commerce Contracts in Test Persona


If you edit an Augmented Page in Studio and select a test persona with a configured contract, the preview will automatically login as a dedicated service user for contract preview and redirects to the current shop page with the selected contract. The following screenshots show the same Augmented Page with no test persona selection compared to contract based preview.

Preview Augmented Page no Test Persona

Figure 5.17. Preview Augmented Page no Test Persona


Preview Augmented Page with Contracts in Test persona

Figure 5.18. Preview Augmented Page with Contracts in Test persona


These properties are important for B2B contract based personalization and can be configured in application.properties:

livecontext.ibm.contract.preview.credentials.username
Description The service user used for contract based shop preview in b2b scenarios
Example preview
livecontext.ibm.contract.preview.credentials.password
Description Password of the contract preview user
Example changeme

Table 5.10.  Properties for B2B contract based personalization