How to iterate gambit for set of questions.

Is there any way to iterate over a gambit for a set of Questions.

Currently, I can iterate over answers.

Suppose I have received an array of questions from API call, like below. For simplicity, I have included only two questions, there may be many more questions.

I need this because the number of questions is decided dynamically, If the number of questions was predefined I would have made those many gambits but here it’s not the case.

Is there any way I can do this?

{  
   "questions":[  
      {  
         "question":"what is your experience?",
         "answers":[  
            "1 year",
            "2 years",
            "3 years"
         ]
      },
      {  
         "question":"what is your domain?",
         "answers":[  
            "Manufacturing",
            "IT",
            "Education"
         ]
      }
   ]
}
1 Like

Hi @bhnbhushan,

Thanks for asking this question. I think this is one of those requirements which will lead to a point where you can build a whole bot programmatically.

Currently this feature is not there. The Data iteration feature allows for itetrating over data points which is usually available in someone’s DB. Like users, products, search results etc…

But hardly anyone makes a system which delivers questions to be asked to users, over an API.

But we can see that eventually people would want to deliver questions to be asked to the users, over an API. One way is to build a capability which will allow developers to make their conversational flow programmatically and deploy those bots.

Other way is something which you suggested, where you can run iteration over the whole gambit itself, instead of a message bubble, or a button, or a card. So that all the things inside that gambit will be parametrized and goes through each member of the questions array in the above example.

We definitely want to get to a point where people are building deep integrations like these with our system to make such bots automatically, but we are not there yet. Essentially because this is a very sparse use-case and in fact you are the 2nd user asking for such a feature.

@vinit Thank you.

I was evaluating Tars bot to see if we could use it for our requirement. First of all kudos to you and your team. You have a great product. It was easy to use. Documentation is great, I was able to implement its every feature within one day with API config.

Considering our requirement, I would like to just list down feature requirements that we thought might be available with TARS when we came across it. You may already have had such feature requests, but for your information, I am just listing them here.

  • Iteration over Gambit (as explained in the post)
  • Ability to edit previous responses. (For example, Ability to undo previous selection in case of multi-choice )
  • Custom Validations for input fields.
  • UI customization. (Adding custom styles.)
  • Ability to bind user responses to a predefined model.