Clear conversation session parameters in Google Action

Viewed 126

In my conversation action, I have a scene in which the user is asked for a parameter. When I want to use that parameter I retrieve it that way:

const parameter = conv.scene.slots
    ? conv.scene.slots["parameterName"]?.value
    : "";

It works perfectly well on a first loop, but I want to give an opportunity to pick another value to the user. In the flow chart in scenes, I transition to the same scene when MEDIA_STATUS_FINISHED is triggered but instead of asking for filling the slot conversation already has this slot value in a session parameters list and plays that same mp3s as it seems that scene.slots.status == "FINAL" is matched.

How can I clear those parameters? Conversation object is immutable so do I have to clone it with empty session storage somehow, or is there a better way?

I want to achieve something like here on Again

https://youtu.be/Z1hxvniJ18s?t=2495

But I use backend service and add upon conversation instead of using prompts

0 Answers
Related