Bixby Developer Center

Guides
References

goal-set

optional

A collection of goals. Use this key if you want to supply more than 1 value for a goal signal.

See Intent's goal for more information.

Example

action (UpdateBuyer) {
description (Prompt user to enter personal data)
type (Constructor)
collect {
//Order is a structure with transaction feature that has the current buyer and product properties
input (order) {
type (Order)
min (Required)
}
//This is the list of the buyer fields which user wants to update
input (fieldsToUpdate) {
type (self.Field)
min (Required) max (Many)
default-init {
intent {
goal-set: self.Field {
self.Field(firstName)
self.Field(lastName)
self.Field(emailInfo)
self.Field(phoneInfo)
}
}
}
}
//new value for first name
input (firstName) {
type (self.FirstName)
min (Optional) max (One)
}
//new value for last name
input (lastName) {
type (self.LastName)
min (Optional) max (One)
}
//new value for email address
input (emailAddress) {
type (self.EmailAddress)
min (Optional) max (One)
}
//new value for phone number
input (phoneNumber) {
type (self.PhoneNumber)
min (Optional) max (One)
}
input (forcePrompt) {
type (self.ForcePrompt)
min (Optional) max (One)
}
//compute the new buyer information by calling self library
computed-input (buyer) {
type (Buyer)
min (Required)
compute {
intent {
goal: self.GetProfile
value: self.Profile$expr(order.buyer)
value: $expr(firstName)
value: $expr(lastName)
value: $expr(emailAddress)
value: $expr(phoneNumber)
value: $expr(forcePrompt)
subplan {
goal: self.RequiredField
value: $expr(fieldsToUpdate)
}
}
}
}
}
output (Buyer) {
evaluate { $expr(buyer) }
}
}

View on GitHub

Child Keys

@context
optional
Enables you to specify the conversational context of your intent
@instantiation-behavior[deprecated]
optional
This key is deprecated
@prompt-behavior
optional
Enables you to prompt at a signal node, regardless of whether an input min- or max-cardinality constraint has been violated