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

Decision Layout

Android - 8.25.0 iOS - 11539 Web - 2.5.0

A set of options which each perform a Behavior.

decision {
    title = "Decision title"
    options {
        option {
            title = "Top up"
            description = "Get started by adding money to your balance"
            media = Media.Avatar.build {
                content { uri { uri = "urn:wise:icons:plus" } }
            }
            behavior = ActionBehavior.build {
                action {}
            }
        }
        option {
            title = "Connect your bank account"
            description = "Move money with ease by connecting another account"
            media = Media.Avatar.build {
                content { uri { uri = "urn:wise:icons:bank" } }
            }
            behavior = ActionBehavior.build {
                action {}
            }
        }
    }
}

When to use

  • When the only (or primary) way for a user to progress is to choose between a set of options. For example, choosing a country, or the type of document they wish to verify with.

When not to use

  • When each option represents an entity which is being managed, consider using a List Layout instead. For example, managing a list of bank cards or recipients.

Properties

PropertyTypeRequiredDescription
analyticsIdStringNoAn optional identifier to be used in analytics tracking.
controlStringNoSpecify a particular control to use to represent the layout. If the control is unknown, it will be ignored.
marginSizeNoThe vertical margin to apply after this component. Defaults to md.
optionsArray<DecisionLayout.Option>YesArray of options.

tags

Array<String>

No

An optional list of identifiers used to configure renderers.

Android - 8.131.0 iOS - 8.125 Web - 4.33.0

title

String

No

Title for the decision block.

Android - 8.70.0 iOS - 8.67 Web - 3.15.0

typeStringYesIt must be decision.

Related Types

Option

An option is a single entry in the decision that the user can choose.

Properties

PropertyTypeRequiredDescription

action

Action

No

The action to perform when selected.

⚠️ Deprecated - Please use 'behavior' instead

additionalText

String

No

Additional information to be displayed to the user.

Android - 8.122.0 iOS - 8.119 Web - 4.25.0

analyticsId

String

No

An optional identifier to be used in analytics tracking.

Android - 8.118.0 iOS - 8.114 Web - 4.15.6

behavior

Behavior

Yes

Behavior to be performed when the button is pressed.

Android - 8.96.0 iOS - 8.89 Web - 3.33.0

descriptionStringNoA user-facing description.
disabledBooleanNoIf true, user interaction is disabled. Defaults to false.
iconIconNoAn icon to represent the option.
imageImageNoAn image to represent the option.

inlineAlert

InlineAlert

No

An alert that will be displayed inline with the item.

Android - 8.122.0 iOS - 8.119 Web - 4.25.0

keywords

Array<String>

No

Keywords to look for when filtering decisions

Android - 8.125.0 iOS - 8.119 Web - 4.22.0

media

Media

No

A media object (avatar, icon, image) which the client can use to represent this option.

Android - 8.123.0 iOS - 8.119 Web - 4.21.0

supportingValues

SupportingValues

No

An object containing two strings representing two user-facing values. One being clearly more important than the other.

Android - 8.122.0 iOS - 8.119 Web - 4.25.0

tag

String

No

An optional identifier used to configure renderers.

Android - 8.101.0 iOS - 8.96 Web - 4.0.0

⚠️ Deprecated - Please use 'tags' instead

tags

Array<String>

No

An optional list of identifiers used to configure renderers.

Android - 8.131.0 iOS - 8.125 Web - 4.33.0

titleStringYesA user-facing title.

Controls

filtered

Android - 8.125.0 iOS - 8.118 Web - 4.22.0

Allows client-side filtering of the options in the decision

decision {
    title = "Recent Purchases"
    control = "filtered"
    options {
        option {
            title = "Invoice for Consulting"
            description = "Down Under LTD"
            supportingValues {
                value = "100 AUD"
            }
            media = Media.Avatar.build {
                content { uri { uri = "urn:wise:countries:au:image" } }
            }
            behavior = ActionBehavior.build {
                action {
                    url = "/au-currency"
                }
            }
        }
        option {
            title = "TV License"
            description = "British Broadcasting Network"
            supportingValues {
                value = "50 GBP"
            }
            media = Media.Avatar.build {
                content { uri { uri = "urn:wise:countries:gb:image" } }
            }
            behavior = ActionBehavior.build {
                action {
                    url = "/gbp-currency"
                }
            }
        }
        option {
            title = "Enchantment Table"
            description = "Mooshroom Industries"
            supportingValues {
                value = "30 USD"
            }
            media = Media.Avatar.build {
                content { uri { uri = "urn:wise:countries:us:image" } }
            }
            behavior = ActionBehavior.build {
                action {
                    url = "/us-currency"
                }
            }
        }
        option {
            title = "Mjölnir"
            description = "B&S Manufacturing"
            supportingValues {
                value = "10 NOR"
            }
            media = Media.Avatar.build {
                content { uri { uri = "urn:wise:countries:no:image" } }
            }
            behavior = ActionBehavior.build {
                action {
                    url = "/no-currency"
                }
            }
        }
    }
}

spotlight

Android - 8.124.0 iOS - 8.119 Web - 4.25.0

Enables spotlight styling for the decision options, to be used with the related spotlight tags. Spotlight should be used when options navigate the user to features they can configure. Related tags: SPOTLIGHT_ACTIVE, SPOTLIGHT_INACTIVE

with-avatar

Android - 8.113.0 iOS - 8.100 Web - 4.9.0

Displays all option images in an Avatar. Note that when using media this has no effect.