Capture data through conversations

You can leverage conversational Studio Conversational Studio to capture relevant user data and enrich their profiles.

When you use User properties in a flow, it leads to a personalised conversation. Every bot session is mapped to a certain record in user 360.

You can use user properties in the following manner:

  1. Fetching the value stored in user property: You can do it through text nodes, for example Hello {{User.firstName}}. In this, the value will be fetched from the properties of the user record that the current session is mapped to.
  2. Setting the value for a user property: This might happen in prompt nodes or variable nodes, where you are trying to set a value for a user property. In such scenarios, the user property of the user record mapped to the session will be updated. This allows us to capture user data based on the conversations with the users.

1. Capture user properties through conversations#

Prompt nodes not only help in creating personalized conversations, but also enriches user profile as the information is updated in the database. It can store responses of conversations that involve asking user details such as name, email, phone number, location, or any system/custom user property in the relevant field.

drawing

However, there are cases where the data is not collected directly. For example, you might want to fetch certain data from the event payload and pass it to a user property. Use the Input node and select the desired user property where you want to store the data.

note

The data captured through Studio conversations for Identified Users will be updated automatically in the Users table.


2. Auto-create records for unidentified users#

An unidentified user is a user whose userId is not captured yet. For a new user on a channel, when a user property other than userId is captured, a record is created in User 360.

For example, the moment name is captured, a similar record is created in User 360, to which the ongoing session will be mapped to.

  • Changing the session mapping, using user identifier

    The session mapping changes when an existing userId is provided.

    For the above session, if the userId is [email protected] which does not exist in User 360, the userId of the session will be updated without changing the mapping.

If the userId (say, [email protected]) already exists, the current session will be mapped to the existing record and it’s properties will be refreshed with that records values

note

Session mapping is used to point multiple sessions on different channels to the same user record. This allows us to maintain context for the same user across different channels.


3. Understand Switch & Merge concepts#

A Switch happens when a session switches it's mapping from one CDP record to another.

In the above example, session changes it’s mapping from CDP Record 1 to CDP Record 2.

A Merge happens when an unidentified record is merged into an identified record:

  1. Non-list Type Properties that don’t exist in the identified record will be carried over from the unidentified record
  2. List Type Properties will be unified
  3. The unidentified record will then be deleted
note

Identified records cannot be merged.

Unidentified record

userIdfirstNamewhatsAppOptindeviceTokenTag
-JimYes(123,456)(t1,t3)

Identified record

userIdfirstNamewhatsAppOptindeviceTokenTag
[email protected]Jim-789(t1,t2)

Result record

userIdfirstNamewhatsAppOptindeviceTokenTag
[email protected]JimYes(123,456,789)(t1,t2,t3)

The following table explains how updating userId through conversations works.

User Id can be updated in Builder using a Prompt or Variable node.

userIdExists in User 360?Workflow
Is IdentifiedNoCreates a new Record with the new UserId provided - Switch mapping to new record
Is IdentifiedYesSwitch mapping to existing record with the new userId.
Is UnidentifiedNoCreate a new Record with the new userId - SWITCH mapping to new record - MERGE un-identified record into the new record
Is UnidentifiedYesSWITCH mapping to existing record with “new UserId” - MERGE un-identified record into the existing record

4. Add userId through conversations#

To update userId of the customer when capturing customer identifiers, in the Prompt node, click Make prompt smarter > Scroll down to the Additional section and check Use this as Unique ID for user.