Unlocking Flexible Promotions: Mastering 'Buy X Get Y' Strategies in ESHOPMAN

Unlocking Flexible Promotions: Mastering 'Buy X Get Y' Strategies in ESHOPMAN

In the dynamic world of e-commerce, effective promotional campaigns are crucial for attracting customers, driving sales, and fostering loyalty. ESHOPMAN, as a powerful headless commerce platform deeply integrated with HubSpot, provides merchants with robust tools to manage their storefronts and deploy engaging experiences via HubSpot CMS. A cornerstone of these tools is the ability to create compelling "Buy X Get Y" promotions.

However, the ESHOPMAN community recently identified a key area for enhancement in how these popular promotions function. While ESHOPMAN has always supported "Buy X Get Y" campaigns, the default behavior for applying discounts has traditionally focused on the most expensive eligible items in a customer's cart. This approach, while suitable for certain strategies, often didn't align with a very common and highly effective promotional tactic: offering the cheapest item for free, such as in a "buy 3, pay for 2" scenario.

The Challenge: Aligning Promotions with Business Goals

Consider a scenario where a merchant wants to run a "buy two t-shirts, get one free" promotion. Under the previous system, if a customer added three t-shirts of varying prices to their cart, the discount would automatically apply to the most expensive t-shirt. While this still provides a discount, it doesn't quite capture the spirit of giving away the 'extra' or 'cheapest' item, which is often the expectation for such campaigns. This limitation meant merchants had less flexibility in designing promotions that truly resonated with common consumer expectations and maximized perceived value.

Introducing Enhanced Discount Targeting in ESHOPMAN

Thanks to valuable input from the ESHOPMAN community and dedicated development efforts, we're excited to announce a significant enhancement to how "Buy X Get Y" promotions can be configured. ESHOPMAN now introduces a new setting: target_selection_strategy. This powerful addition provides merchants and developers with granular control over which eligible items receive the discount.

The target_selection_strategy can be set with two distinct values:

  • most_expensive_first (Default): This option maintains the existing behavior, ensuring that any current "Buy X Get Y" promotions continue to function without interruption. The discount will be applied to the most expensive eligible items in the cart.
  • cheapest_first: This new, highly anticipated strategy allows the discount to be applied to the cheapest eligible items in the cart. This is ideal for campaigns like "buy 3, pay for 2" where the lowest-priced item is intended to be the free one, significantly enhancing the perceived value for the customer.

Implementing the New Strategy via ESHOPMAN Admin API

For ESHOPMAN developers leveraging the Admin API to manage promotions, integrating this new strategy is straightforward. When creating or updating a "Buy X Get Y" promotion, you can now specify the target_selection_strategy within the promotion's application method. This flexibility empowers you to tailor promotional logic precisely to your marketing objectives.

Here’s a conceptual example of how you might configure a "Buy X Get Y" promotion to discount the cheapest eligible item using the ESHOPMAN Admin API (Node.js/TypeScript context):

// Example: Creating or updating a 'Buy X Get Y' promotion
// This would be part of your ESHOPMAN Admin API interaction logic.

const promoti
  // ... other promotion details like code, description, rules
  application_method: {
    type: 'buyget',
    buy_quantity: 2, // Example: Buy 2 items
    get_quantity: 1, // Example: Get 1 item free
    target_selection_strategy: 'cheapest_first', // New setting!
    // ... other application method details like discount_type, value
  },
  // ...
};

// Assuming an ESHOPMAN Admin API client instance
// await eshopmanClient.promotions.create(promotionPayload);
// OR
// await eshopmanClient.promotions.update('promo_xyz123', promotionPayload);

This new capability directly supports ESHOPMAN's commitment to providing a flexible and powerful headless commerce solution. By offering more control over promotional mechanics, merchants can design more impactful and intuitive campaigns, directly influencing customer purchasing decisions and enhancing their overall experience on HubSpot-managed storefronts.

Empowering Your ESHOPMAN Storefront

This enhancement is a testament to the collaborative spirit of the ESHOPMAN community, continually driving innovation to meet real-world e-commerce demands. Merchants now have a more powerful toolset to craft promotions that align perfectly with their marketing goals, while developers can implement these strategies with greater precision using the ESHOPMAN Admin API. Explore this new feature to unlock even greater potential for your HubSpot-powered ESHOPMAN storefront!

Start with the tools

Explore migration tools

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

Explore migration tools