Fill slots according to a predicted intent

Hello, In my dialogue flow I have multiple Yes/No questions. The user of course is free to answer by his own words and nlu will predict what intent is (affirm /deny) . I need, after predicting the intent to fill a slot referring to the question by a specific value (for example 0 and 1) representing the predicted intent. Is there a way to do that ? I’d appreciate your help.

Sure, just write a custom action, you can use the tracker to get the latest intent to make logic that sets a slot based on the intent. You’ll want something ilke this:

intent = tracker.latest_message["intent"].get("name")