Hi everyone,
Is it possible to clear the slot values and slotFillingStatus with jovo and how?
or
What is the right approach to use the slot filling in google action builder?
I’m running into a problem that the slots are still filled after the transition to my new scene where I want to gather other slots. There the condition “if scene.slots.status == “FINAL”” is true and doesn’t enter the rest of the scene.
I configured my scene like in the example from Google: The Jungle Escape
When they transition from the condition to the scene, they call a function in the webhook to clear all params. I think that’s their trick that in the next scene it doesn’t fullfill the first slot condition. Or do I miss something else?
/**
* Clears params
* @param {obj} conv, the conversation object.
*/
function clearParams(conv) {
for (const key in conv.session.params) {
conv.session.params[key] = null;
}
}
I tried:
this.setSessionAttribute('riveranimal', null);
and
scene.slotFillingStatus = 'UNSPECIFIED';
and
delete scene.slots.riveranimal;
it seems like, the action holds its own slot value and ignores everything I do in the jovo webhook.
EDIT:
Right now I work with this workaround, at least with that, I come into the scene:
scene.slots.status == “FINAL” && session.params.riveranimal != “hippo”
Thank you for your help