Views: 4098
Number of votes: 10
Average rating:

Real-world integration for Episerver Commerce implementation

When implementing an Episerver CMS solution, integration with external systems is not always required. However, I have not seen any Episerver Commerce implementation that can go live without integration. The following diagram depicts a typical B2C Episerver Commerce implementation which has multiple integration touchpoints with various external systems.


image


Below table shows the list of touch points that a typical Episerver Commerce implementation would have:

#

Touch point

Direction

External system

1

Product catalog

In

ERP / RMS

2

Product pricing

In

ERP / RMS

3

Product inventory

In

ERP / RMS

4

Promotion

In

ERP / RMS

5

Product enrichment

In

PIM or Files

6

Product feeds

Out

Marketplaces

7

Subscribers

Out

Email Marketing Automation

8

User events

Out

Email Marketing Automation

9

Payment

Out

Payment Gateway

10

Order

Out

OMS

11

Order status

In

OMS

12

Sales data

Out

ERP / RMS

13

Transactional emails

Out

Email Delivery Service

This blog post aims to share my integration experience gained through a number of Episerver Commerce projects that I have participated in.

There are 2 main sections in this blog post:

  • External systems: lists typical external systems to which Episerver Commerce needs to integrate with.
  • Integration touch points: provides high-level description of each touch point.

External systems

The e-commerce value chain comprises of several primary activities namely product management, marketing, sales, fulfillment and customer service hence it is quite complex and involves a number of external systems:

  • ERP (Enterprise Resource Planning) or RMS (Retail Management System): this is the core back-end system for retailers to manage both online and in-store operations. ERP / RMS is the source of truth for product catalog, pricing, and inventory. Retailers can also run omni-channels sales campaign from ERP / RMS to offer the same promotions to both online and in-store customers.
  • PIM (Product Information Management): some retailers adopt PIM (such as inRiver) to manage product images and extended attributes which are required by e-commerce site to show in product listing page and product detail page. Majority of retailers, however, don’t have a PIM hence product images and extended attributes must be imported from files.
  • Payment gateway: payment gateways enable online payments are required for e-commerce sites. In addition to credit cards, e-commerce sites also offer alternative payment methods such as Paypal or finance options such as AfterPay or ZipPay in Australia. Therefore, integrating with multiple payment gateways is not uncommon.
  • OMS (Order Management System): order fulfillment is typically done through OMS which can be a separate system or a module within ERP / RMS. OMS can manage both fulfillment options: home delivery (via logistic providers) and Click&Collect (store pick-up).
  • Marketplaces: in addition to selling on own websites, retailers usually sell their products on marketplaces such as Google Shopping, therefore it’s required for Episerver Commerce to share products in form of product feeds.
  • Email Delivery Service: Episerver Commerce needs to integrate with a reliable Email Delivery Service such as SendGrid to send out transactional emails such as order confirmation.
  • Email Marketing Automation: Email Direct Marketing (EDM) plays an important role in e-commerce to retain customers and boost sales, therefore, Episerver Commerce needs to integrate with an Email Marketing Automation system such as Episerver Campaign, Eloqua, Adobe Marketing Cloud or Salesforce Marketing Cloud for retailers to send out relevant promotional emails.

In addition to the above external systems, Episerver Commerce might need to integrate with other systems for shipping fee calculation, customer reviews, live chat … but I leave them out in this blog post to focus on the key external systems.

Integration touch points

1. Product catalog

Product catalog is the heart of any e-commerce platform as they are essentially what retailers want to sell. As products are already set up in ERP / RMS, it’s a must to sync product catalog from ERP / RMS to Episerver Commerce automatically instead of manually managing online catalog and in-store catalog separately. Episerver provides flexible mechanism to programmatically create and update products in Episerver catalog system.

Typically, all products should be imported to Episerver Commerce prior to go-live and delta update should be reflected in Episerver as and when needed using CatalogContentProvider or Service API Catalog RESTful operations. Note that product categories in ERP / RMS need not be the same as e-commerce product categories, hence category mapping between ERP / RMS and Episerver is required. A proper Episerver Commerce implementation must also take into consideration the following scenarios: product category change and product discontinuation.

2. Product pricing

Episerver administration console provides interface for users to edit product pricing, however, typically product pricing should be sync’ed from ERP / RMS. Episerver Commerce provides IPriceDetailService API to update prices in Episerver. In addition to market-specific pricing, retailers usually set up retail price (original price) and markdown price (actual sale price), therefore sales code in price table should be used to indicate which is which. Customer-specific pricing can be implemented using sales type field in pricing table. In summary, sales code and sales type in combination can be used to implement most of pricing logic required by retailers.

3. Product inventory

Product inventory is usually sync’ed regularly from ERP / RMS to ensure products are not oversold online. Episerver provides powerful IInventoryService to manage InventoryRecord that represents product inventory in each warehouse. Retailers can have one single warehouse to manage all online stocks or multiple warehouses for multiple markets/regions. Logics must be implemented in Episerver to cater for products with no inventory by either unpublishing the corresponding product/variation or allow back-order / pre-order / notification when back in stock.

4. Promotion

Retailers usually use Episerver administration console to create promotions either for Web-only promotions or in-store promotion replication, however, for true omnichannel shopping experience, retailers usually require to auto sync promotions from ERP / RMS to e-commerce. Fortunately, Episerver allows developers to create promotions (aka discounts) from code with the new promotion engine either using built-in promotions or creating custom promotions.

5. Product enrichment

Product data from ERP / RMS don’t usually contain product images and additional information for display in e-commerce sites, therefore, product enrichment process must be carried out to populate products with media assets and extended attributes from either PIM or external files.

For product extended attributes, CatalogContentProvider or Service API Catalog RESTful operations can be used to add and update. For product images, users can, of course, upload images manually and link them to product catalog items, however, Episerver Service API provides media bulk import methods to import a large amount of media assets to Episerver and catalog asset link methods to link assets to product catalog items. Episerver Commerce also provides another way to manage assets in a product catalog using IAssetContainer and CommerceMediaCollection API.

6. Product feeds

The most widely-used format for product feeds is Google product data specification aka Google product feed. You can implement your own or use the existing GoogleProductFeed package in GitHub. Product feeds should be made available via public URL.

7. Subscribers

Most of e-commerce sites provide functions for customers to subscribe to newsletter and promotional emails. These kinds of Email Direct Marketing (EDM) activities are managed outside Episerver in Email Marketing Automation platform hence Episerver Commerce should send subscribers to Email Marketing Automation upon subscription. In advanced integration, Episerver can also share product catalog and additional customer data.

8. User events

EDM based on user journey such as cart abandonment EDM proves to be quite effective hence Episerver should also send user events (such as when a cart is abandoned) to Email Marketing Automation system. This can be implemented by either calling provided API or embed a provided script to detect those events.

9. Payment

There are 3 integration methods when it comes to payment:

  • redirect to payment gateway website
  • embed payment gateway UI as an iframe in retailer’s website
  • use API (either client-side or server-side)

The first 2 methods are simpler to implement and easier to achieve PCI compliant, however, redirection or iframe embed don’t usually provide seamless user experience. Most of payment gateways come with comprehensive developer’s documentation which makes life easier for Episerver developer. In addition, Episerver supplies payment provider packages for Paypal, DIBS, and DataCash. For other payment gateways, you can refer to source code of these payment providers in GitHub to build your own payment providers.

10. Order

Order data containing order line items and shipping address must be sent to Order Management System for fulfillment. This can be done by calling OSM API directly or regularly exporting order data to files for OMS to consume. When using API, it’s important to decouple OMS from check out process so that customers can place an order when OMS is not running. To do that, an order queue should be implemented so that orders stay in the queue until they are sent to OMS.

11. Order status

Order fulfilment status should be sync’ed back from OMS to Episerver so that order status (including shipping tracking number) can be updated inside Episerver Commerce and corresponding transactional emails can be sent to customers. Episerver provides IOrderRepository to load and update orders. An order can be shipped in multiple shipments, half-fulfilled / canceled due to stock unavailability, therefore a proper implementation should be able to reflect the actual fulfillment status in user' profile’s order history section.

12. Sales data

In addition to fulfillment, online sales data (order data) should be sync’ed to ERP / RMS for finance accounting reconciliation. In some implementations, sales data are sync’ed from OMS to ERP / RMS, in some other implementations, Episerver should send sales data to ERP / RMS in batch or per order. This can be done via API calls or file export/import.

13. Transactional emails

To send out transactional emails related to user registration and orders, Episerver must use an external Email Delivery Service which can be simply an SMTP server or a more sophisticated email platform such as SendGrid or Amazon SES (Simple Email Service) to ensure email deliverability and access to tools to troubleshoot email delivery issues. Episerver can integrate with Email Delivery Service either via SMTP configuration or using respective API.

Conclusion

Episerver Commerce implementation is typically far more complex than Episerver CMS implementation especially when it comes to integration. Therefore, before taking on the journey, you should analyze all the integration touch points mentioned above as the starting point and discover if there are more to cover. The questions you should ask include:

  • What are the names of each external systems? For example, ERP is Microsoft Dynamics, Email Marketing Automation is Marketo …
  • What are the available integration methods for each external system? For example Web services, REST API, file-based … 
  • What are the data fields required for each integration touch points and mapping to internal data fields in Episerver Commerce?

I will provide more details on each integration touch point in my future blog posts.

P/S: This is my first blog post in the series that I planned to write about Episerver Commerce implementation which will cover most of the aspects throughout the project life cycle.

Nice post. However at this point we recommend to use the new promotion system -built around IPromotionSystem instead.The old one is going to be removed soon.

Great post and completely agreed with Quan re the new marking system, so have a look

https://world.episerver.com/documentation/developer-guides/commerce/marketing/

Promotions are now called Discounts. Below is the list of all available discounts in Commerce 12

https://world.episerver.com/documentation/class-library/?documentId=commerce/12/C42F6B08

Thx Quan and Tien for your inputs. I've revised the promotion section to mention the new marketing system instead.

Thx Son Do for your suggestion but as mentioned in the post, there are other integration touch points including those you mentioned but I wanted to focus on the key ones.

Great overview and drawing of typical integration points.

Hey Tuan a good rough cut, great to see you picked up the basics during your time with us.  

Thx Stefano & Aaron. Episerver is a great platform to fully understand the complexity behind e-commerce implementation. Powerful yet flexible.

Please login to comment.