Skip to content

Why ML Recommendations Matter: Building a Custom Solution with HubSpot and AWS

In today’s marketplace, customer expectations are higher than ever. Whether in B2C (Business-to-Consumer) or B2B (Business-to-Business), buyers demand personalized experiences that cater to their unique needs. To meet this demand, businesses are adopting intelligence (AI) and machine learning (ML) solutions that deliver tailored recommendations, improving engagement, customer satisfaction, and performance across industries. HubSpot recently launched Breeze for many HubSpot native AI solutions, including prospecting and customer success agents. Organizations often need use-case-specific AI/ML-powered solutions that drive business processes not covered by Breeze functionality.

One such use case is for personalized content and product recommendations. We developed a custom eCommerce recommendation engine to address this need by integrating HubSpot’s smart CRM with AWS Personalize. We chose a B2C use case because it’s a familiar pattern that demonstrates the power of personalized recommendations without overlapping existing HubSpot features. However, AWS Personalize’s ML capabilities extend to B2B, offering lead generation, account management, and customer engagement recommendations. Over the coming weeks, we will publish a series that will guide you through every process step and showcase how personalized recommendations can transform your B2C or B2B strategy.

Context and Business Value

Personalization is no longer just a nice-to-have feature for businesses; it’s a necessity. In a market flooded with choices, the ability to provide customers with product recommendations that resonate with their individual preferences can be the difference between a one-time purchase and long-term loyalty. By tailoring the shopping journey to each user’s behavior, businesses can create a more engaging and satisfying customer experience. Below, we demonstrate the key aspects of tailoring a shopping experience and taking the solution we’ve built into action.

Tracking customer interactions through custom events

This GIF highlights how custom events, such as “Add to Cart” actions on an eCommerce website, can track customer interactions. By capturing these interactions within HubSpot, businesses can gather valuable insights about customer behavior that inform personalized recommendations. 

Example of tracking customer interactions on a website

Sending dynamic, personalized emails with product recommendations

The second GIF below illustrates the end result and how dynamic personalized emails can deliver tailored product recommendations based on customer interactions. These personalized emails are generated using the recommendations from AWS Personalize and seamlessly integrated into a HubSpot workflow. 

Example of dynamic personalized email with product recommendations

You can see above how our solution helps businesses improve marketing and sales strategies. We’ll provide you with a guide for creating recommendations used by sales representatives or marketing reps, demonstrating automated email campaigns, and monthly/quarterly reports for recommended products. This leads to better business outcomes and enhances the customer experience. It also tackles challenges like reducing cart abandonment rates and increasing average order values.

Below, we’ll explain this solution's overall project architecture and how you can build a proof-of-concept for personalized recommendations within your own CRM.

Project Overview

The project consists of two key phases (Training and Inference) that work together to build a custom B2C recommendation engine by integrating HubSpot with AWS Personalize. Below, you’ll find a diagram that visually represents the overall architecture of the solution, broken down into distinct phases and steps. In future posts, we’ll cover each phase in more detail to help you understand how the components fit together.

Project overview diagram

Phase 1: Training

This phase focuses on preparing your data and setting up the foundational elements needed for ML (personalized) recommendations.

  • Step 1: Prepare Data Model & Sample Training Data

To prepare our data model, we will upload sample training data for users/contacts, products, deals, and behavioral item and product interactions to the HubSpot CRM. Then, we will connect the data to Snowflake, ensuring smooth data extraction and transformations and loading ETL between the platforms. 

  • Step 2: Train AWS Personalize

After preparing the data model, the data is loaded into AWS S3 via Snowflake. The sample data trains a custom AWS Personalize eCommerce Recommender, which can then programmatically generate new personalized product recommendations via AWS Lambda Functions (API Development).

Phase 2: Inference

In this phase, we’ll use the trained model to generate and deploy personalized recommendations within HubSpot. 

  • Step 3: Create HubSpot Assets 

Personalized recommendations are generated and made available within HubSpot’s CRM and marketing tools, ready for campaign use.

  • Step 4: Utilize Recommendations

These recommendations are then deployed directly within HubSpot’s UI extensions and automated email campaigns.

The diagram above illustrates how each phase and its corresponding steps interact, providing a clear picture of the solution. By following these phases, you’ll be able to implement personalized recommendations effectively and enhance your eCommerce strategy.

Expected Outcomes from This Blog Series

In this series, we’ll guide you step-by-step through integrating HubSpot with AWS Personalize to create a custom recommendation engine with ML. By the end of the series, you will gain a comprehensive understanding of how to implement this solution–from preparing your data to deploying personalized recommendations in real-world marketing and sales scenarios.

In upcoming posts, we will explain each phase of the project in detail. For example, our next blog post will review Phase 1: Training, where we’ll walk you through the data preparation process, including setting up the data model in HubSpot, connecting it to Snowflake, and explaining how to train the AWS ML service. This will be followed by a post explaining Phase 2: Inference, discussing how to deploy your ML recommendations and a final recap that offers ideas for future enhancements and invites contributions from developers.

Whether you’re a HubSpot developer or a business looking to enhance your business strategy, this series will provide the technical insights and tools needed to implement advanced personalization with ML.

Stay tuned as we dive into the technical details and explore the strategic benefits in the posts to come!

Authors

Screenshot 2024-10-01 at 10.04.14 AM-1  Robert Ainslie, Manager, Solution Architecture, HubSpot
Screenshot 2024-10-01 at 10.05.15 AM Amit Das, Senior Solutions Architect, HubSpot