Optimizely Data Platform (ODP) -> Commerce Cloud: Product Attribute Connector

The most powerful E-Commerce segmentation is possible when your data platform knows everything about your products. Then you can segment, personalise, experiment and sell to customers who are interested in various types of products.

This post explains how you can easily extend your product catalog data in ODP with First Three Things ODP Product Attribute Add On.

Optimizely’s ODP Commerce Cloud Integration

Optimizely’s Commerce Cloud integration is a no-code solution that uses Service API to sync Contact, Product and Order data to ODP.

https://docs.developers.optimizely.com/digital-experience-platform/v1.5.0-optimizely-data-platform/docs/import-data-from-optimizely-commerce-cloud

In terms of Product data, the integration sends universal catalog data such as product & variant codes, product/variant relationships, product name, image & price.

However every catalog is different with each company having their own metadata that provides additional context around each product. In an Optimizely product catalog, this data will be managed as properties attached to Products and Variants.

Sending this data to ODP allows you to create much more powerful customer segments and this is what our ODP Product Attribute Connector is responsible for.

Installation

Code is open source and available at: https://github.com/first3things/ODP-ProductAttribute-AddOn

Install the package directly from the Optimizley Nuget repository.

dotnet add package First3Things.ODPProductAttributeConnector

Add the following to your StartUp class. This extension will register the necessary dependencies.

using First3Things.ODPProductAttributeConnector.DependencyInjection;

services.AddOdpProductAttributeConnector(_configuration);

Add your API credentials to the appSettings.json file

  "ODPConnector": {
    "apiHost": "<-- host name e.g. api.zaius.com -->",
    "apiKey": "<-- your public api key retrieved in the admin area -->"
  }
}

Configuration

Create fields in ODP for product attributes you want to sync to ODP by logging in as an administrator and proceeding to:

Settings -> (Data Management) Objects & Fields -> Products

image

Additional information on that step is available in this blog post:

Update your Content Types

Add the ODP Sync attribute to any Product or Variant content type properties you want to sync.

Set the ODP Field Name within the attribute.

[OdpProductSync("brand")]
[CultureSpecific]
[BackingType(typeof(PropertyString))]
[Display(Name = "Brand", GroupName = SystemTabNames.Content, Order = 15)]
public virtual string Brand { get; set; }

Scheduled Job

An “ODP Product Attribute Connector” scheduled job will be installed in the CMS Administrative area.

This job uses reflection to retrieve your commerce content types and send property values tagged with the ODPProductSync attribute to ODP.

Additional Notes

Retrieve Catalog Business Logic

Multiple catalogs are not supported out of the box.

The business logic executed by the Scheduled Job picks the first Catalog.

If you need to overwrite this logic, inject a new implementation for

ICatalogService.GetCatalogRoot()

Useful Optimizely Documentation

Product Batch Request API: https://docs.developers.optimizely.com/digital-experience-platform/v1.5.0-optimizely-data-platform/reference/batch-requests

Recommended Product Fields: https://docs.developers.optimizely.com/digital-experience-platform/v1.5.0-optimizely-data-platform/docs/usecase-products#recommended-fields

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: