Skip to main content

Drupal as a front end for headless Hybris ecommerce – Part 2: Integrations

Aug 05 '15

Drupal hybris ecommerce

In Part 1 of this series, we mentioned how Drupal and Hybris ecommerce were able to give our client the best of both worlds. Now, let’s show how this was set up! Drupal has been used as a platform for ecommerce with different shopping configurations such as Ubercart or Drupal Commerce. Our project didn’t fit the bill for either of those, as Hybris ecommerce is the driving engine for CRM, inventory management, order generation, and fulfillment. This allowed Drupal to do what it does best, allowing the merchandising team to curate the catalog with its first class CMS.

Using Migrate, we were able to run the initial import of the products in Hybris with the majority of the desired copy from the marketing team. This provided the foundation of data into the CMS, which the marketing team can manage as they see fit. After the initial import, we were able to connect to Hybris APIs in order to sync inventory and price data. This allows the site to display prices that are up to date, and show when products are out of stock.

Since Hybris handles order generation, and routes that to fulfillment, the API provided us with a way to view and manipulate cart and order data. This generated a rich cart with cross product merchandising based on taxonomy terms and rules, that can be customized by the merchandising team. This also cut out some headaches managing carts and order generation within Drupal. With the Hybris API calls, we are able to add, update, and remove items from the order, and not have to store carts in Drupal. This allows for both anonymous carts and authenticated carts for customers. If a user with an authenticated cart leaves without checking out, then the cart will patiently wait holding their items until their next return.

The Hybris APIs also provided calls to handle CRM and user account creation. For CMS users (Copywriters, Administrators, etc…), we are still authenticating against Drupal, but for store customers, we are able to authenticate them against Hybris. With this integration, Hybris CRM is the point of authority for customer data, such as saved Addresses and newsletter preferences. This clears up the headaches associated with ensuring personal data is stored correctly in Drupal. On the other side of the coin, with Drupal’s powerful Form API, we were able to create robust forms to capture appropriate customer data with a solid UX for customers.

The API calls to Hybris provide a simple way to pass account, inventory, and cart data back and forth between Drupal. The data is passed around in JSON, which makes building requests and handling responses very simple. And the list of errors and exceptions are straightforward, so mapping those to friendly meaningful error messages is direct. With Hybris handling so much of the ecommerce functionality, and providing a simple JSON API interface, Hybris and Drupal have enriched each others’ shopping experiences.

Check back soon for the next post in this series where the team will reveal some more of the integrations we built with Drupal and Hybris.