LASUG Insite Plus Sitecore Connector

21
Making the Connection: InsiteCommerce & Sitecore Kautilya Prasad & Dan Solovay XCentium

Transcript of LASUG Insite Plus Sitecore Connector

Making the Connection:InsiteCommerce & Sitecore

Kautilya Prasad & Dan SolovayXCentium

On the menu…1. What is Sitecore Commerce Connect?2. What is InsiteCommerce?3. The InsiteCommerce Plus Sitecore connector in action.4. A look behind the scenes.5. Q&A

What is Commerce Connect?

• Framework for wiring up commerce systems to Sitecore• Imports products to Sitecore• Provides APIs for shopping

funnel• Goals and Engagement Plans• Extensible architecture

• Pipelines• Domain Objects• Repositories

Commerce Connect

Insite 4.1-4.x

InsiteCommerce Plus Sitecore

Sitecore 8.X

What is Insite Commerce ?• Deep integration

capabilities • Manage products• Assign pricing• Maintain inventory• Order processing• Out of the box

functionality• Search• Frontend

• B2C and B2B ecommerce

Dan Solovay
aspect ratio, add muted shadow, line. Add space.

Insite Commerce .. continued• Exposes rest APIs to

interact with Insite• Multisite• Multi currency• Multi lingual• Customer based catalogues• Customer based pricing• Power platform for B2B

Insite Plus Sitecore ConnectWhat is it?• Product

• Connects Sitecore and Insite• Standardization

• Standard Sitecore APIs used for information flow

• Development• No knowledge of underlying

Insite APIs required• Personalization

• Track user history and personalize

• Marketing• Monitor goals and

Engagement Plans

First Time User – Featured Products Returning Customer –

Personalized Products based on history

Insite Plus Sitecore Connect… continued• Easy Integration

• Bring Products into Sitecore

• xDB• Track user activity, goals

• Time to Market• Effort required for

development• Unique Insite Features

• Customer Based Catalogues

• Pricing• Sitecore Commerce Connect

8.0• Extensible and Robust

Insite Plus Sitecore Connect… continued

Search capabilities• Implement Sitecore

search• Insite search

Mix product content

Dan Solovay
Add slides where you zoom in, show relationship. Show full UI for both systems. Show same faucet on both.

How does the Content Tree look like?

Demo

So, how does this all work?• Pipelines and Service Providers

• Service Providers wrap pipelines• Pipelines interact with xDB and Sitecore Content• We implemented commands for talking to Insite 4.x Rest

API

• Entities and Repositories• Entity classes (product, category, etc.) are pure DTOs with

no dependencies on Commerce System or Sitecore.• Repository classes provide access, mapping methods.• We extended both to provide some Insite specific features

(Unit of Measure, Category images)

• Product Sync• Loads “artifacts” first: images, classes, categories, global

attributes• Then it updates each product• Insite Styled Variants as a challenge: attributes are

contained in parent item.

Pipelines connect shop to Sitecore Pipelines exist for all user and shopping funnel events,

with processors for all Sitecore communication.• Reading or saving commerce entities to Sitecore:

• Recording to xDB (Goals, Events, Engagement Automation):

Pipelines connect Sitecore to InsiteSitecore provides stub methods for communication to External Commerce System…

We override these to query the Insite API…

… and write the results to pipeline argument properties.

So how is this content stored in Sitecore?• Commerce entities are defined as entity classes:

• Repository classes map these to Sitecore items:

• Repositories provide abstraction layer between code and persistence (items, user manger, or xDB)

Insite IDs are mapped to Sitecore IDs• MD5 hashing used to turn Insite IDs to Sitecore IDs:

• Item.ID = MD5.ComputeHash(prefix + Insite ID)• Prefix is defined in repository parameters (e.g. “Product_”).• Faster than storing ID conversions, and does not use disk.• Ensures products consistently map to items

Repository configuration ties it all together• A type to manage the collection.• The branch template for creating items.• The location of the repository• The prefix for ID Generation

Dan Solovay
How

Repositories & entities are extensible1. Add new base template

2. Override entity class definition in configuration

3. Extend repository class in configuration and extend mapping methods

SynchronizeProducts pipeline loads the repository

SynchronizeProducts has four steps

• Synchronize artifacts: Categories, classes, manufacturers,• Load list of products• Synchronize each product entity individually• Synchronize each product attribute or relationship

Challenge of Styled Variants• Attributes are loaded before products, but for Insite Styled Variants,

attributes are part of parent product.• Solution:

• Call mini artifacts pipeline• Call mini product pipeline• Return to main product pipeline

To learn more…• Watch the series on YouTube “Master Sitecore” channel

• Follow Kautilya’s blog posts at XCentium.com