Bixby Developer Center

References

default-init

optional

A default value for an input or variable type. A default-init can be supplied using a constant value or an intent.

This feature can be wrapped in and contain conditionals.

Examples

action (CheckStatus) {
type (RefreshActivity)
collect {
input (receipt) {
type (Receipt)
min (Required)
default-init {
intent {
goal: FindLastReceipt
}
}
}
}
output (Receipt)
}

View master on GitHub

action (SelectPod) {
description (Select a HabitatProd from a list by name)
type (Search)
collect {

//order can be null if the prompt is before CreateOrder
input (order) {
type (Order)
min (Optional)
hidden
}

input (pods) {
type (HabitatPod)
min (Required)
max (Many)
default-init {
if (exists(order)) {
intent {
goal: FindPods
value: $expr(order.item.spaceResort)
value: $expr(order.item.numberOfAstronauts)
value: $expr(order.item.dateInterval)
}
} else {
//get the candidates from the input-view (prompt context)
intent {
goal-set: HabitatPod {$expr("getPreviousPage('HabitatPod')")}
}
}
}
}

input(podName) {
description (PodName to match)
type (PodName)
min (Required)
}
}
output (HabitatPod) {
throws {
error (MultipleMatches) {
property (matches) {
type (HabitatPod)
min (Required)
max (Many)
}
on-catch {
replan {
intent {
goal { HabitatPod @prompt-behavior(AlwaysSelection) }
value { $expr(matches) }
}
}
}
}
}
}
}

View master on GitHub

Child Keys

with-strategy
optional
Choose a specific instantiation strategy for an input to utilize
intent
optional
A set of signals that the Bixby planner interprets to create a plan