Skip to content

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.

FieldTypeDescription
apiKeystringYour Rule API key
apiUrlstring(Optional) Custom API endpoint URL

What Gets Synced

Profile Fields

Standard subscriber fields are synced on every event.

FieldTypeDescription
emailstringUser's email address
firstnamestringUser's first name
lastnamestringUser's last name
phonestringUser'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

FieldDescription
Sesamy_User.FirstNameUser's first name
Sesamy_User.LastNameUser's last name
Sesamy_User.IDSesamy user ID
Sesamy_User.CreatedAccount creation date

Billing Address Fields

These fields are only synced when the user has a billing address on file.

FieldDescription
Sesamy_BillingAddress.FirstNameBilling first name
Sesamy_BillingAddress.LastNameBilling last name
Sesamy_BillingAddress.StreetStreet address
Sesamy_BillingAddress.CityCity
Sesamy_BillingAddress.ZipPostal code
Sesamy_BillingAddress.CoCare of
Sesamy_BillingAddress.CountryCountry
Sesamy_BillingAddress.DepartmentDepartment

Active Products Fields

FieldDescription
Sesamy_ActiveProducts.SKUSKUs of all active products
Sesamy_ActiveProducts.SKUAndPOSKU and purchase option ID combinations
Sesamy_ActiveProducts.TitlesTitles of all active products
Sesamy_ActiveProducts.OptionTitlesPurchase 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 PatternDescription
Sesamy_{slug}.SkuProduct SKU
Sesamy_{slug}.PurchaseOptionIdPurchase option identifier
Sesamy_{slug}.PurchaseOptionTitlePurchase option title
Sesamy_{slug}.ProductTitleProduct title
Sesamy_{slug}.StatusSubscription status
Sesamy_{slug}.ExpiresAtExpiry date
Sesamy_{slug}.WillCancelAtScheduled cancellation date
Sesamy_{slug}.CanceledAtCancellation date
Sesamy_{slug}.CreatedAtSubscription creation date

Article Purchase Fields

FieldDescription
Sesamy_ArticlePurchase.CountTotal number of articles purchased
Sesamy_ArticlePurchase.LatestDate of the most recent article purchase
Sesamy_ArticlePurchase.SKUSKU of the most recent article purchase

Issues Remaining

FieldDescription
Sesamy_IssuesRemaining.CountNumber 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, and CreatedAt are formatted as YYYY-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

Released under the MIT License.