Skip to content

Tool

preview_segment

Preview segment reach

Read-onlyIdempotent
SurfacesChat agentMCPCLI

Count and sample the subscribers in an audience that match a set of conditions, WITHOUT saving a segment. Lets you reason about reach before composing a campaign (e.g. 'how many active subscribers tagged VIP?'). `conditions` is { match: 'all'|'any', rules: [{ field, op, value }] }.

CLI: tinbox preview-segment

Parameters

NameTypeRequiredDescription
audienceIdstringyesThe audience (list) to evaluate against.
conditionsobjectyesThe (unsaved) condition tree to preview.
▸expand conditions
  • match allanyrequired

    'all' = AND every rule; 'any' = OR.

  • ▸rules object[]required

    The rules to match.

    array items — object

    • field stringrequired

      A field to test: 'status', 'email', 'tag', 'interest', 'signup', or a merge-field tag (e.g. FNAME).

    • op isis_notcontainsnot_containsgreaterlessbeforeafterhas_tagnot_has_tagin_interestnot_in_interestopenedclickedrequired

      The comparison operator.

    • ▸value one of

      The value to compare against (string or number; omit for some ops).

      • option 1string
      • option 2number
sampleLimitintegernoHow many sample matches to return (default 5).

Example

json
{
  "audienceId": "aud_…",
  "conditions": {
    "match": "all",
    "rules": [
      {
        "field": "<field>",
        "op": "is"
      }
    ]
  }
}