mailerpress-pro/create-segment creates a new segment from a name and a conditions payload.
The payload shape is exact.
At a glance
| Ability | mailerpress-pro/create-segment |
| Toolset | MailerPress Pro — toolset/mailerpress-pro |
| Group | MailerPress Pro › Segments |
| Requires | AcrossAI Pro, plus MailerPress with its Pro add-on active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Pro 0.9.16 and later |
The conditions object
Conditions are an object, not an array: {operator: "AND"|"OR", conditions: [ {type, operator, value}, … ]}. MailerPress’s runtime evaluator rejects any other shape with invalid_conditions, so the wrapper is not optional formatting.
The outer operator is how the conditions combine: AND means all of them, OR means any. There is one level — conditions do not nest into sub-groups — so a rule that genuinely needs “A and (B or C)” has to be expressed as two segments or restructured.
The valid type and operator values per condition are site-specific and come from mailerpress-pro/list-segment-condition-metadata. Authoring a segment without reading them is guessing at a vocabulary.
A segment with no matching contacts is created happily. That is correct — the conditions may simply not match anybody yet — and it means a typo in a value produces a working empty segment rather than an error.
So check the membership afterwards with mailerpress-pro/get-segments-for-contact. An unexpected zero is usually a value problem rather than an audience problem.
Not idempotent — two calls make two segments, and names are not unique.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
name | string | Yes | The segment name. Used to address it elsewhere. |
conditions | object | Yes | An object of shape {operator, conditions: [...]}. Any other shape is refused. |
What comes back
| Name | Type | What it is |
|---|---|---|
segment | object | The created segment. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Create a segment for customers who have not opened anything in 90 days.
It resolves to one call:
{
"ability": "mailerpress-pro/create-segment",
"parameters": {
"name": "Lapsed customers",
"conditions": {
"operator": "AND",
"conditions": [
{ "type": "last_open", "operator": "before", "value": "-90 days" }
]
}
}
}Worth knowing
- The conditions object wrapper is required, not stylistic.
- One level of grouping only — no nested sub-groups.
- An empty segment is created without complaint. Check the membership.
- Names are not unique. Not idempotent.
Related abilities
- MailerPress Pro Segment Condition Metadata — read the vocabulary first
- MailerPress Pro Contacts In A Segment — check it matches
- MailerPress Pro Update Segment — change it
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category