Skip to main content

Personalized Email Marketing

Email marketing remains a powerful channel for customer engagement and revenue generation. However, the days of generic email blasts are long gone. Today's consumers expect relevance. Personalized emails – those tailored with content and offers specific to the individual recipient – consistently outperform generic campaigns in open rates, click-through rates (CTR), and conversions. But achieving true 1:1 personalization at scale, especially incorporating personalized product or content recommendations within the email and even tailoring subject lines, involves overcoming significant technical hurdles.

Using Shaped for Personalized Email Content

Let's illustrate how your email orchestration system (Step 3 above) would leverage Shaped's SDKs.

Goal: Send emails with personalized subject lines (informed by recommendations) and personalized product recommendations in the body.

1. Ensure Data is Connected: Assume user_interactions, product_catalog, and user_profiles (with email addresses) are connected to Shaped.

2. Define and Train Your Shaped Model: Create a model focused on predicting item preference.

email_content_model.yaml
model:
name: email_item_recs
connectors:
- type: Dataset
name: user_interactions
id: interactions
- type: Dataset
name: product_catalog
id: products

# Optional: Connect user profiles if needed for features
# - type: Dataset
# name: user_profiles
# id: users

fetch:
events: |
SELECT user_id, item_id, timestamp AS created_at FROM interactions
items: |
SELECT item_id, title, category, brand, image_url, product_url, price FROM products

# Optional: Select user features if profile data is connected
# users: |
# SELECT user_id, segment, location FROM users

Create the model via CLI and wait for it to become ACTIVE.

shaped create-model --file email_content_model.yaml

shaped view-model --model-name email_item_recs

3. Integrate Shaped into Your Email Orchestration System:

Your orchestration system iterates through the target audience list. For each user_id (USER_XYZ) and their email_address:

  • Fetch Personalized Content from Shaped:

const { Shaped } = require('@shaped/shaped');

const shapedClient = new Shaped(); // Assumes SHAPED_API_KEY env var

const response = await shapedClient.rank({
modelName: 'email_item_recs',
userId: 'USER_XYZ',
limit: 3,
returnMetadata: true
});

recommendedItems = response.metadata || [];
const topItem = recommendedItems[0];
let personalizedSubject = "Check out these recommendations!"; // Default
if (topItem.category) {
personalizedSubject = `New finds in ${topItem.category} you might love!`;
} else if (topItem.brand) {
personalizedSubject = `Top picks from ${topItem.brand} for you!`;
} else if (topItem.title) {
personalizedSubject = `Recommended for you: ${topItem.title}`;
}
// Now you have:
// - personalizedSubject (String)
// - recommendedItems (Array of item metadata objects)

// ... Proceed to assemble email HTML using these ...
// ... Send via ESP API ...

  • Assemble Email: Use your templating engine to insert personalized_subject and loop through recommended_items to display products/content in the email body.
  • Send via ESP: Dispatch the unique, personalized email using your ESP's API.

Shaped provides the core content personalization intelligence; your systems handle the overall email workflow.

Conclusion: Focus on Email Strategy, Not Complex AI Infrastructure

Personalized email marketing drives significantly better results, but building the underlying AI systems for both subject line optimization and body content recommendations is a major technical challenge. Shaped removes the heaviest lift by providing the state-of-the-art AI models and simple APIs needed to select the most relevant content for each user.

By integrating Shaped into your email orchestration process, you can easily fetch personalized item recommendations to populate your email bodies and inform your subject line strategies. This allows your team to focus on crafting compelling campaigns, managing deliverability, analyzing results, and refining your overall email marketing strategy, while leveraging powerful AI without building it from scratch.

Ready to send emails your users will actually want to open and click?

Request a demo of Shaped today to see it in action with your specific use case. Or, start exploring immediately with our free trial sandbox.