Actions
Register an action handler on the Picked client. The SDK then invokes the handler when an experience flow reaches an action node.
Outcome and branch
| Handler outcome | Branch the flow takes |
|---|---|
| Throws, or its promise rejects | onFail |
Resolves to any value, and that includes false | onSuccess |
An action node can also carry one plain connection, with no success or failure branch. The flow then continues through it on either outcome.
An action does not interrupt your visitor. The current step stays on the screen while an async action runs.
Related
- How to register an action handler — the handler, and when to throw.
- About how Picked works
— why a returned
falseis a success. - Actions — the dashboard options.
