Is there any way to ask users to re-fill some slots?


#1

Hi,

I’m trying to give my users the option to re-enter some of their details during a questionnaire.

I did that in native skill that by asking them to Confirm if the values entered are correct or not and if not they can specify what they’d like to change, clear those input valued and then restart the intent so that alexa will ask some questions again.

I would generally use dialogDelegate on regular ask application but in Jovo doesn’t seem to be working (I cannot overwrite the state of the dialog)

This is what I’m trying to do at the moment with no success:

if(validation.failed('ChangeDetails')) {
                        return this.$alexaSkill.$dialog.elicitSlot('ChangeDetails',getRandom(prompts.calculation.changeanything)+" "+getRandom(prompts.changedetails.whatdetails),getRandom(prompts.calculation.changeanything)+getRandom(prompts.changedetails.whatdetails));

                    }else{
                        ChangeDetails = retrieveSlotValue(this.$inputs.ChangeDetails.alexaSkill);
                        this.$inputs.ChangeDetails = { name: 'ChangeDetails', confirmationStatus: 'NONE' }
                        this.$inputs.Confirmed = { name: 'Confirmed', confirmationStatus: 'NONE' };
                        this.$inputs.Callback = { name: 'Callback', confirmationStatus: 'NONE' };
                        switch(ChangeDetails.toLowerCase()){
                            case "restart" :
                                this.$inputs.CivilStatus = { name: 'CivilStatus', confirmationStatus: 'NONE' };
                                this.$inputs.EmploymentStatus = { name: 'EmploymentStatus', confirmationStatus: 'NONE' };
                                this.$inputs.Income = { name: 'Income', confirmationStatus: 'NONE' };
                                this.$inputs.Dependants = { name: 'Dependants', confirmationStatus: 'NONE' };
                                this.$inputs.Expenses = { name: 'Expenses', confirmationStatus: 'NONE'};
                                break;
                            case "dependants":
                                this.$inputs.Dependants = { name: 'Dependants', confirmationStatus: 'NONE' };
                                break;
                            case "income":
                                this.$inputs.Income = { name: 'Income', confirmationStatus: 'NONE' };
                                break;
                            case "committments":
                                this.$inputs.Expenses = { name: 'Expenses', confirmationStatus: 'NONE' };
                                break;
                            case "civilstatus":
                                this.$inputs.CivilStatus = { name: 'CivilStatus', confirmationStatus: 'NONE' };
                                break;
                            case "employmentstatus":
                                this.$inputs.EmploymentStatus = { name: 'EmploymentStatus', confirmationStatus: 'NONE'};
                                break;
                        }
                        this.repeat();
                    }

Can you give me some advice?

Thanks