Skip to content

docs: Document inLast and inNext Segment filter operators in the REST API reference#595

Draft
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-16574-in-the-last-next-operators-7.2
Draft

docs: Document inLast and inNext Segment filter operators in the REST API reference#595
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-16574-in-the-last-next-operators-7.2

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Adds the two new date/datetime operators from mautic/mautic PR #16574 — inLast and inNext — to the Segments REST API reference. Documents them in the Date fields operator table and adds a filter example showing the interval/unit object payload shape (which differs from the scalar filter value used by other date operators).

Trigger Events


Tip: Use Slack message actions (⋯ menu → Update Docs) to capture doc updates without interrupting conversations 💬


For ``inLast`` and ``inNext``, send ``properties.filter`` as an object with an ``interval`` integer and a ``unit`` of ``day``, ``month``, or ``year`` instead of a scalar value. Refer to :ref:`In the last and In the next filter <in the last and in the next filter>` for an example.

Select or multi-select fields

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented the inLast/inNext API payload shape added in this PR. Unlike other date operators (scalar filter), these require properties.filter to be an object with interval and unit keys — confirmed by the API test ListApiControllerFunctionalTest.php ('properties' => ['filter' => ['interval' => '1', 'unit' => 'day']]) and preserved by FieldFilterTransformer which skips its usual date normalization for these operators. Valid units (day/month/year) come from DateSpanType.php.

Source: mautic/mautic#16574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants