Contact usRequest a demo

Conversation timeline

This article describes the various entities Unblu creates while a conversation is ongoing.

Introduction

Conversations are the foundational data type for all communication that takes place in Unblu. All the elements of a conversation—​the participants, the data they exchange as messages, files, or media streams, and the collaboration layers they use—​are related to one another through the conversation that communication takes place in.

Some data related to conversations is persisted so you can determine who said what when and to whom at a later time.

It’s important to understand when Unblu creates the entities that hold these different types of data.

Conversation timeline example scenario

The following scenarion presents an example of a conversation timeline. It’s used as a basis to explain the different entities in later sections:

  1. A visitor starts a conversation and waits for an agent to join.

  2. Agent A accepts the incoming conversation request in the Agent Desk on their desktop computer and automatically joins the conversation.

  3. Agent A has to leave the office for a meeting, so they join the conversation on their mobile device. For a brief period, they’re in the conversation both in their desktop browser and on their mobile phone.

  4. Agent A can’t answer all the visitor’s questions, so they forward the conversation to agent B.

  5. After a while, agent B answers the forwarded conversation.

  6. Agent B invites agent A to the conversation again to answer some further questions. They don’t forward the conversation, since they think they may still be needed.

    Agent A isn’t online, so the visitor and agent B decide to postpone any further discussion until agent A replies. Both agent B and the visitor close their browsers.

  7. Agent A returns from their meeting and sees that they’ve been invited back into the conversation. They accept the invitation and send a reply.

  8. Agent B is notified of agent A’s reply. They see that they’re no longer needed and leave the conversation.

  9. The visitor receives a notification on their mobile phone that agent A has posted a message in the conversation. They open the mobile app and read the messages.

The diagram below shows the timeline of the conversation outlined in the scenario. Each point of the scenario’s description corresponds to one of the numbers in the diagram.

A schematic timeline of the conversation described in the scenario

Conversation timeline for the example scenario

The entities in a conversation’s timeline

The diagram of the scenario above doesn’t show the various entities Unblu creates for each conversation. We discuss each of these entities below and relate them to the various steps in the timeline of the scenario. First, however, it makes sense to recapitulate what a conversation is and how individuals are represented in Unblu.

Conversations

Conversations are the cornerstone for all communication that takes place in Unblu. A conversation represents a communication channel between two or more people. All communication that takes place in Unblu does so in the context of a conversation.

Conversations have a clearly defined life cycle. What can and can’t happen in a conversation depends on its life cycle state.

Once it’s started, a conversation may go on indefinitely, or it may end. Depending on how you’ve configured Unblu, a conversation ends when an authorized participant ends the conversation manually, or when the conversation’s state meets the conditions for Unblu to end it automatically.

In the scenario above, the conversation is created right at the beginnning, when the visitor starts a conversation.

Persons

Anyone capable of joining a conversation must be represented by a person entity in Unblu. This applies to humans and other systems such as bots.

The person entity that represents an individual is created when they first access Unblu.

When someone joins a conversation, their person entity is linked to the conversation.

People may join and leave conversations, provided they’re authorized to do so. Once they leave a conversation (or are removed from it by someone else or by the system), they no longer have access to the conversation. They do, however, stay linked to the conversation.

In the scenario above, each row in the diagram represents a different person.

Conversation participation

A person is linked to a conversation, and remains linked to a conversation after they leave it, by the conversation participation entity.

A conversation participation, or participation for short, represents the time that a person is (or was) part of a conversation.

  • Each person linked to a conversation at some point in time must have at least one participation for that conversation. Conversely, only persons with an active participation may open the conversation in question and take part in it.

  • A person’s participation only ends if they leave the conversation themselves or if they’re removed from the conversation.

    If they rejoin the conversation later—​by accepting an invitation, for example—​Unblu creates a new participation for them.

  • At any given time, a person can only have one participation in a given conversation.

The example scenario above includes a number of conversation participations:

  • Unblu creates the visitor’s participation when they start the conversation (step 1).

  • Agent A’s participation is created when they answer the visitor’s request (step 2).

  • Agent B’s participation is created when they redeem the forwarding (step 5). When agent B redeems the forwarding, agent A automatically leaves conversation, so their first participation ends.

  • Unblu creates a new participation for agent A when they accept agent B’s invitation (step 7).

  • Agent B’s participation ends when they leave the conversation (step 8).

Conversation presence

As mentioned above, the visitor’s participation in the scenario’s conversation starts when they start the conversation and persists until the conversation is over. Yet they closed their browser after talking to agent B, and didn’t have the conversation open on any device until they were notified of agent A’s message and read it on their mobile phone.

How does Unblu keep track of who’s viewing a conversation if their participation persists even though they may be offline?

Furthermore, for a brief period, agent A took part in the conversation with both their desktop browser and on their mobile phone. How is that possible if a person can only ever have one conversation participation?

The answer to these questions lies in the conversation presence entity.

A conversation presence represents the time a person is actively taking part in a conversation on a particular device, that is, they have the conversation open on a device. If a person has the same conversation open on more than one device, they have a conversation presence for each of the devices.

A participant’s conversation presence ends when they navigate away from the conversation—​by closing the browser tab with the conversation, for example—​or when the connection between the Collaboration Server and the device that the conversation presence is related to times out.

In the example scenario, Unblu creates a total of seven conversation presences:

  • The visitor has two conversation presences:

    • Unblu creates the visitor’s first conversation presence when they start the conversation (step 1).

      It destroys this conversation presence when the connection between the visitor’s browser and the Collaboration Server times out after they close their browser (step 6).

    • When the visitor opens the mobile app to view agent A’s message (step 9), Unblu creates a new conversation presence for the visitor. This conversation presence is destroyed after a timeout when they close the mobile app.

  • Agent A has three conversation presences:

    • Unblu creates their first conversation presence when the answer the visitor’s conversation request in the Agent Desk (step 2).

    • When they open the same conversation in the mobile app, Unblu creates a new conversation presence for them (step 3). The new conversation presence is linked to a different device from their first conversation presence.

      This conversation presence briefly exists concurrently with the agent’s first conversation presence, until they close the Agent Desk on their desktop.

    • When agent A accepts agent B’s invitation, Unblu creates a new conversation presence for them (step 7). This conversation presence is destroyed shortly after they close the Agent Desk.

  • Agent B has two conversation presences:

    • Their first conversation presence is created when they redeem the forwarding (step 5). This conversation presence is destroyed shortly after they close the Agent Desk because agent A’s unavailable (step 6).

    • When they open the conversation in the Agent Desk again to read agent A’s message, Unblu creates a new conversation presence for them (step 8). This conversation presence is destroyed when they leave the conversation.

Person presence

It’s important to distinguish a person’s conversation presence and their person presence.

A person presence is the time a person is available in Unblu. A person is available when they’re:

  • On a website with the Unblu JS snippet loaded

  • Using the Visitor Desk

  • Using the Unblu mobile SDK

  • Logged in to the Agent Desk

Since a person can use more than one device at once, they may have more than one active person presence.

Conversation session

As soon as at least one participant of a conversation is online and wants to interact in or view a conversation, the conversation data is loaded into an conversation session entity.

At any one point in time, a conversation can only ever have one active conversation session.

Unblu creates and destroys conversation sessions automatically based on the existence of conversation presences. As soon as a conversation has at least one conversation presence, Unblu launches a conversation session. The conversation session lets participants with a conversation presence access the conversation.

When there are no more conversation presences linked to a conversation, Unblu destroys the related conversation session.

The example scenario revisited

Now that you’ve learned about the various entities Unblu creates in the course of a conversation, we can add this information to the description of the example scenario. The expanded diagram below shows the same scenario with the different entities Unblu creates:

A schematic timeline of the scenario showing the various entities created and destroyed during the conversation

Conversation timeline for the example scenario with the various entities Unblu creates

  1. A visitor navigates to a page instrumented with Unblu, and Unblu creates a person presence for them.

    They start a conversation and wait for an agent to join. Unblu creates the conversation and a conversation session. It also creates a conversation participation and conversation presence for the visitor.

  2. Agent A accepts the incoming conversation request and automatically joins the conversation. As a result, Unblu creates a conversation participation and a conversation presence for them, too. (They already have a person presence because they were logged in to the Agent Desk.)

  3. Agent A has to leave the office for a meeting, so they join the conversation on their mobile device. They briefly have two conversation presences in the conversation until the desktop browser’s conversation presence times out.

  4. Agent A can’t answer all the visitor’s questions, so they forward the conversation to agent B. Their conversation presence ends when they close the app. Their conversation participation, on the other hand, doesn’t end until Agent B accepts the forwarding. Until then, Agent A remains the assigned agent of the conversation.

  5. After a while, Agent B answers the forwarded conversation. They now become the conversation’s assigned agent. Agent A is removed from the conversation and their conversation participation ends.

  6. Agent B invites agent A back to the conversation to answer some further questions. They don’t forward the conversation, since they think they may still be needed.

    Agent A isn’t online, so the visitor and agent B decide to postpone any further discussion until agent A replies. Both of them close their browsers.

    Now, there are no conversation presences in the conversation session, so Unblu ends the session after a timeout. The conversation itself hasn’t ended, though.

  7. Agent A returns from their meeting and sees that they’ve been invited back to the conversation. They accept the invitation, and Unblu creates a new conversation participation and a conversation presence for them in the conversation. Since the conversation now has conversation presence, Unblu creates a new conversation session.

  8. Agent B sees that they’re no longer needed and leaves the conversation. This ends their conversation participation and conversation presence.

  9. The visitor receives a notification on their mobile phone that agent A has posted a message in the conversation. They open the mobile app and read the messages.

    After the visitor thanks agent A, the latter ends the conversation. This also ends everyone’s conversation participation and conversation presence, as well as the conversation session.

See also