Ensuring Accurate Custom Adjustments in ESHOPMAN Order Creation

As an e-commerce migration expert at Move My Store, we frequently highlight crucial updates and insights from the ESHOPMAN community. ESHOPMAN, our headless commerce platform seamlessly integrated with HubSpot, empowers merchants to manage their storefronts and deploy experiences via HubSpot CMS. Its robust Admin API and Store API, built on Node.js/TypeScript, facilitate complex e-commerce operations, including subscription management and custom order processing.

A recent discussion within the ESHOPMAN community brought to light an important interaction concerning custom line item adjustments within the order creation workflow. This insight is particularly valuable for developers and merchants leveraging ESHOPMAN for advanced scenarios like subscription renewals.

The Challenge: Unintended Adjustment Removal in Order Creation

A specific scenario was identified where custom line item adjustments, crucial for accurate pricing in processes like subscription renewals, were being inadvertently removed during the ESHOPMAN create order workflow. The issue stemmed from an internal mechanism, the refreshDraftOrderAdjustmentsWorkflow, which was designed to manage adjustments on draft orders. However, this workflow was executing universally, even when creating finalized orders, leading to the removal of any custom adjustments that had been manually applied or passed through the Admin API.

Consider a subscription renewal process: a merchant might apply a specific discount, a loyalty credit, or a bespoke service charge as a custom line item adjustment. When this order was then processed through the ESHOPMAN create order workflow, the expectation was that these custom adjustments would be preserved. Unfortunately, the always-on execution of the refreshDraftOrderAdjustmentsWorkflow would overwrite these custom entries, resulting in an incorrect final order total.

Expected vs. Actual Behavior

  • Expected Behavior: Custom adjustments passed to the ESHOPMAN create order workflow should be respected and included in the final order.
  • Actual Behavior: Custom adjustments were removed, leading to discrepancies in order pricing, especially for non-draft orders like those generated during subscription renewals.

The ESHOPMAN Resolution

The ESHOPMAN development team has swiftly addressed this critical behavior. An update has been implemented to ensure that the refreshDraftOrderAdjustmentsWorkflow now correctly identifies and applies its logic only to draft orders, as originally intended. This means that when you utilize the ESHOPMAN Admin API to create an order, particularly for scenarios like subscription renewals that involve custom line item adjustments, these adjustments will now be accurately preserved and reflected in the final order.

This resolution significantly enhances the reliability and flexibility of ESHOPMAN's order management system, particularly for businesses that rely on precise custom pricing and dynamic adjustments within their commerce workflows. It reinforces ESHOPMAN's commitment to providing a robust and adaptable headless commerce solution for HubSpot-powered storefronts.

Key Takeaways for ESHOPMAN Users

For ESHOPMAN developers and merchants, this fix underscores the importance of:

  • Staying Updated: Regularly updating your ESHOPMAN instance ensures you benefit from critical fixes and enhancements that improve platform stability and functionality.
  • Reviewing Workflows: When implementing complex order creation or subscription renewal processes, always validate that custom adjustments are behaving as expected post-update.
  • Leveraging the Admin API: The ESHOPMAN Admin API offers powerful capabilities for custom order creation, and with this fix, its reliability for managing custom adjustments is further solidified.

This community insight demonstrates how ESHOPMAN continuously evolves to meet the sophisticated demands of modern headless commerce, ensuring that your HubSpot-managed storefront operates with precision and efficiency.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools