0

Though, I am using navigation mode in my app but i am not getting the expected results. Have asked related questions earlier but that didn't help. I am putting my point here one more time.

User will ask "Tell me the news"

Expectation

  • we will give user options like 1: sports news 2: Economy news 3: General news
  • User will select by saying second one Or user will click on the option
  • Will take input as Economy news and will give user few news in details

Actually happening

  • User will be given option and user choose second one.
  • Second option popped up again and then you have to click on that option to get news flash.

my result-view contains list-of, navigation-mode, where-each, layout-macro.
Right now, I have three file to achieve that.
NewsChoice_Result.view.bxb, NewsChoice.layout.bxb and NewsChoice_Details.layout.bxb

Scenario 2

Over here news.js has hard coded value and fixed option for the user... In my case i have to show user dynamic option based on input. For example.. ummmm... if user is saying that give me details about England football player. In this I will take England as input and fetch all the best player from England football team and provide user with 5 option. now user might select by saying first,second or third or simply click or user can say the name as well.. so it should go to result page.

I can't copy paste all the file here involved. So please let me know how do I achieve, what i wanted? Please let me know if you guys need any other information.

Rahul Gupta
  • 972
  • 11
  • 29

1 Answers1

0

The short answer is that this requires a multi-part solution:

  • Create a new Action that accepts zero inputs and outputs all the possible values you would like the user to select from to input into your original Action.
  • Add a default-init to your original Action's input collect that launches the new Action. This will ensure that, if no valid inputs are provided by the user's utterance, the new Action will be launched first
  • Create an input-view that lists out the values outputted by your new Action and requests the user to select one. Once this is done, your original Action will take over at this point.

I've created a sample capsule showing how this works and explaining it in greater detail on the Bixby Developers Help Center.

For more information, I would recommend reading about the Input Moment and Input Views as it will give you more context behind how Bixby's conversation flow works and how to implement it.

Hope this helps!

Ameya
  • 880
  • 6
  • 13
  • Unable to access your capsule... link is redirecting to other url. – Rahul Gupta Mar 01 '19 at 05:46
  • I figured out that this is your link https://support.bixbydevelopers.com/hc/en-us/articles/360018874374-How-do-I-configure-my-input-view-to-request-the-user-to-select-an-option-on-an-ambiguous-initial-utterance- ... have updated my question based on this link.. I am facing problem deploying your logic in my capsule. – Rahul Gupta Mar 01 '19 at 15:23
  • Sorry about the link issues. I've edited my initial answer to include the correct link now. Regarding the static news.js: This lib is just a placeholder. If you made any `getUrl` calls to your API in your Action JS where the example solution uses news.js, you would be able to get dynamic content. The rest of your issue would come down to how you model your solution. Both result and input views can make use of `navigation-mode` so getting the correct behavior depends on the `match` you use for your desired view and how the capsule is modeled. Explanation of hypothetical capsule below: – Ameya Mar 04 '19 at 21:24
  • Based on the information you've presented, my solution to the capsule would implement a different Action for each type of supported news (`GetSportsNews`, `GetArtsNews`, etc) with Optional inputs. Within the Action Javascripts, I would account for a flow without any inputs provided and output an array of multiple results. The view would then display it and navigation mode would allow for a user to iterate through the options via voice commands. – Ameya Mar 04 '19 at 21:24
  • I am able to understand the example but unable to implement it in my code... Is there a way you people can check my code and see what's wrong? – Rahul Gupta Mar 05 '19 at 14:44
  • Can you provide me with some more specific areas where you're hitting issues? I can provide you with more specific examples to help you implement the features where you're unclear. – Ameya Mar 05 '19 at 17:51
  • I am referring my second example.. User will ask "Give me info about Paul", Paul will be PlayerName in training with goal PlayerSearch. I will give user 5 player named Paul. user will select one of them and I will hit the selected player id in API to get the further info. If user asks "Give me info about Paul Robinson", with only option for Paul Robinson, no need to give user option, take the id of player and show information. with same training how to make sure that here we need to give option and this should go to inputView and here not to give option, it should directly go to ResultView. – Rahul Gupta Mar 06 '19 at 13:14
  • Thanks for providing specifics! If your `PlayerSearch` Action accepts `PlayerName` as an input, your Action Javascript should return information about all player names that include "Paul". The `result-view` should be coded to show a summary view in the case of multiple results and a detail view in the case of a single result. If the user asks for "Paul Robinson", the single result will trigger a detail view which should contain all the relevant information you would like to show the user. – Ameya Mar 06 '19 at 23:53