I'm developing an app that will work as a troubleshooter. In this, I want to ask the customers only relevant questions instead of giving them an exhaustive list.
Every option they choose will have to be linked to a new question with only a few answers, so I can distill the issue they are having effectively and without them having to try 10 different things or answering 20 questions that have little to do with the issue and amount to nothing in the end (hello Windows troubleshooter).
I have made the framework in HTML which was easy enough but the biggest thing to do is store all the strings and connect them together in a somewhat clear way, like a diagram or something. Right now, I can only think of populating a DB with the sentences but the linkage will be chaotic as hell.
So, the only question I have is: Does anyone have an idea on how to do this in a better way, perhaps some kind of visual representation software?
I tried, as a test, to add the strings as objects in a json, which works well but the linkage already got super chaotic when I went above 50 strings ish, and I will be needing much more (thinking 1000 ish at least).
Thanks in advance for any input.
=============
EDIT: Oh wow, lots of answers, thanks all! It seems like most answers are similar, and it looks like that is what I already have. Thanks for the suggestion on YAML, I will check it out.
I made a JSON structure initially without giving it too much thought, I wanted to focus on the framework first.
I guess I will need to input a lot of data anyway, so I'm not sure if I am just wasting your time and this is as good as it gets.
The thing is, many questions will lead to the same answers, so I'd like to inter link those. I have this working with the JSON structure now.
JSON with lots of objects like:
{
"ID": "3.16",
"Step":"Have you tried turning it off and on again?",
"NextStep": ["3.17", "3.18"]
},
So, if step 3.16 is triggered it will show this text and if a person says yes to that, it will show step 3.17 and 3.18
This method of inter- and cross-linking works, but get's chaotic so I just wondered if there was a better way that I am missing.
I like the DX diagnosis suggestion as well, but this does not make the structure simpler it seems? But I will probably add that as the weights would be very good to have.