Bixby Developer Center

References

match

required

The match pattern represents the circumstances in which a selection strategy should be applied. Match patterns also bind variables to the different concepts in the plan which are then accessible as part of the strategy's advice statement. The outer match pattern always starts with what concept the strategy wants to be involved with when there is a selection prompt, such as choosing among multiple tip percentages (TipPercent).

match {
// Option's concept can then be references as variable `tip` in advice statement
TipPercent (tip)
}

Additional match pattern parameters indicate more specific scenarios in which the strategy should apply. In the following example, a strategy with the following match pattern would only be included when choosing between tip percentages as part of completing a restaurant delivery order.

match {
TipPercent (this) {
to-input: viv.restaurant.CompleteDeliveryOrder (_)
}
}

It is important to note all strategies that apply are included in the selection learning decision meaning that even when a selection prompt occurs for the restaurant.CompleteDeliveryOrder action that even the more general match pattern strategies would be included as well.

See Match Patterns for a complete description of related match patterns.

Child Keys

any
optional
Use the wildcard underscore (_) to match any node, regardless of its type