Bixby Developer Center

Guides
References

type

optionalvalue optional

Specifies the action type. When choosing an action type, select the narrowest possible value.

Example

action (FindPopulation) {
type (Search)
}

Calculation

An isolated computation on the inputs guaranteed to return a result.

action (GetDistance) {
type (Calculation)
collect {
input (point) {
type (GeoPoint)
min (Required)
}
input (relativePoint) {
type (RelativePoint)
min (Required)
}
input (unit) {
type (DistanceUnit)
min (Required)
}
}
output (Distance)
}

Constructor

An isolated construction of the output using only the provided inputs.

 action (ConstructStreetAddress) {
type (Constructor)
collect {
input (streetNumber) {
type (StreetNumber)
min (Optional) max (One)
}
input (street) {
type (Street)
min (Required) max (One)
}
}
output (StreetAddress)
}

Fetch

A simple retrieval of additional data directly related to an input.

action (GetRating) {
collect {
input (business) {
type (Business)
}
}
output (viv.rating.Rating)
type (Fetch)
}

Search

A search for related data using the inputs as constraints.

action (FindPopulation) {
type (Search)

BeginTransaction

Outputs a concept in a transaction.

action (CreateOrder) {

description (Create an empty cart)
type (BeginTransaction)
collect {
input (restaurant)
}
output (Order)
}

UpdateTransaction

Update a concept in transaction. The output is a concept in a transaction and should also appear as an input to the action.

action (AddToOrder) {

description (Add a menu item to an order, with the specified quantity and options, if provided.)

type (UpdateTransaction)

collect {
// add to this order
input (order) {
type (Order)
}

// add this item
input (item) {
type (viv.restaurant.MenuItem)
min (Required) max(One)
}

// add this quantity
input (quantity) {
type (Quantity)
}
}

// updated order
output (Order) //updated order
}

CancelTransaction

Aborts a concept in a transaction. The transaction concept should appear as an input to the action.

action (AbortPendingOrder) {
description (Abort a pending order, i.e., one that has not been finalized.)
type (CancelTransaction)

collect {
input (order) {
type (Order)
min (Required)
}
}
output (Receipt)
}

Commit

Finalize a concept in a transaction. The transaction concept should appear as an input to the action.

action (FinalizeOrder) {
type (Commit)

collect {
input (order) {
type (Order)
min (Required)
}

input (deliveryAddress) {
type (DeliveryAddress)
}
}

output (Receipt)
}

RefreshActivity

Refresh a concept in an activity. The action's output is a concept in an activity and should also appear as one of the inputs.

action (CheckDeliveryStatus) {
type (RefreshActivity)
description (Fetch latest data for an existing receipt, including any status updates.)

collect {
input (receipt) {
type (Receipt)
min (Required)
}
}

output (Receipt)
}

UpdateActivity

Updates a concept in an activity. The action's output is a concept in an activity and should also appear as one of the inputs.

CancelActivity

Aborts a concept in an activity. The action's output is a concept in an activity and should also appear as one of the inputs.

action (CancelDelivery) {
type (CancelActivity)
description (cancel a food order scheduled for delivery)

collect {
input (receipt) {
type (Receipt)
min (Required)
}
}

output (Receipt)
}

ArchiveLookup

An action that leverages the Transactions API with no side effects on external systems.

action (RetrieveReservation) {
type (ArchiveLookup)

description (Retrieve action for Reservation)

collect {
input (origin) {
type (viv.interparkFlight.DepartureAirport)
min (Optional) max (Many)
}
input (destination) {
type (viv.interparkFlight.ArrivalAirport)
min (Optional) max (Many)
}
input-group (dates) {
requires (ZeroOrOneOf)

collect {
input (departureDate) {
type (time.Date)
min (Optional) max (One)
}
input (departureDateTime) {
type (time.DateTime)
min (Optional) max (One)
}
}
}
}

output (Reservation)
}