Interface JourneyNode.Visitor
-
- All Implemented Interfaces:
public interface JourneyNode.Visitor<T extends Object>An interface that defines how to map each variant of JourneyNode to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitApiInvokeTrigger(JourneyApiInvokeTriggerNode apiInvokeTrigger)Trigger fired when the journey is invoked via the API. abstract TvisitSegmentTrigger(JourneySegmentTriggerNode segmentTrigger)Trigger fired by a segment event ( identify,group, ortrack).abstract TvisitSend(JourneySendNode send)Send a notification template to the recipient. abstract TvisitDelayDuration(JourneyDelayDurationNode delayDuration)Pause the journey run for a fixed duration.abstract TvisitDelayUntil(JourneyDelayUntilNode delayUntil)Pause the journey run untila specific time.abstract TvisitFetchGetDelete(JourneyFetchGetDeleteNode fetchGetDelete)Issue an HTTP GET or DELETE request and merge the response into the journey state per merge_strategy.abstract TvisitFetchPostPut(JourneyFetchPostPutNode fetchPostPut)Issue an HTTP POST or PUT request with a bodyand merge the response into the journey state permerge_strategy.abstract TvisitAi(JourneyAiNode ai)Invoke an AI step with user_promptand optionalweb_search.abstract TvisitThrottleStatic(JourneyThrottleStaticNode throttleStatic)Throttle the journey by a static scope(userorglobal), allowing at mostmax_allowedinvocations perperiod.abstract TvisitThrottleDynamic(JourneyThrottleDynamicNode throttleDynamic)Throttle the journey by a dynamic throttle_key, allowing at mostmax_allowedinvocations perperiod.abstract TvisitBatch(JourneyNode.JourneyBatchNode batch)Collect events arriving at the node into a single batch and fire one downstream step with the aggregated payload. abstract TvisitExit(JourneyExitNode exit)Terminate the journey run. abstract TvisitBranch(JourneyNode.JourneyBranchNode branch)Branch node. Tunknown(JsonValue json)Maps an unknown variant of JourneyNode to a value of type T. -
-
Method Detail
-
visitApiInvokeTrigger
abstract T visitApiInvokeTrigger(JourneyApiInvokeTriggerNode apiInvokeTrigger)
Trigger fired when the journey is invoked via the API. The optional
schemafield is a JSON Schema that validates the invocation payload.
-
visitSegmentTrigger
abstract T visitSegmentTrigger(JourneySegmentTriggerNode segmentTrigger)
Trigger fired by a segment event (
identify,group, ortrack).
-
visitSend
abstract T visitSend(JourneySendNode send)
Send a notification template to the recipient. Optionally override the recipient address, delay the send, or attach
data.
-
visitDelayDuration
abstract T visitDelayDuration(JourneyDelayDurationNode delayDuration)
Pause the journey run for a fixed
duration.
-
visitDelayUntil
abstract T visitDelayUntil(JourneyDelayUntilNode delayUntil)
Pause the journey run
untila specific time.
-
visitFetchGetDelete
abstract T visitFetchGetDelete(JourneyFetchGetDeleteNode fetchGetDelete)
Issue an HTTP GET or DELETE request and merge the response into the journey state per
merge_strategy.
-
visitFetchPostPut
abstract T visitFetchPostPut(JourneyFetchPostPutNode fetchPostPut)
Issue an HTTP POST or PUT request with a
bodyand merge the response into the journey state permerge_strategy.
-
visitAi
abstract T visitAi(JourneyAiNode ai)
Invoke an AI step with
user_promptand optionalweb_search. Returns a structured response conforming tooutput_schema.
-
visitThrottleStatic
abstract T visitThrottleStatic(JourneyThrottleStaticNode throttleStatic)
Throttle the journey by a static
scope(userorglobal), allowing at mostmax_allowedinvocations perperiod.
-
visitThrottleDynamic
abstract T visitThrottleDynamic(JourneyThrottleDynamicNode throttleDynamic)
Throttle the journey by a dynamic
throttle_key, allowing at mostmax_allowedinvocations perperiod.
-
visitBatch
abstract T visitBatch(JourneyNode.JourneyBatchNode batch)
Collect events arriving at the node into a single batch and fire one downstream step with the aggregated payload. The first event into a batch owns the run; later contributing events terminate at the batch step. The batch releases when any of
max_itemsis reached, a quiet window ofwait_periodelapses, or themax_wait_periodceiling hits.
-
visitExit
abstract T visitExit(JourneyExitNode exit)
Terminate the journey run.
-
visitBranch
abstract T visitBranch(JourneyNode.JourneyBranchNode branch)
Branch node. Routes to the first entry in
paths[]whoseconditionsmatch, else falls through todefault.nodes.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of JourneyNode to a value of type T.
An instance of JourneyNode can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-