Back to top

Case Study: Launching Inventory Control System with Commerce 8.x-2.0-alpha4 on Drupal 8.1

One of our clients recently became interested in taking their inventory control system to a next level. They were offered a solution to go with an out of shelf ERP system. However, it's a requirement that the client has to change the business operation in order to meet the workflow and implicit technical requirements of the ERP system. Moreover, the solution was lack of integration with existing websites and very popular 3rd party mobile platform like WeChat in China (WeChat had 697 million MAUs at the end of December, 2015).

We were brought in to the project to offer an alternative solution. So, we started with reviewing the scale of the business first:

  • One young fashion brand
  • 4 physical retail stores with the 5th one opening within 2 months
  • 1 Magento powered eCommerce site
  • Retail stores, warehouses and manufacturing factory in different cities and countries, such as Shanghai and Hongkong
  • One 4 years old inventory control system which required the manual labor to enter the orders made by Magento
  • 60 products with 8000 SKUs
  • 500 product attributes among Style, Color and Size

We set our goals below for the first phase of the project:

  • Make data complete and rich; this is the foundation for any future analytics and predictions of manufacture and sales. In short: Full stock movement tracking cross the whole business.
  • Centralized stock management for physical stores as well as online Mangeto store. In other words, we need a integration between the inventory control system and Magento stock
  • Offline-Friendly Point of Sales system for physical stores
  • Bulk operation for managing stocks at warehouses
  • Easy but dynamic reporting for different roles at operation to see stock as well as movements
  • High availability or redundancy

We quickly decided to use Drupal 8 (at the time, D8.0.2 was just released) with the understanding that we might need to do a lot of develop within Commerce 2.x. After 3 months, we have met all of our goals, and now we are lunching the project with Commerce 8.x-2.0-alpha4 on Drupal 8.1. In the past 3 months, we have contributed below back to the open source communities:

Below are some screenshots from the project:

(Offline-friendly dedicated page to bulk manage inventory)

(Stock movement page built with Views)

Special thanks to bojanz at CommerceGuys for the great work on Commerce on Drupal 8


Great work!


Great post and great work, so far I can see! Hopefully you keep on helping contribute to let the great base of Commerce 2.x grow and become continously better and more mature :)

btw, I don't know, if you're already in contact, but I mentioned your Github port and this post in the Commerce Stock issue queue:

best regards,

purchase price


Does the module support purchase price so it is possible when doing accounting to get an exact value of the entire stock?

Hey, great work on migrating


Hey, great work on migrating stock to Drupal 8.

Had a look at the module (made a first pull request for a composer.json file) and like the way it works and fits in with the Commerce ecosystem I proposed last year.

Including all the UI actions and services adds a whole new level, but I think it would be better to separate these out.

If I already have an ERP system I only need all of the entity types for stock and the checkout type actions. All the management, stock receipts etc are managed in the ERP and synced by a REST API etc.

So the base functionality can be in the Commerce Stock module, and then the Commerce ERP module extends that with the UI for managing stock in Drupal.

There could then be integration modules like the to sync stock data and actions with and external ERP system.

Thanks for the feedback.


Thanks for the feedback. Splitting up the current module is also on my mind. In my opinion, commerce_stock would work just like the simple stock module in D7, which would work out of box with inline_entity_form and only keep track the on-hand stock.

The rest of stuff would be Inventory Control Workbench (screenshot above) and Stock Movement. These two might be nice to fit in a submodule.

On the other hand, I haven't thought about integration with external ERP, as I haven't used any ERP at all.

About offline stock management



Can you please elaborate on the offline screen. It seems you load an online page ... I presume this page is not kept open the entire day and then save periodically when the user is online?
How does the offline inventory work?


Thanks for asking


The "add one more" button from Drupal 8 default form only works when the client is connected to the server. Each click will get a response from the server and update its index and security data behind the scene. That's a lot of overhead in our use case, considering the operation stuff will click that button or using barcode scanning gun to trigger that button many times a minute. Also, they don't want to wait one ore two seconds, they want to bulk operate. Therefore, an implementation was added on the client side to match how D8 process form's meta data, therefore, no connection required until form submission.

Add new comment