Session data management

From Wisevoice Wiki
Revision as of 11:10, 19 November 2019 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Each Wisevoice conversation has an associated session that contains a key-value map of user's data.

Data can be inserted in the session in the following ways:

  • Entities extracted from user input are stored in the session using the entity name as a key.
  • When triggering a REST or UiPath event you can also pass a JSON Object. All the keys-values from the JSON Object will be injected in the session.
  • When a Service is triggered it can return a synchronous response in the form of a JSON Object. All the keys-values from the JSON Object will be injected in the session.
  • Values can be added or overwritten by Script components.
  • The following system values will be inserted automatically:
    • channel_name - the name of the channel, web, sip, facebook, etc
    • sip_phone_number - for callcenter conversation the caller phone number is stored in the session
    • navigation_history - a list of all the "visited" nodes from the flow


Session data can be used the following way:

  • Use the session data in any message or text by using the {{<key name>}} syntax. This is available for Message texts, Entity prompts or Service parameters
  • Do custom data processing in Script components by referencing them with this.user_data.key
  • Configure conditions in the connections tab based on session data