core2-jvm (latest)
core2-jvm (latest)core-jvm
  • Home
  • Features
  • Spec
  • Guides
  • Sandbox
  • Step Studio
  • Step
    • Action
    • External
    • Help
    • Link Handler
    • Navigation
    • Persist Async
    • Polling
    • Refresh On Change
    • Schema On Change
    • Step Error
    • Suggestions
    • Summary
    • Toolbar
    • Upload
    • Validate Async
    • Schema
    • All Of Schema
    • Array Schema
    • Blob Schema
    • Boolean Schema
    • Const Schema
    • Integer Schema
    • Number Schema
    • Object Schema
    • One Of Schema
    • String Schema
    • Layout
    • Alert Layout
    • Box Layout
    • Button Layout
    • Columns Layout
    • Decision Layout
    • Divider Layout
    • Form Layout
    • Heading Layout
    • Image Layout
    • Instructions Layout
    • List Layout
    • Loading Indicator Layout
    • Markdown Layout
    • Media Layout
    • Modal Layout
    • Paragraph Layout
    • Progress Layout
    • Review Layout
    • Search Layout
    • Section Layout
    • Status List Layout
    • Tabs Layout
    • Upsell Layout
    • Behavior
    • Action Behavior
    • Copy Behavior
    • Dismiss Behavior
    • Link Behavior
    • Modal Behavior
    • Refresh Behavior
    • Subflow Behavior
    • Subflow
    • Dynamic Launch Config
    • Launch Config
    • Modal Presentation
    • Native Launch Config
    • Presentation
    • Push Presentation
    • Action Response Body
    • Error Response Body
    • Flow Response
    • Modal Response Body
    • No Op Response Body
    • Search Initial Layout Config
    • Search Initial Results Config
    • Search Initial State
    • Search Layout Response Body
    • Search Response
    • Search Response Body
    • Search Result
    • Search Results Response Body
    • Subflow Response Body
    • Additional Info
    • Align
    • Autocapitalization Type
    • Autocomplete Token
    • Context
    • Icon
    • Image
    • Inline Alert
    • Media
    • Native Capabilities
    • Request
    • Size
    • Supporting Values
    • Control
    • Tag

Link Handler

Android - 8.25.0 iOS - 11539 Web - Unsupported

A pattern which is matched against any incoming universal links, with an action to trigger when the pattern is matched.

Link handling is typically used alongside External.

Action Data

When the action is performed, the payload will contain all the data usually submitted with an action. Additionally, the data will be merged with an object containing the following structure:

{
    "url": "https://wise.com/some-url"
}

Where "https://wise.com/some-url" is the full URL that was matched against the pattern.

Example

Given the step below, the client will listen for any deep or universal links that are used to open the app.

Step.build {
    layout { }
    linkHandlers {
        LinkHandler {
            regexPattern = """https:\/\/wise.com\/success-callback."""
            behavior = ActionBehavior.build {
                action {
                     url = "/handle-success-callback"
                     data = encodeToJsonElement(mapOf("some-additional-data" to true))
                }
            }
        }
        LinkHandler {
            regexPattern = """https:\/\/wise\.com\/failure-callback.*"""
            behavior = ActionBehavior.build {
                 action {
                     url = "/handle-failure-callback"
                 }
              }
         }
    }
}

If the user is on this step and then opens a universal or deep link, it'll be matched against the patterns in the array, and any matching action will be executed.

For example, if the user opens the app with the universal link "https://wise.com/success-callback?token=1234", this will be matched against the first pattern in the array. The corresponding action will be executed, and the payload will also contain the url that was matched - for example in this case the following data would be submitted to "/handle-success-callback":

{
    "some-additional-data": true,
    "url": "https://wise.com/success-callback?token=1234"
}

If a link is opened which doesn't match any of the patterns then no action is taken.

Properties

PropertyTypeRequiredDescription
actionActionNo

behavior

Behavior

No

Behavior to be triggered when the regex pattern is matched.

Android - 8.96.0 iOS - 8.90 Web - Unsupported

regexPatternStringYesA regex pattern to be matched against any incoming universal links.