Rule x Tweakwise
Rule.io ESP x Tweakwise
Introduction
By integrating Tweakwise with Rule, you can send product recommendations over e-mail. This enables you to send targeted mailings based on what your customers are interested in, which in turn can increase sales for your e-commerce.
Why do this? It allows you to adjust sorting rules, create specific banners in the Builder, and serve targeted recommendations based on a user's status in Rule.
In this guide, we will cover the configuration in Rule, the mapping of attributes, and how to utilize this data via the Tweakwise Delivery API.
Read more on the rule.io help section: https://help.rule.io/en/articles/349565-tweakwise-integration
Instruction/Implementation
1. Retrieve your Tweakwise Instance Key
Before starting in Rule, you need your unique Instance Key.
- Log in to the Tweakwise App.
- Open the instance for the environment you wish to sync data to.
- On the dashboard, copy the
Instancekey.
2. Configure the recommendation
- Go to Recommendations, create the desired recommendations (e.g. featured)
- Remember the
recommendation idfor the created record.
3. Configure the e-mail
To ensure Tweakwise knows which user is browsing, you must pass a identifier (usually the profileKey) in your API requests:
GET /recommendations/featured/{instancekey}/{recommendationid}?tn_profilekey={customer_id}To automatically use the right rule profile, use [CustomField:TweakWise.profilekey].
Example: loops through all recommendations and display the product title
<!--[Loop:[XmlDoc:https://gateway.tweakwisenavigator.com/recommendations/featured/{instancekey}/{recommendationid}?tn_profilekey=[CustomField:TweakWise.profilekey]
|| recommendation.items.item]]-->
[LoopValue:title]
<!--[EndLoop]-->
Notes/Important Considerations
- ⚠️ Identifier Consistency: The identifier used in Rule (often email or a unique UUID) must match the
profileKeyyou send to Tweakwise in the frontend. If these don't align, personalization will fail silently. - Sync Latency: Data sync from Rule to Tweakwise is not instantaneous. It typically follows a scheduled batch process. Do not expect real-time segment updates for brand-new newsletter signups within the same session.
- Data Volume: Only sync attributes that are actually used for merchandising. Bloating the index with unused marketing data can impact performance.
FAQ
Q: Can I use Rule data in the Tweakwise Builder? A: Yes. You can use the External Data Components to show different visuals or product grids based on the Rule attribute assigned to the visitor's profile.
Q: What happens if a user is in multiple Rule segments? A: Rule typically sends these as a comma-separated list or multiple values. Ensure your Tweakwise attribute is configured to handle multiple values if you plan to filter or sort based on overlapping segments.
Updated 7 days ago
