Search code examples
bixbybixbystudio

Bixby: unable to implement custom button for my capsule


I want a custom button for my capsule in Bixby. I have tried using the conversation-driver. Using conversion-driver, I am able to make a button but I have to pass some input data to the respective goal. For that, I am unable to define goals and set value in conversation-driver.

I also tried using followup, where I am able to define the goal. But it works only with "Yes" and "No". And I want something like instead of saying "Yes" if I say "Next" or "Book", it should pass the input data to another page.

So, is there any way to display a button and on click or speak, it passes data to the respective goal.

conversation-drivers {
 conversation-driver {
  template ("Book")
 }
}

followup {
  prompt {
    dialog (order summary)
    on-confirm {
      if (false) {
        message (I see...)
      }else {
        intent {
          goal: book
          value:$expr(book.id)
        }
      }
    }
  }
}

Solution

  • What you want is a continuation. It can connect the previous result with a new one. In your case, you can display your result-view and display a 'Book' conversation driver at the bottom.

    In your Book action, you can feed the previous result concept into the new Book action. In that case, you'll have the id. So, for example...

    action (Book) {
      type(Calculation)
      description (Continuation)
      collect {
        input (resultFromPreviousAction) {
          description (Output from your previous action when you say BOOK)
          type (PreviousResult)
          min (Required) max (One)
        }
      }
      output (BookingResult)
    }  
    

    Make sure you train as a 'continuation'.

    enter image description here