development-integrations

Unlocking Granular Control: ESHOPMAN's Enhanced Delivery Notification Management

As an e-commerce platform built for headless commerce and deeply integrated with HubSpot, ESHOPMAN empowers merchants with robust storefront management and flexible order processing. In the dynamic world of online retail, managing customer experience extends far beyond just transactions; it encompasses every touchpoint, especially communication. Precise control over these interactions is paramount. Recently, our vibrant ESHOPMAN community identified and addressed an important enhancement concerning order fulfillment notifications, further solidifying ESHOPMAN's commitment to granular control and merchant empowerment.

Diagram illustrating ESHOPMAN's 'no_notification' flag for delivery updates
Diagram illustrating ESHOPMAN's 'no_notification' flag for delivery updates

The Imperative of Precise Communication in ESHOPMAN

In the intricate landscape of e-commerce operations, there are frequent scenarios where merchants need to update an order's status internally without automatically triggering a customer notification. This could be for various strategic reasons:

  • Internal Tracking: Marking an order as delivered for backend logistics or inventory reconciliation before the customer is officially informed through a separate, custom channel.
  • Specific Customer Service Protocols: When a dedicated customer service agent is handling a unique delivery situation and will communicate directly, making automated notifications redundant or confusing.
  • Custom Communication Flows: Merchants often implement sophisticated marketing automation or CRM sequences (especially within HubSpot) that manage post-purchase communication, making system-generated notifications unnecessary or even disruptive to their carefully crafted journey.

ESHOPMAN's powerful Admin API already provides developers with granular control over crucial steps. For instance, when creating fulfillments or shipments, a no_notification flag can be utilized to suppress automated customer alerts. This capability ensures that merchants can manage their operational updates without prematurely or redundantly engaging customers.

However, a specific gap was identified within the markOrderFulfillmentAsDeliveredWorkflow. While the initial creation of a fulfillment or shipment allowed for notification suppression, the final step of marking an order as delivered did not offer this direct option. This meant that even if a merchant intended to quietly update an order's status for internal purposes, the system would default to sending a "delivery created" notification to the customer. This could lead to redundant messages, confuse customers, or interfere with carefully orchestrated custom communication flows managed through HubSpot.

A Technical Deep Dive into ESHOPMAN Workflows and the Admin API

The core of this challenge lay in the structure of ESHOPMAN's robust workflow system and its associated Admin API endpoint. ESHOPMAN's workflows, built on Node.js/TypeScript, are designed to encapsulate complex business logic, emitting events that various parts of the system—including notification services—can subscribe to. This event-driven architecture is a cornerstone of ESHOPMAN's headless flexibility, allowing for extensive customization and integration.

For the markOrderFulfillmentAsDeliveredWorkflow, the input type was initially structured to accept only the essential identifiers: orderId and fulfillmentId. This design, while efficient for standard operations, inadvertently omitted the flexibility needed for advanced notification control at this critical stage. Consequently, when this workflow was invoked via the Admin API, the underlying system would proceed with marking the fulfillment as delivered and, by default, trigger the associated customer notification.

This behavior, while logical for most scenarios, presented a hurdle for merchants requiring absolute control over their communication strategy. It highlighted the need for ESHOPMAN's Admin API to offer consistent notification suppression capabilities across all relevant order lifecycle events.

Bridging the Gap: The ESHOPMAN Solution

In response to this community insight, the ESHOPMAN platform was enhanced to introduce a new no_notification parameter to the input type of the markOrderFulfillmentAsDeliveredWorkflow. This seemingly small addition represents a significant leap in empowering ESHOPMAN merchants and developers with unparalleled control over their customer communication.

Now, when developers interact with the ESHOPMAN Admin API to mark an order fulfillment as delivered, they have the explicit option to include this boolean flag. Setting no_notification to true ensures that the order status is updated internally within ESHOPMAN, but no automated customer notification is dispatched. This allows for seamless integration with external CRM systems like HubSpot, where custom email sequences or notifications might be preferred.

Implementing Granular Control: A Practical ESHOPMAN Example

Leveraging this new capability through ESHOPMAN's Admin API is straightforward for developers working with Node.js/TypeScript. Here’s a conceptual example of how this parameter can be utilized:


// Example: Mark fulfillment as delivered WITHOUT sending a notification
const markFulfillmentAsDeliveredSilently = async (orderId: string, fulfillmentId: string) => {
  try {
    const resp ESHOPMAN_ADMIN_API.markOrderFulfillmentAsDeliveredWorkflow({
      orderId: orderId,
      fulfillmentId: fulfillmentId,
      no_notification: true // Suppress customer notification
    });
    console.log('Fulfillment marked as delivered silently:', response);
    return response;
  } catch (error) {
    console.error('Error marking fulfillment as delivered silently:', error);
    throw error;
  }
};

// Example: Mark fulfillment as delivered WITH sending a notification (default behavior)
const markFulfillmentAsDeliveredWithNotification = async (orderId: string, fulfillmentId: string) => {
  try {
    const resp ESHOPMAN_ADMIN_API.markOrderFulfillmentAsDeliveredWorkflow({
      orderId: orderId,
      fulfillmentId: fulfillmentId
      // no_notification is false by default if not provided
    });
    console.log('Fulfillment marked as delivered with notification:', response);
    return response;
  } catch (error) {
    console.error('Error marking fulfillment as delivered with notification:', error);
    throw error;
  }
};

// Usage
// await markFulfillmentAsDeliveredSilently('order_123', 'ful_abc');
// await markFulfillmentAsDeliveredWithNotification('order_456', 'ful_def');

This code snippet illustrates how developers can now explicitly control the notification behavior, aligning ESHOPMAN's operational updates with their overarching customer communication strategy. This level of detail is crucial for headless commerce platforms, where the storefront (deployed via HubSpot CMS) and backend logic must work in perfect harmony with external systems.

Beyond Notifications: The ESHOPMAN Advantage for Headless Commerce

This enhancement is more than just a feature update; it's a testament to ESHOPMAN's core philosophy as a headless commerce platform deeply integrated with HubSpot. By providing such granular control through its Admin API, ESHOPMAN empowers merchants and developers to:

  • Craft Bespoke Customer Journeys: Integrate ESHOPMAN's robust order processing with HubSpot's powerful CRM and marketing automation tools, ensuring every customer touchpoint is intentional and personalized.
  • Maintain Brand Consistency: Ensure that all customer communications, whether automated or manual, adhere strictly to brand guidelines and messaging, preventing disjointed experiences.
  • Optimize Operational Workflows: Streamline internal processes by separating operational updates from customer-facing notifications, allowing teams to work more efficiently.
  • Leverage HubSpot CMS to its Full Potential: While ESHOPMAN handles the commerce backend, the storefront deployed on HubSpot CMS can now be more tightly integrated with the backend's notification logic, creating a truly unified experience.

ESHOPMAN's architecture, built on Node.js/TypeScript, ensures that such enhancements are seamlessly integrated, providing a stable and scalable foundation for modern e-commerce. The Admin API serves as the gateway for developers to unlock this flexibility, making ESHOPMAN a truly adaptable solution for businesses seeking to thrive in the headless commerce ecosystem.

Conclusion: Empowering ESHOPMAN Merchants with Unrivaled Control

The introduction of the no_notification flag for the markOrderFulfillmentAsDeliveredWorkflow is a significant step forward for ESHOPMAN. It underscores the platform's commitment to providing merchants with the tools they need for precise control over their e-commerce operations and customer experience. For businesses leveraging ESHOPMAN as their headless commerce solution within the HubSpot ecosystem, this enhancement means greater flexibility, improved communication strategies, and ultimately, a more refined and personalized customer journey. ESHOPMAN continues to evolve, ensuring that its powerful Admin API and storefront management capabilities empower businesses to achieve their unique e-commerce goals.

Share:

Start with the tools

Explore migration tools

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

Explore migration tools