For most bots, storing state refers to the information that a bot retains during a conversation to provide continuity and context. It includes details such as where the conversation left off, user preferences, and previously gathered inputs.

UI Builder lets you store data into two distinct scopes: short-term and long-term scopes.

Short-term Scopes

Short-term scopes store temporary data, typically relevant only within a single session or conversation. Once the session ends, this data is lost. These are useful for short-term tasks such as processing logic or capturing information as part of a conversation.  The short-term scopes available in UI Builder are:

Long-term Scopes

Long-term scopes store information across multiple interactions, allowing the bot to remember users and provide personalized responses over time. These are useful for user, or conversation level data that you want to store. The long-term scopes available in UI Builder are:

image.png

Below is an example of conversation design where the user’s age is captured and assigned to a user **scoped variable:

image.png