Optimizely (Episerver) Connector

Prev Next

Overview

Optimizely (Episerver) connector provides integration with Optimizely (Episerver) digital commerce and marketing solution.

Encodify > Optimizely (Episerver) action based integration ensures synchronization of data from Encodify modules with Optimizely (Episerver) entities (catregories, products, assets).

Configuration

The following configurtion guide assumes that configuration of Optimizely (Episerver) is already in place and required entities such as Product, Category, Catalog, Meta Classes, Entry Types etc are already configured in Episerver.

Feature Flag

To enable the service the corresponding feature flag must be configured in webapp.yaml file. Specify site IDs separated by comma or * to enable for all sites.

encode:
   webapp:
     connections:
       list:  
       - type: EPISERVER
         enabled-sites: '*'

Modules

Before proceeding to configuration of the connected service, modules and fields required for successful integration need to be created first.

Below image displays Encodify Optimizely (Episerver) data model that requires corresponding modules and fields in Encodify system for the integration to run.

More info is available by following the link:

Building integration with Optimizely (Episerver) will require creation of the 4 modules that will be mapped to the entities in Optimizely (Episerver):

  • Category (Node)

  • Product (Entry)

  • Product Category Releation (binding product to a category)

  • Assets (Media Files management)

The list of fields and field types will depend on a specific Optimizely (Episerver) configuration. Therefore, more fields may be required for the integration to work.

Category (Node) Module

Field name

Field type

Description

Code

Text field

Unique Category identifier. Field definition should be configured to not allow duplicates.

Catalog

Text field

Name of the catalog in Optimizely (Episerver).

Name

Text field

Category name.

Meta Class

Text / option field

Meta class(es) assigned to Category(-ies) in Optimizely (Episerver).

Parent Category

Module link to the same module

Field to define parent and subcategories relations.

Show in web

Status field

Used to add or remove category in Optimizely (Episerver).

Is Active

Option field

Active/inactive status of the category in Optimizely (Episerver).

Works as true/false value depending if field is empty of filled in.

Start date

Date field

Start date of the catalog.

End date

Date field

End date of the catalog.

Sort order

Integer

Defines order of categories in Optimizely (Episerver).

Product (Entry) Module

Field name

Field type

Description

Start date

Date field

Start date of the product.

End date

Date field

End date of the product.

Entry type

Option field with 2 options: "Product", "Variation"

Currently, only 2 entry types (Product and Variation) are supported in Encodify > Optimizely (Episerver) integration.

Catalog

Text field

Name of the catalog in Optimizely (Episerver).

Code

Text field

Content: Text, Type: Text

Content: Fixed Text, Type: Fixed Text

Unique Product identifier. Field definition should be configured to not allow duplicates.

Name

Text field

Product name.

Meta Class

Text / option field

Meta class(es) assigned to Product(s) in Optimizely (Episerver).

Show in web

Status field

Used to add or remove category in Optimizely (Episerver).

Parent entry

Module link to the same module

Field to define parent and subproduct relations.

Is Active

Option field

Active/inactive status of the product in Optimizely (Episerver). Works as true/false value depending if field is empty of filled in.

Inventory Status

Text

"Disabled" if not configured differently in Optimizely (Episerver).

Product Entry Relations Module

This module is used in integration to provide binding of Products to Categories.

Field name

Field type

Description

Category

Module link to Categrory module

Category

Product

Module link to Product module

Product

Is Primary

Option field

Defines if product will be moved or copied to selected category.

Works as true/false value depending if field is empty of filled in.

More on primary/secondary categories here.

Sort order

Integer

Assets

Module used to supply media content to the Optimizely (Episerver) and link media content to categories and products.

Field name

Field type

Description

File

File/Multiple file field

Original or custom media holder as a source of media content. If multiple file field is used as a source, each uploaded file will be created as a separate asset in Optimizely (Episerver).

Asset name

Text field

Descriptive name of the asset.

Show in web

Status field

Used to add or remove asset in Optimizely (Episerver).

Connected Service


  1. Go to Site Configuration > Connections > Connected Services. With feature flag enabled, Add Service button will be available for the Episerver service type.

  2. Click Add Service.

Step 1

First step in Optimizely (Episerver) configuration wizard is creation of the connected account that will be used for integration. It is possible to create new account or select previously created one.

Connection timeout value is specified in seconds. When set to "0" means infinite timeout.

Step 4

  • Map modules and deletion status fields

  • Specify templates for node and entries that will pull the list of attributes for mapping

  • Assets: Specify asset folder path, Image Content type

  • Specify default language code

As different entry types and meta classes can have different set of fields, Entry/Template Code fields accepts comma-separated list of codes to pull the full list of parameters for mapping.

Asset Folder Path - even though integration will automatically create a folder in Optimizely (Episerver) if missing, it is recommended to create asset folder before starting to use Encodify > Optimizely (Episerver) integration.

Asset Image Content Type - Asset image content type configured in Optimizely (Episerver) (CMS > Admin > Content Type > Media Types > specific media type > Settings > Class name).

Important! Use not just the class name but the whole string like

frontend.Models.Media.ImageFile, frontend, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

or at lease first two comma separated values

frontend.Models.Media.ImageFile, frontend

Asset Pdf Content Type - Asset PDF content type configured in Optimizely (Episerver) (CMS > Admin > Content Type > Media Types > specific media type > Settings > Class name).

Important! Specify the same class as in "Asset Image Content Type" field

Default language code - Default language. Make sure language specified here matches language of the catalog in Optimizely (Episerver), otherwise synchronization of Meta-class specific fields will not work.

Step 5

Map Encodify fields to Optimizely (Episerver) parameters.

Note that the list of Optimizely (Episerver) parameters for mapping may vary depending on the Optimizely (Episerver) coinfiguration. However, generally required fields for integration will be validated if missing on connected service save.

Action Configuration


For the integration to work, corresponding actions of the type "Sync with connected service" needs to be configured in each of the modules that will be sending data to the Optimizely (Episerver).

Note that categories, products and assets can be removed from Optimizely (Episerver) either by "Delete" actions set up for the module or by clearing value of the field mapped as "Show in web".

Working Integration Example


Encodify modules and entries: Categories

Encodify modules and entries: Products

There are few ways to delete product or variation from Episerver Catalog:

  • delete a product/variation by setting item to mapped Entry deletion status;

  • delete a product/variation by deleting item in mapped module;

  • delete a product/variation by removing value from mapped Catalog field

Encode modules and entries: Product Category Relations

Encodify modules and entries: Assets

Optimizely (Episerver)

Node Relation Management - WIP


In order to display any given category in more than one location of the Web App using Episerver, additional configuration of 'Belongs To' module link field is required. ( Available in version 12.1.1 or later )

How to configure:

  1. Create new field definition in Categories module as module link with Multi Select field to the same (Category) module.

  2. Go to Site Configuration > Connections > Connected Services > Connected Services to edit existing Optimizely (Episerver) configuration wizard. Navigate to Parameters for Mappings and locate Mapped Fields section.

  3. Locate 'BELONGS TO' from the list of available fields for mapping in Category Module

  4. Map previously created 'Relationship' field with 'BELONGS TO' field.

  5. Save settings

Encodify modules and entries: Category

Within the UI, user can link a category or multiple categories in an item using the Relationship field.

Optimizely (Episerver)

In the Category we have all 3 items:

The Parent category is 'Women' with 2 subcategories: 'Hats and Scarves' and 'Dressed and Skirts'

Using the Relationship module link we are able to create additional relationship between 'Dresses and Skirts' with 'Hats and Scarves' where 'Hats and Scarves' appear in 2 locations.

Known Behavior and Limitations


  • It is not possible to change type of already synced product (variation/product).

  • It is recommended to create Asset folder before sync of Assets.

  • "Is primary" parameter will define if product should be moved or copied to/from category.

  • It is recommended to keep separate Node and Entry template items in episerver to ensure they are not deleted and will not break configured integration.

  • Product/Category relations: link to product and link to category has to be single select fields. Multi-select fields are currently not processed. ( Exception: see Node Relation Management section)

  • Code fields in Node and Category modules should be configured as unique in field definition.

  • MetaClass and Entry type should be read-only after creation as Optimizely (Episerver) does not support change from product to variation via change of the Meta Class and Entry type.

  • Encodify is a master: any changes on Optimizely (Episerver) side will always be overwritten by Encodify.

  • Previously uploaded assets will be removed from the catalog and product if Media Holder is changed in connected service configuration.

  • Import of hierarchical structure for products (product with variation) and categories (categories with subcategories) from scratch is not supported. Only on condition that parent values are already present on the Episerver side.

  • For bulk product import it is recommended to split the import file into smaller chunks (1000 items in each) to ensure successful synchronization for all the products. Import of larger chunks of data introduces a risk of failed synchronization.

  • Unsupported field types are not filtered out from “Entry Code Field“ in episerver connected service config. Meaning that even though  for example integer fields cannot be selected as “Entry Code Field“ user would have a possibility to select it and validation will appear only on saving connected service.

  • Product is not deleted from the episerver after changing value in Catalog field to nonexistent option, meaning if such Catalog was not created yet on episerver there will be no changes made during synchronization.

  • If value was removed from Catalog (module link) field after deletion item, to which it pointed out, Product/Variation would not be removed from episerver until sync mechanism is not triggered (until correspondent item in product module is updated).

  • Thumbnail(PDF logo) of synced PDF file is not shown on Episerver.

Classes for DEBUG

dk.encode.ebms.connections.episerver.service.impl.EpiserverServiceImpl

dk.encode.ebms.connections.episerver.service.impl.EpiserverRequestServiceImpl

Logging

It is recommended to search by package name in Graylog. Example:

AND loggerName:dk.encode.ebms.connections.episerver.*