Bixby Developer Center

Guides
References

on-empty

optional

Defines effects that are applied when action output is empty. You can add optional control flows to determine if effects happen.

Example

action (SelectItem) {
type (Search)
collect {
input (searchTerm) {
type (SearchTerm)
min (Optional)
}
input (order) {
description (order that is being updated)
type (Order)
min (Required)
hidden
}
computed-input (items) {
description (The items to select from, should be more than one)
type (Item)
min (Optional) //this is optional as the shopping cart may be empty
max (Many)
compute {
if (exists(order.items)) {
intent {
goal: Item
value: $expr(order.items)
}
}
}
}
}
output (SelectedItem) {
throws {

error(MultipleMatches) {
property (matches) {
type (Item)
max (Many)
}
on-catch {
//prompt for matched items, clear searchTerm
prompt (items) {
required-value (true)
single-value (true)
candidates (matches)
}
}
}
}
on-empty {
//prompt for items, clear searchTerm
ordered-effects {
drop (searchTerm)
prompt (items) {
required-value (true)
single-value (true)
candidates (items)
}
}
}
}
}

View master on GitHub

Child Keys

drop
optional
Effect that drops a specified input from an action
drop-contextual-inputs
optional
Effect that drops all conversational value inputs from an action
flag-as-off-topic
optional
Effect that flags the current utterance as off-topic
halt
optional
Effect that halts execution after a dialog message event
ordered-effects
optional
Wrapper effect that groups an ordered list of other effects
prompt
optional
Effect that prompts the user for an input
replace
optional
Replace an existing input value with a new one
replan
optional
Effect that re-plans to a new intent, after an optional dialog event
unlock
optional
Pauses execution if device is locked and informs users they need to unlock their device to continue