A bot sometimes needs to
- Remember information the user provided minutes ago
- Personalise the same response to 2 users differently
With contextual information like Memory, User Attribute, and NLP Attribute, a bot makes smarter decisions to find a Passing Rule.
A group of user interactions with your bot that take place within a given time frame. A single session can have multiple messages, button clicks, and transactions. A single user can have multiple chat sessions with your bot, which can occur on the same day or over several days, weeks, or months. By default, a session expires after 10 minutes of inactivity. You may customise your bot's session length on the Personality page.
A temporary variable used to store additional information about a chat session. It is used to remember topics and values that the user was talking about in the current session. It can be accessed in the bot's responses with the merge tag
Here's an example of memory property usage
User: How much is the large pepperoni pizza? Bot: The large pepperoni pizza is $29.90
Bot stores a memory property: item-requested, value: pepperoni pizza------------- User: How about the small one?
Bot remembers "pepperoni pizza" from the item-requested memory propertyBot: The small pepperoni pizza is $19.90
When your session expires, your bot forgets its memory context (i.e. all its memory properties)
A permanent variable used to store custom information about a user messaging your bot. The user context (i.e. all user attributes) can be accessed in User Profiles. It is used to keep track of long-term custom fields like preferences, survey answers, access levels, and transaction activity. It is essential for customer segmentation, which in turn allow you to create personalised chat experiences and targeted broadcasts. It can be accessed in the bot's responses with the merge tag
A derived variable from connected Artificial Intelligence (AI) integrations. You may connect any number of AI integrations like Dialogflow and Wit.ai. After adding at least one AI integration, every message sent to your bot will be forwarded to the AI integration. The AI integration will derive intents, traits, and entities and store it in the NLP context (i.e. all NLP attributes). It can be accessed in your bot's responses with the merge tag
A static global variable for your bot, which can be used in any response in every chat with every user. Shortcuts are declared on the Personality page. It is useful for text-replacements like on iPhones and Androids, and also for storing environment variables for Developers. It can accessed in a conversation with the merge tag
A way to dynamically modify contexts during a session. You can add actions in stories, and they will modify one of 4 contexts: memory, user attributes, user tags, and shortcuts. An action has 3 parts to it: a property, a function, and a value.
From our example above, we can create a story with one action