Difference between revisions of "Session data management"
From Wisevoice Wiki
(Created page with "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 a few ways: *Entities extracted fro...") |
|||
Line 1: | Line 1: | ||
Each Wisevoice conversation has an associated session that contains a key-value map of user's data. | 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 | + | 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. | *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 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. | ||
Line 10: | Line 10: | ||
**sip_phone_number - for callcenter conversation the caller phone number is stored in the session | **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 | **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 |
Latest revision as of 11:10, 19 November 2019
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