Multi-OnHold Logic Applier

Multi-OnHold Logic Applier

Tags
Projects
iHerb
Order Management System
Published
June 1, 2020
Author
Jason Kim
Role: Software Development Engineer
Company: iHerb
Technologies: .NET, SQL, MongoDB, Redis
Duration: 10/2020 - 08/2020
 

Overview

In countries like Israel, import tax regulations impose additional duties when multiple shipments from the same consignee arrive within 72 hours and their combined value exceeds $75 USD. To help customers avoid these unnecessary charges—and to reduce seller-side fees—the Orders Management Team at iHerb.com introduced a dynamic order hold logic within the order placement pipeline. This logic ensures that qualifying orders are strategically delayed to remain compliant with country-specific import rules.
 

Key Contributions

  • Designed and implemented a configurable service for applying country-specific import hold rules in the Order Management System, supporting over 12.5M monthly active users across 180+ countries.
  • Refactored legacy stored procedures into query-driven logic using the Specification Pattern, enabling easier maintenance and improved readability.
  • Implemented optimistic concurrency control to resolve database conflicts during high-volume order placement.
  • Engineered the Israel-specific logic in a modular and extensible way, allowing future expansion to other countries with similar regulations.
 

Outcomes

  • Achieved a 2% reduction in seller fees by proactively managing cross-border compliance through smart order holding logic.
 

Resources