Rule
The Sesamy Rule integration syncs subscriber profiles, billing data, product entitlements, and tags into Rule for targeted marketing automation.
Overview
Rule is a Nordic marketing automation platform. Once connected, Sesamy automatically syncs over 50 custom fields covering user profiles, billing addresses, active products, article purchases, and subscription status. This gives you granular segmentation and personalisation capabilities for email campaigns.
Setup
To connect Rule, provide the following credentials to Sesamy support.
1. API Key
Generate an API key in your Rule account under Settings > API. This key allows Sesamy to sync subscriber data to your Rule account.
2. API URL (Optional)
If you use a custom Rule API endpoint, provide the URL. Otherwise, the default Rule API URL is used.
| Field | Type | Description |
|---|---|---|
apiKey | string | Your Rule API key |
apiUrl | string | (Optional) Custom API endpoint URL |
What Gets Synced
Profile Fields
Standard subscriber fields are synced on every event.
| Field | Type | Description |
|---|---|---|
email | string | User's email address |
firstname | string | User's first name |
lastname | string | User's last name |
phone | string | User's phone number (priority: mobile > default > work > home) |
Custom Fields
All custom fields are prefixed with Sesamy_ to avoid conflicts with your existing Rule fields.
User Fields
| Field | Description |
|---|---|
Sesamy_User.FirstName | User's first name |
Sesamy_User.LastName | User's last name |
Sesamy_User.ID | Sesamy user ID |
Sesamy_User.Created | Account creation date |
Billing Address Fields
These fields are only synced when the user has a billing address on file.
| Field | Description |
|---|---|
Sesamy_BillingAddress.FirstName | Billing first name |
Sesamy_BillingAddress.LastName | Billing last name |
Sesamy_BillingAddress.Street | Street address |
Sesamy_BillingAddress.City | City |
Sesamy_BillingAddress.Zip | Postal code |
Sesamy_BillingAddress.Co | Care of |
Sesamy_BillingAddress.Country | Country |
Sesamy_BillingAddress.Department | Department |
Active Products Fields
| Field | Description |
|---|---|
Sesamy_ActiveProducts.SKU | SKUs of all active products |
Sesamy_ActiveProducts.SKUAndPO | SKU and purchase option ID combinations |
Sesamy_ActiveProducts.Titles | Titles of all active products |
Sesamy_ActiveProducts.OptionTitles | Purchase option titles of all active products |
Per-Product Dynamic Fields
For each active product, the integration creates a set of fields using the slugified product title. For example, a product titled "Premium Magazine" generates fields prefixed with Sesamy_premium-magazine.
| Field Pattern | Description |
|---|---|
Sesamy_{slug}.Sku | Product SKU |
Sesamy_{slug}.PurchaseOptionId | Purchase option identifier |
Sesamy_{slug}.PurchaseOptionTitle | Purchase option title |
Sesamy_{slug}.ProductTitle | Product title |
Sesamy_{slug}.Status | Subscription status |
Sesamy_{slug}.ExpiresAt | Expiry date |
Sesamy_{slug}.WillCancelAt | Scheduled cancellation date |
Sesamy_{slug}.CanceledAt | Cancellation date |
Sesamy_{slug}.CreatedAt | Subscription creation date |
Article Purchase Fields
| Field | Description |
|---|---|
Sesamy_ArticlePurchase.Count | Total number of articles purchased |
Sesamy_ArticlePurchase.Latest | Date of the most recent article purchase |
Sesamy_ArticlePurchase.SKU | SKU of the most recent article purchase |
Issues Remaining
| Field | Description |
|---|---|
Sesamy_IssuesRemaining.Count | Number of issues remaining in the subscription |
Tags
The integration syncs standard Sesamy tags plus a sesamy base tag that is always added. See Integration Concepts for the complete tag reference.
Tag safety
Only tags that start with sesamy_ (and the sesamy base tag) are modified by the integration. Tags you add manually or through other tools are never removed.
Events
The Rule integration responds to all eight standard Sesamy events. Every event triggers a full resync of the subscriber's profile, custom fields, and tags.
See Event Types for the full list of events.
Important Notes
- Guest users are not synced -- temporary guest accounts created during checkout are excluded from sync.
- All dates use YYYY-MM-DD format -- date fields such as
ExpiresAt,CanceledAt, andCreatedAtare formatted asYYYY-MM-DD. - Products are deduplicated -- if a user has multiple contracts for the same product, per-product fields are deduplicated by the slugified product title.
- Phone number priority -- when multiple phone numbers exist, the integration uses this priority chain: mobile, default, work, home.
Guest users excluded
Users with temporary (guest) accounts are not synced to Rule. Only users with confirmed accounts are included.
Alternative Integration Method
For more advanced integrations, you can use both APIs directly:
- Use Sesamy Webhooks to receive subscription events
- Call the Rule API to sync subscriber data and trigger campaigns
Next Steps
- Integration Concepts -- shared concepts, event types, and tag reference
- Mailchimp -- email marketing with merge fields and tags
- HubSpot -- CRM contact sync with subscription properties
- Make.as -- subscriber data, product catalogues, and subscription sync
- Handling Webhooks -- build your own webhook endpoint