:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(workflows): allow seconds and fractional delays in the editor (#81114)
Harley Alexander9fb3e6790341
diff --git a/products/workflows/backend/api/hog_flow.py b/products/workflows/backend/api/hog_flow.pyindex 7f019acb0adf..41ac520fa89d 100644--- a/products/workflows/backend/api/hog_flow.py+++ b/products/workflows/backend/api/hog_flow.py@@ -134,9 +134,23 @@ from products.workflows.backend.utils.rrule_utils import compute_next_occurrencelogger = structlog.get_logger(__name__)-# Delay durations are strings like "30m", "2h", "1.5d". Must match the regex in the Node.js executor-# (nodejs/src/cdp/services/hogflows/actions/delay.ts) that throws at runtime on mismatch.-DELAY_DURATION_REGEX = re.compile(r"^\d*\.?\d+[dhm]$")+# Delay durations are strings like "30s", "30m", "2h", "1.5d". Must match the regex in the Node.js+# executor (nodejs/src/cdp/services/hogflows/actions/delay.ts) that throws at runtime on mismatch.+# wait_until_condition's max_wait_duration reaches the same parser via conditional_branch.ts, so it+# is held to the same format.+DELAY_DURATION_REGEX = re.compile(r"^\d*\.?\d+[dhms]$")+++def _is_valid_duration(value: Any) -> bool:+ return isinstance(value, str) and bool(DELAY_DURATION_REGEX.match(value))+++def _duration_error(field: str) -> str:+ return (+ f"{field} must be a string matching ^\\d*\\.?\\d+[dhms]$ "+ "(e.g. '30s', '30m', '2h', '1.5d'). ISO-8601 formats are not supported."+ )+# The content of a workflow: everything the draft cycle stages and publish promotes, and nothing# else. Metadata (name, description) and lifecycle (status) always apply to the live row. The draft@@ -835,7 +849,7 @@ HOG_FLOW_ACTION_CONFIG_SCHEMA = {},"max_wait_duration": {"type": "string",- "description": "'<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay).",+ "description": "'<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay).",},},},@@ -951,8 +965,8 @@ class HogFlowActionSerializer(serializers.Serializer):"so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). ""Dictionary input values are template strings too — write booleans/numbers as single-expression ""templates ('{true}', '{42}'), which evaluate to the typed value. "- "delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; "- "seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. "+ "delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). "+ "Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. ""Max 30d. ""conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. ""random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' "@@ -1304,20 +1318,15 @@ class HogFlowActionSerializer(serializers.Serializer):event_config["filters"] = serializer.validated_dataif strict and not _wait_condition_already_stored(data, self.context):_reject_clock_based_wait(data["config"], self.context["get_team"]())+ max_wait_duration = data.get("config", {}).get("max_wait_duration")+ # A falsy timeout means "wait indefinitely": conditional_branch.ts skips the parse+ # entirely for it, so only a value that actually reaches the parser needs the format.+ if strict and max_wait_duration and not _is_valid_duration(max_wait_duration):+ raise serializers.ValidationError({"config": _duration_error("max_wait_duration")})if data.get("type") == "delay":- delay_duration = data.get("config", {}).get("delay_duration")- if not isinstance(delay_duration, str) or not DELAY_DURATION_REGEX.match(delay_duration):- if strict:- raise serializers.ValidationError(- {- "config": (- "delay_duration must be a string matching ^\\d*\\.?\\d+[dhm]$ "- "(e.g. '30m', '2h', '1d'). ISO-8601 formats are not supported. "- "For seconds, use a fraction of a minute."- )- }- )+ if strict and not _is_valid_duration(data.get("config", {}).get("delay_duration")):+ raise serializers.ValidationError({"config": _duration_error("delay_duration")})return datadiff --git a/products/workflows/backend/api/test/test_hog_flow.py b/products/workflows/backend/api/test/test_hog_flow.pyindex 4ecab461ff4c..d6222fe9ff0e 100644--- a/products/workflows/backend/api/test/test_hog_flow.py+++ b/products/workflows/backend/api/test/test_hog_flow.py@@ -1,7 +1,7 @@import jsonfrom copy import deepcopyfrom datetime import UTC, datetime, timedelta-from typing import Optional+from typing import Any, Optionalfrom posthog.test.base import APIBaseTest, ClickhouseTestMixinfrom unittest.mock import MagicMock, PropertyMock, patch@@ -604,7 +604,7 @@ class TestHogFlowAPI(APIBaseTest):("seconds_as_input_shape", {"inputs": {"duration": {"value": 1800}}}),("iso_8601_duration", {"delay_duration": "P30D"}),("unit_and_duration_shape", {"unit": "days", "duration": 3}),- ("unsupported_unit", {"delay_duration": "30s"}),+ ("unsupported_unit", {"delay_duration": "30w"}),("empty_string", {"delay_duration": ""}),])@@ -615,15 +615,15 @@ class TestHogFlowAPI(APIBaseTest):"attr": "actions__1__config","code": "invalid_input","detail": (- "delay_duration must be a string matching ^\\d*\\.?\\d+[dhm]$ "- "(e.g. '30m', '2h', '1d'). ISO-8601 formats are not supported. "- "For seconds, use a fraction of a minute."+ "delay_duration must be a string matching ^\\d*\\.?\\d+[dhms]$ "+ "(e.g. '30s', '30m', '2h', '1.5d'). ISO-8601 formats are not supported."),"type": "validation_error",}@parameterized.expand([+ ("seconds", "30s"),("minutes", "30m"),("hours", "2h"),("days", "1d"),@@ -637,6 +637,59 @@ class TestHogFlowAPI(APIBaseTest):)assert response.status_code == 201, response.json()+ def _make_wait_flow(self, max_wait_duration: Any) -> dict:+ flow = self._make_delay_flow({"delay_duration": "5m"})+ flow["actions"][1] = {+ "id": "w1",+ "name": "w1",+ "type": "wait_until_condition",+ "config": {+ "condition": {"filters": None},+ "events": [+ {"filters": {"events": [{"id": "$pageview", "name": "$pageview", "type": "events", "order": 0}]}}+ ],+ "max_wait_duration": max_wait_duration,+ },+ }+ return flow++ @parameterized.expand(+ [+ ("no_unit", "5"),+ ("unsupported_unit", "10x"),+ ("iso_8601", "P30D"),+ ("numeric", 1800),+ ]+ )+ def test_hog_flow_wait_validation_rejects_malformed_max_wait_duration(self, _name, max_wait_duration):+ # conditional_branch.ts hands max_wait_duration to the same parser as delay_duration, so a+ # value that only fails at execution time has to be rejected at write time too+ response = self.client.post(f"/api/projects/{self.team.id}/hog_flows", self._make_wait_flow(max_wait_duration))+ assert response.status_code == 400, response.json()+ assert response.json() == {+ "attr": "actions__1__config",+ "code": "invalid_input",+ "detail": (+ "max_wait_duration must be a string matching ^\\d*\\.?\\d+[dhms]$ "+ "(e.g. '30s', '30m', '2h', '1.5d'). ISO-8601 formats are not supported."+ ),+ "type": "validation_error",+ }++ @parameterized.expand(+ [+ ("seconds", "30s"),+ ("minutes", "30m"),+ ("fractional_days", "1.5d"),+ # A falsy timeout is honoured as "wait indefinitely", so it stays valid to send+ ("null", None),+ ("empty_string", ""),+ ]+ )+ def test_hog_flow_wait_validation_accepts_canonical_max_wait_duration(self, _name, max_wait_duration):+ response = self.client.post(f"/api/projects/{self.team.id}/hog_flows", self._make_wait_flow(max_wait_duration))+ assert response.status_code == 201, response.json()+@parameterized.expand([("bare_string", "greeting", {"key": "greeting"}),diff --git a/products/workflows/frontend/Workflows/hogflows/steps/components/HogFlowDuration.test.tsx b/products/workflows/frontend/Workflows/hogflows/steps/components/HogFlowDuration.test.tsxindex a09515b4139c..4bf7f3aade23 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/components/HogFlowDuration.test.tsx+++ b/products/workflows/frontend/Workflows/hogflows/steps/components/HogFlowDuration.test.tsx@@ -23,19 +23,52 @@ describe('HogFlowDuration', () => {expect(screen.getByRole('spinbutton')).toHaveValue(null)})- it('floors a stored decimal value on display so old data upgrades to a whole number', () => {+ it('renders a stored fractional value as-is', () => {+ // A duration set over the API (e.g. "1.5d") used to be rounded down on display, silently+ // rewriting the delay the next time anyone opened the step.render(<HogFlowDuration value="1.5d" onChange={jest.fn()} />)- expect(screen.getByRole('spinbutton')).toHaveValue(1)+ expect(screen.getByRole('spinbutton')).toHaveValue(1.5)})- it('floors a fractional value emitted by the input to a whole number', () => {+ it('keeps a fractional value typed into the input', () => {const onChange = jest.fn()render(<HogFlowDuration value="3d" onChange={onChange} />)const input = screen.getByRole('spinbutton')fireEvent.change(input, { target: { value: '2.7' } })- expect(onChange).toHaveBeenCalledWith('2d')+ expect(onChange).toHaveBeenCalledWith('2.7d')+ })++ it('holds the committed duration while the field holds an unparseable draft', () => {+ const onChange = jest.fn()+ render(<HogFlowDuration value="1d" onChange={onChange} />)++ const input = screen.getByRole('spinbutton')+ // A number input blanks its value and reports NaN for a draft it cannot parse, such as the+ // lone "." that starts ".5", and flags it only through validity.badInput. jsdom does not+ // model badInput, so stand it in to reach the branch a real browser takes.+ Object.defineProperty(input, 'validity', { value: { badInput: true }, configurable: true })+ fireEvent.change(input, { target: { value: '' } })++ // Writing a unit with no number here replaces a valid duration with one that fails validation+ expect(onChange).not.toHaveBeenCalled()+ })++ it('emits a fixed-point amount for a value that would stringify as an exponent', () => {+ const onChange = jest.fn()+ render(<HogFlowDuration value="1d" onChange={onChange} />)++ fireEvent.change(screen.getByRole('spinbutton'), { target: { value: '0.0000001' } })++ // "1e-7d" matches none of the duration parsers in the stack+ expect(onChange).toHaveBeenCalledWith('0d')+ })++ it('renders a stored seconds duration with its unit', () => {+ render(<HogFlowDuration value="45s" onChange={jest.fn()} />)+ expect(screen.getByRole('spinbutton')).toHaveValue(45)+ expect(screen.getByText('Second(s)')).toBeInTheDocument()})it('clears the field immediately on change even before the parent commits the new value', () => {diff --git a/products/workflows/frontend/Workflows/hogflows/steps/components/HogFlowDuration.tsx b/products/workflows/frontend/Workflows/hogflows/steps/components/HogFlowDuration.tsxindex b2bd1f6c6e03..e2c3552b753c 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/components/HogFlowDuration.tsx+++ b/products/workflows/frontend/Workflows/hogflows/steps/components/HogFlowDuration.tsx@@ -1,21 +1,27 @@-import { useEffect, useState } from 'react'+import { useEffect, useRef, useState } from 'react'import { LemonInput, LemonSelect } from '@posthog/lemon-ui'// Allow an empty numeric part so a cleared input keeps its unit instead of resetting to a default.-// Also tolerate a decimal in stored values (older workflows) so we can floor it on display rather than lose the unit.-const DURATION_REGEX = /^(\d*\.?\d*)([dhm])$/--const MIN_VALUE_FOR_DURATION_UNIT = 1+const DURATION_REGEX = /^(\d*\.?\d*)([dhms])$/const MAX_VALUE_FOR_DURATION_UNIT: Record<string, number> = {d: 30,h: 24,m: 60,+ s: 60,}-// Type=number lets browsers accept ".", ",", "e", "+", "-" — none of which are valid for a whole-number duration-const BLOCKED_NUMBER_INPUT_KEYS = new Set(['.', ',', 'e', 'E', '+', '-'])+// Type=number lets browsers accept "e", "+" and "-", none of which the executor's duration parser+// understands. "." and "," stay allowed because fractional durations like 1.5d are valid, and "," is+// the decimal separator the browser expects in some locales.+const BLOCKED_NUMBER_INPUT_KEYS = new Set(['e', 'E', '+', '-'])++// A float stringifies to exponent notation at both extremes ("1e-7", "1e+21") and every duration+// parser in the stack reads fixed point only, so round the amount to a fixed number of decimals and+// treat magnitudes that toFixed itself exponentiates as the unit's maximum.+const MAX_FRACTION_DIGITS = 6+const EXPONENT_THRESHOLD = 1e21export function HogFlowDuration({value,@@ -24,13 +30,14 @@ export function HogFlowDuration({value: stringonChange: (value: string) => void}): JSX.Element {+ const inputRef = useRef<HTMLInputElement>(null)const parts = value.match(DURATION_REGEX)const numberValueString = parts?.[1] ?? ''const unit = parts?.[2] ?? 'm'// Keep undefined (empty field) distinct from a real number so clearing doesn't snap back to a default.- // Floor any decimal so a stored value like "1.5d" shows as "1d" and gets rewritten to a whole number on next save.- const numberValue = numberValueString === '' ? undefined : Math.floor(parseFloat(numberValueString))+ const parsedNumber = parseFloat(numberValueString)+ const numberValue = Number.isFinite(parsedNumber) ? parsedNumber : undefined// The parent commits config through an async kea listener, so binding the field straight to the derived// value re-applies the previous digit for one render and swallows a keystroke on clear. Mirror it locally@@ -41,32 +48,50 @@ export function HogFlowDuration({setDisplayNumber(numberValue)}, [numberValue])- const clamp = (n: number): number =>- Math.min(Math.max(MIN_VALUE_FOR_DURATION_UNIT, Math.floor(n)), MAX_VALUE_FOR_DURATION_UNIT[unit])+ // Fractions are allowed, so the only lower bound is "greater than zero". Anything at or below it+ // would save a delay that never waits, so snap those back up to one whole unit.+ const clamp = (n: number): number => (n > 0 ? Math.min(n, MAX_VALUE_FOR_DURATION_UNIT[unit]) : 1)++ const normalizeAmount = (n: number): number =>+ n >= EXPONENT_THRESHOLD ? MAX_VALUE_FOR_DURATION_UNIT[unit] : Number(n.toFixed(MAX_FRACTION_DIGITS))return (<div className="flex gap-2"><LemonInputtype="number"+ inputRef={inputRef}value={displayNumber ?? NaN}- min={MIN_VALUE_FOR_DURATION_UNIT}+ min={0}max={MAX_VALUE_FOR_DURATION_UNIT[unit]}- step={1}+ step="any"onKeyDown={(e) => {if (BLOCKED_NUMBER_INPUT_KEYS.has(e.key)) {e.preventDefault()}}}onChange={(v) => {- const next = v == null || !Number.isFinite(v) ? undefined : Math.floor(v)+ if (v == null || !Number.isFinite(v)) {+ // An empty value with NaN means either the field was cleared or the browser+ // cannot parse what is in it, and only validity.badInput separates the two. A+ // lone "." lands in the second case, so hold the committed duration instead of+ // overwriting it with a unit that carries no number.+ if (inputRef.current?.validity.badInput) {+ return+ }+ setDisplayNumber(undefined)+ onChange(`${unit}`)+ return+ }+ const next = normalizeAmount(v)setDisplayNumber(next)- onChange(next === undefined ? `${unit}` : `${next}${unit}`)+ onChange(`${next}${unit}`)}}onBlur={() => displayNumber !== undefined && onChange(`${clamp(displayNumber)}${unit}`)}/><LemonSelectoptions={[+ { label: 'Second(s)', value: 's' },{ label: 'Minute(s)', value: 'm' },{ label: 'Hour(s)', value: 'h' },{ label: 'Day(s)', value: 'd' },diff --git a/products/workflows/frontend/Workflows/hogflows/steps/stepDelayLogic.ts b/products/workflows/frontend/Workflows/hogflows/steps/stepDelayLogic.tsindex 2cdf1ff8fda4..24fe973f27e2 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/stepDelayLogic.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/stepDelayLogic.ts@@ -3,10 +3,17 @@ import { MakeLogicType, actions, connect, kea, key, listeners, path, props } froimport { WorkflowLogicProps, workflowLogic } from '../../workflowLogic'import type { HogFlow, HogFlowAction } from '../types'-const DURATION_REGEX = /^(\d*\.?\d*)([dhm])$/-const AUTO_DESCRIPTION_REGEX = /^Wait for \d*\.?\d+ (minute|hour|day)s?\.$/+const DURATION_REGEX = /^(\d*\.?\d*)([dhms])$/+const AUTO_DESCRIPTION_REGEX = /^Wait for \d*\.?\d+ (second|minute|hour|day)s?\.$/const LEGACY_DEFAULT_DESCRIPTION = 'Wait for a specified duration.'+const UNIT_LABELS: Record<string, string> = {+ s: 'second',+ m: 'minute',+ h: 'hour',+ d: 'day',+}+export function getDelayDescription(duration: string): string {const parts = duration.match(DURATION_REGEX)const number = parseFloat(parts?.[1] ?? '')@@ -15,7 +22,7 @@ export function getDelayDescription(duration: string): string {if (!Number.isFinite(number)) {return LEGACY_DEFAULT_DESCRIPTION}- const unitLabel = unit === 'm' ? 'minute' : unit === 'h' ? 'hour' : 'day'+ const unitLabel = UNIT_LABELS[unit] ?? 'minute'const durationText = `${number} ${unitLabel}${number !== 1 ? 's' : ''}`return `Wait for ${durationText}.`}diff --git a/products/workflows/frontend/Workflows/hogflows/steps/types.test.ts b/products/workflows/frontend/Workflows/hogflows/steps/types.test.tsindex 2977c532ff98..20e7228f52e9 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/types.test.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/types.test.ts@@ -66,18 +66,22 @@ describe('HogFlowActionSchema', () => {['10m', true],['1m', true],['1h', true],+ ['30s', true],+ ['1.5h', true],+ ['0.5h', true],+ ['.5d', true],+ ['0.1m', true],['d', false],['h', false],['m', false],+ ['s', false],['', false],['NaNd', false],['3', false],+ ['3w', false],['0m', false],['0d', false],- ['1.5h', false],- ['0.5h', false],- ['.5d', false],- ['0.1m', false],+ ['0.0h', false],])('delay_duration %p → valid=%p', (duration, valid) => {expect(HogFlowActionSchema.safeParse(delayAction(duration)).success).toBe(valid)})@@ -86,6 +90,8 @@ describe('HogFlowActionSchema', () => {['5m', true],['2h', true],['1d', true],+ ['30s', true],+ ['1.5h', true],['d', false],['h', false],['m', false],@@ -93,8 +99,6 @@ describe('HogFlowActionSchema', () => {['NaNd', false],['0m', false],['0d', false],- ['1.5h', false],- ['0.5h', false],])('max_wait_duration %p → valid=%p', (duration, valid) => {expect(HogFlowActionSchema.safeParse(waitAction(duration)).success).toBe(valid)})@@ -105,9 +109,9 @@ describe('HogFlowActionSchema', () => {it.each([['', 'Please enter a duration'],['m', 'Please enter a duration'],- ['3', 'Duration must be a whole number followed by d, h, or m'],- ['1.5h', 'Duration must be a whole number followed by d, h, or m'],- ['0m', 'Duration must be at least 1'],+ ['3', 'Duration must be a number followed by s, m, h, or d'],+ ['3w', 'Duration must be a number followed by s, m, h, or d'],+ ['0m', 'Duration must be greater than 0'],])('delay_duration %p → message %p', (duration, message) => {const result = HogFlowActionSchema.safeParse(delayAction(duration))expect(result.success).toBe(false)diff --git a/products/workflows/frontend/Workflows/hogflows/steps/types.ts b/products/workflows/frontend/Workflows/hogflows/steps/types.tsindex 6b2038567900..713d87a980fd 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/types.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/types.ts@@ -24,12 +24,12 @@ const DURATION_STRING = z.string().superRefine((v, ctx) => {ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Please enter a duration' })return}- if (!/^\d+[dhm]$/.test(v)) {- ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Duration must be a whole number followed by d, h, or m' })+ if (!/^\d*\.?\d+[dhms]$/.test(v)) {+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Duration must be a number followed by s, m, h, or d' })return}- if (parseInt(v, 10) < 1) {- ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Duration must be at least 1' })+ if (parseFloat(v) <= 0) {+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: 'Duration must be greater than 0' })}})diff --git a/products/workflows/frontend/generated/api.schemas.ts b/products/workflows/frontend/generated/api.schemas.tsindex b607644264ca..4eb4769316ec 100644--- a/products/workflows/frontend/generated/api.schemas.ts+++ b/products/workflows/frontend/generated/api.schemas.ts@@ -415,7 +415,7 @@ export const HogFlowActionTypeEnumApi = {} as const/**- * Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}.+ * Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}.*/export type HogFlowActionApiConfig =| { [key: string]: unknown }@@ -434,7 +434,7 @@ export type HogFlowActionApiConfig =/** Optional display name. */name?: string}[]- /** '<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay). */+ /** '<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay). */max_wait_duration: string}@@ -476,7 +476,7 @@ export interface HogFlowActionApi {* * `random_cohort_branch` - random_cohort_branch* * `exit` - exit */type: HogFlowActionTypeEnumApi- /** Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}. */+ /** Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}. */config: HogFlowActionApiConfig/** Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those. */output_variable?: unknowndiff --git a/products/workflows/frontend/generated/api.zod.ts b/products/workflows/frontend/generated/api.zod.tsindex 669307fe5eaf..7a4e38dfd0dd 100644--- a/products/workflows/frontend/generated/api.zod.ts+++ b/products/workflows/frontend/generated/api.zod.ts@@ -696,7 +696,7 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zodmax_wait_duration: zod.string().describe(- "'<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay)."+ "'<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay)."),}).describe(@@ -704,7 +704,7 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zod),]).describe(- "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."+ "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."),output_variable: zod.unknown()@@ -1040,7 +1040,7 @@ export const HogFlowsUpdateBody = /* @__PURE__ */ zodmax_wait_duration: zod.string().describe(- "'<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay)."+ "'<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay)."),}).describe(@@ -1048,7 +1048,7 @@ export const HogFlowsUpdateBody = /* @__PURE__ */ zod),]).describe(- "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."+ "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."),output_variable: zod.unknown()@@ -1389,7 +1389,7 @@ export const HogFlowsPartialUpdateBody = /* @__PURE__ */ zodmax_wait_duration: zod.string().describe(- "'<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay)."+ "'<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay)."),}).describe(@@ -1397,7 +1397,7 @@ export const HogFlowsPartialUpdateBody = /* @__PURE__ */ zod),]).describe(- "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."+ "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."),output_variable: zod.unknown()@@ -1993,7 +1993,7 @@ export const HogFlowsInvocationsCreateBody = /* @__PURE__ */ zod.object({max_wait_duration: zod.string().describe(- "'<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay)."+ "'<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay)."),}).describe(@@ -2001,7 +2001,7 @@ export const HogFlowsInvocationsCreateBody = /* @__PURE__ */ zod.object({),]).describe(- "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."+ "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."),output_variable: zod.unknown()@@ -2563,7 +2563,7 @@ export const HogFlowsBulkDeleteCreateBody = /* @__PURE__ */ zodmax_wait_duration: zod.string().describe(- "'<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay)."+ "'<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay)."),}).describe(@@ -2571,7 +2571,7 @@ export const HogFlowsBulkDeleteCreateBody = /* @__PURE__ */ zod),]).describe(- "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."+ "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."),output_variable: zod.unknown()diff --git a/products/workflows/skills/building-workflows/references/graph-schema.md b/products/workflows/skills/building-workflows/references/graph-schema.mdindex b77f16febf74..3babbfdce1e6 100644--- a/products/workflows/skills/building-workflows/references/graph-schema.md+++ b/products/workflows/skills/building-workflows/references/graph-schema.md@@ -158,10 +158,10 @@ Retrieve `template-native-push` with `cdp-function-templates-retrieve` for the f## Duration strings (`delay_duration`, `max_wait_duration`)-Must match `^\d*\.?\d+[dhm]$` — a number plus unit `m` | `h` | `d`. Examples: `30m`, `2h`, `1d`, `0.5m` (=30s).+Must match `^\d*\.?\d+[dhms]$` — a number plus unit `s` | `m` | `h` | `d`. Examples: `30s`, `30m`, `2h`, `1d`, `1.5d` (=36h).-- **No seconds, no ISO-8601.** For sub-minute, use a fraction of a minute.-- Per-unit caps are **silently clamped**: `m`≤60, `h`≤24, `d`≤30. Max total 30d. Use the larger unit (`90m` → use `1.5h`) to avoid surprise clamping.+- **No ISO-8601.** Fractions are allowed in every unit.+- Per-unit caps are **silently clamped**: `s`≤60, `m`≤60, `h`≤24, `d`≤30. Max total 30d. Use the larger unit (`90m` → use `1.5h`) to avoid surprise clamping.## Conversion & exit conditiondiff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 774a8e20cfda..add486b60861 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -36714,7 +36714,7 @@ export namespace Schemas {} as const;/**- * Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}.+ * Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}.*/export type HogFlowActionConfig = { [key: string]: unknown } | {/** Property-based wait condition; continues when the person matches. A condition with no property filters is ignored — the wait then relies on 'events' and the max_wait_duration timeout. */@@ -36731,7 +36731,7 @@ export namespace Schemas {/** Optional display name. */name?: string;})[];- /** '<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay). */+ /** '<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay). */max_wait_duration: string;};@@ -36773,7 +36773,7 @@ export namespace Schemas {* * `random_cohort_branch` - random_cohort_branch* * `exit` - exit */type: HogFlowActionTypeEnum;- /** Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}. */+ /** Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}. */config: HogFlowActionConfig;/** Output variable for downstream actions: {key, result_path?, spread?, label?} or a list of those. */output_variable?: unknown;diff --git a/services/mcp/src/generated/workflows/api.ts b/services/mcp/src/generated/workflows/api.tsindex 7ad21d240a10..b5621ff1a909 100644--- a/services/mcp/src/generated/workflows/api.ts+++ b/services/mcp/src/generated/workflows/api.ts@@ -352,7 +352,7 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zodmax_wait_duration: zod.string().describe(- "'<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay)."+ "'<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay)."),}).describe(@@ -360,7 +360,7 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zod),]).describe(- "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."+ "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function\*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open\/click tracking, so opens and clicks are not recorded for that step (delivery\/bounce\/unsubscribe still are). Dictionary input values are template strings too — write booleans\/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."),output_variable: zod.unknown()diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.jsonindex 4719f1115a1e..03a32fa7d08a 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json@@ -185,7 +185,7 @@"type": "array"},"max_wait_duration": {- "description": "'<number><unit>' with unit m|h|d, e.g. '30m' (same rules as delay).",+ "description": "'<number><unit>' with unit s|m|h|d, e.g. '30m' (same rules as delay).","type": "string"}},@@ -193,7 +193,7 @@"type": "object"}],- "description": "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is m|h|d. Fractions OK ('0.5m'=30s; seconds unsupported). Per-unit max m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."+ "description": "Type-specific config keyed by action type. trigger: {type: event|webhook|manual|batch|schedule|tracking_pixel, filters?}. webhook and manual triggers also require template_id: 'template-source-webhook', and tracking_pixel requires template_id: 'template-source-webhook-pixel'. filters shape: {events: [{id, name, type:'events', properties:[<cond>]}], properties:[<cond>], actions:[...], filter_test_accounts:<bool>}. <cond>: {key, value, operator, type: event|person|group}, or {key: 'id', type: 'cohort', value: <cohort_id>, operator: 'in'} to reference a cohort. batch triggers may set filters.audience_type: 'persons' (default) or 'accounts'. An accounts audience fans out one run per customer analytics account and takes account filters instead: properties entries of type 'account_custom_property' (key = definition id), plus tag_names: [<str>], assigned_to_user_ids: [<int>], all_roles_unassigned: <bool>. function*: {template_id, inputs: {<key>: {value: <str>}}}. Wrap values in {value:...} to enable hog templating ({person.x}, {event.x}); flat strings won't interpolate. function_email also accepts tracking_enabled?: <bool> (default true) - when false, no open pixel is injected, links are not rewritten, and the send skips ESP-level open/click tracking, so opens and clicks are not recorded for that step (delivery/bounce/unsubscribe still are). Dictionary input values are template strings too — write booleans/numbers as single-expression templates ('{true}', '{42}'), which evaluate to the typed value. delay: {delay_duration: '<number><unit>'} where unit is s|m|h|d. Fractions OK ('1.5d'=36h). Per-unit max s<=60, m<=60, h<=24, d<=30; values above are SILENTLY CLAMPED. Max 30d. conditional_branch: {conditions: [{filters}, ...]}. Index N matches the 'branch' edge with index:N. random_cohort_branch: {cohorts: [{percentage: <number>, name?}, ...]}. Index N matches the 'branch' edge with index:N; percentages are relative weights, so they should sum to 100 but a total above or below that still splits traffic in the given proportions. wait_until_condition: {condition: {filters}, events?: [{filters: {events: [{id, name, type: 'events'}], actions?: [...]}, name?}], max_wait_duration: <duration>} (same rules as delay). Continues when condition.filters match OR any events entry fires; each events entry must target at least one event or action. On resolution (a condition match or any events entry firing) it advances via the 'branch' edge with index:0; the max_wait_duration timeout falls through the 'continue' edge. exit: {reason}."},"created_at": {"description": "Created at (epoch ms). Frontend-managed.",