Personalized Notifications
Notifications – whether push, email, SMS, or in-app messages – are a direct line to your users. Used effectively, they can re-engage dormant users, announce relevant new content, highlight timely offers, recover abandoned carts, and provide genuine value. However, generic notification blasts are often ignored or, worse, lead to uninstalls and unsubscribes. The key to effective notifications is personalization: sending the right message, with the right content, to the right user, at the right time. But building a system capable of delivering truly personalized, relevant notifications at scale is a significant technical undertaking.
The Shaped Approach: Simplifying the Personalization Intelligence
Shaped handles the data ingestion, trains the sophisticated ML models needed for content selection, and provides simple APIs to retrieve those personalized recommendations. You still need systems for triggering, audience selection, message assembly, and delivery, but Shaped provides the critical personalization intelligence layer.
How Shaped Streamlines Personalized Notifications:
- Data Integration: Connect your user, item, and interaction data using Shaped's connectors.
- Automated Modeling: Shaped trains state-of-the-art models optimized for predicting user preference and relevance.
- Simple API for Content: Use Shaped's
rank
(orsimilar_items
,complement_items
) API to easily fetch the best item(s) to feature in a notification for a specific user, given a trigger or context. - Managed MLOps: Shaped handles the complex model training, tuning, deployment, scaling, and retraining infrastructure.
- Provides Embeddings: User/item embeddings generated by Shaped can be used by your triggering system for advanced audience segmentation.
Using Shaped for Personalized Notification Content
Let's illustrate how your notification orchestration system would leverage Shaped's SDKs.
Goal: Send a notification to a user featuring the product they are most likely to be interested in right now.
1. Ensure Data is Connected: Assume relevant datasets (user_interactions
, product_catalog
) are connected to Shaped.
2. Define and Train Your Shaped Model: Create a model in Shaped focused on predicting user preference for items.
model:
name: notification_item_recs
connectors:
- type: Dataset
name: user_interactions
id: interactions
- type: Dataset
name: product_catalog
id: products
fetch:
events: |
SELECT user_id, item_id, timestamp AS created_at, event_type FROM interactions
# Potentially add labels based on event_type
items: |
SELECT item_id, title, category, image_url, price FROM products
Create the model using the CLI:
shaped create-model --file notification_content_model.yaml
Wait for the model to become ACTIVE
.
3. Integrate Shaped into Your Notification Orchestrator (Your System - Step 3 from above):
Imagine your orchestration system (written in Python or Node.js) detects a trigger for user_id = 'USER_ABC'
.
- Identify Target User: Your system determines
user_id = 'USER_ABC'
should receive a notification. - Call Shaped for Content (using SDKs): Your orchestrator uses the Shaped SDK to get the top recommended item(s) for this user.
- Python
- JavaScript
const { Shaped } = require('@shaped/shaped');
const shapedClient = new Shaped();
const userIdToNotify = 'USER_ABC';
const modelName = 'notification_item_recs';
const response = await shapedClient.rank({
modelName: modelName,
userId: userIdToNotify,
limit: 1, // Assuming we want just the single best item
returnMetadata: true
});
const topItemId = response.ids[0];
const topItemMetadata = response.metadata ? response.metadata[0] : null;
// Proceed to assemble and dispatch notification using topItemId and topItemMetadata
console.log(`Recommended item for ${userIdToNotify}: ID=${topItemId}, Metadata=${JSON.stringify(topItemMetadata)}`);
from shaped import Shaped
# Initialize the client (typically done once)
# Assumes SHAPED_API_KEY environment variable is set
shaped_client = Shaped()
user_id_to_notify = 'USER_ABC'
model_name = 'notification_item_recs'
# Call the rank endpoint
response = shaped_client.rank(
model_name=model_name,
user_id=user_id_to_notify,
limit=1, # Assuming we want just the single best item
return_metadata=True
)
top_item_id = response.ids[0]
top_item_metadata = response.metadata[0] if response.metadata else None
print(f"Recommended item for {user_id_to_notify}: ID={top_item_id}, Metadata={top_item_metadata}")
- Receive Personalized Content ID: Shaped's SDK returns the response containing the top-ranked
item_id
(and metadata if requested). - Assemble & Dispatch: Your orchestration system takes this personalized content information, inserts it into your notification template, and sends it via the appropriate delivery channel (Push, Email, etc.) for
USER_ABC
.
Shaped provides the item_id
and metadata via a simple SDK call; your systems handle the triggering, assembly, and delivery.
Conclusion: Focus on Strategy & Delivery, Let Shaped Handle the AI
Personalized notifications are a powerful engagement tool, but building the underlying AI system to select the right content for each user is a major technical hurdle. Shaped removes this critical bottleneck by providing the personalization intelligence layer as a managed service, accessible via easy-to-use SDKs and APIs.
By integrating Shaped into your existing notification workflows, you can easily fetch the most relevant item for each user, ensuring your messages resonate far better than generic blasts. Let Shaped handle the complex AI, so you can focus on crafting effective notification strategies and managing your delivery channels.
Ready to send smarter, truly personalized notifications?
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.