Targeting

Target the right contacts, not all of them

Static CSV uploads go stale the moment you import them. Segments in Molted are filter definitions. Compute membership when you need it, and the results reflect your contacts as they are right now.

How segmentation works

1

Define filters

Create a segment with conditions on contact fields, metadata, firmographic data, or behavior. Combine with AND/OR logic. Nest filter groups for complex targeting.

2

Compute membership

Trigger a compute and membership is evaluated fresh. Results are snapshotted and versioned, so a campaign that spans multiple sends targets a consistent audience.

3

Use everywhere

Scope journeys to a segment. Restrict A/B experiments to segment members. Check membership before sending. Segments are a first-class primitive across the platform.

Define a segment

Filter groups combine conditions with AND/OR logic and can be nested. Five filter types: contact fields, account fields, metadata, firmographic, and behavioral (with time windows).

$ molted segments create --name "Enterprise Trial" \
    --filters '{
      "logic": "and",
      "filters": [
        {"type": "contact_field", "field": "lifecycle_stage", "operator": "eq", "value": "trial"},
        {"type": "metadata", "field": "company_size", "operator": "gt", "value": 100}
      ]
    }'

{ "id": "seg_abc123", "name": "Enterprise Trial", "status": "active" }

Compute, list, check

Computation runs as a background job and returns immediately. Each compute creates a new versioned snapshot. Membership checks are instant after that.

# Compute membership (async — returns immediately)
$ molted segments compute seg_abc123
{ "queued": true, "segmentId": "seg_abc123" }

# List members
$ molted segments members seg_abc123 --limit 20
[
  { "id": "con_x1", "email": "alice@bigcorp.com", "name": "Alice", "lifecycle_stage": "trial" },
  { "id": "con_y2", "email": "bob@enterprise.co", "name": "Bob", "lifecycle_stage": "trial" }
]

# Quick membership check
$ molted analytics segment-check --contact alice@bigcorp.com --segment seg_abc123
{ "member": true }

Where segments plug in

Journey targeting

Scope a journey to a segment. Only contacts who match the filter conditions enter the journey when the trigger fires. Everyone else is ignored.

Experiment scoping

Run A/B tests on a specific audience. Assign a segment to an experiment and only matched contacts get variant assignment.

Behavioral windows

Filter on event frequency within time windows. "Viewed pricing page 3+ times in the last 7 days" is a single filter condition.

Pre-send checks

One call to check if a contact belongs to a segment. Use it in branching logic before your agent decides whether to send.

Operators: eq, neq, gt, gte, lt, lte, contains, not_contains, in, not_in, exists, not_exists, between. Combined with nested AND/OR filter groups for as much complexity as your targeting requires.

Audiences that stay current

Define once, recompute any time. No stale lists, no manual imports. Your agent targets exactly who it should, using contact data as it exists right now.