Maintaining a tracker for slots

I am trying to maintain a slot tracker to handle a sudden change of context(including intent, entity, and slots) in my bot. How do I do this? I am unable to find examples for a tracker I need to know if I can use in my problem statement and how? An example would be At a particular instant, I am querying for let say a black formal shoe and next moment I change the context and ask for a brown casual shoe. I somehow intend to handle this.

I would really appreciate any leads