1. Concepts
  2. Stub Session

Concepts

Stub Session

How conversations are linked to stubs

Basic Principle

The Stubber platform has integration to many different omni-channel communication platforms (Whatsapp, Slack, etc)

When a conversation is started on any of these platforms, it needs to be linked to a stub in the Stubber platform.

Stubber keeps track of the conversation and the stub it is linked to with the concept of a stubsession. A stubsession is simply a link between a conversation and a stub.

Notification Platforms

Each notification platform has a unique way of linking a conversation to a stub. The most advanced usage of a stubsession is in the Whatsapp platform.

The Whatsapp platform requires the careful management of a session to handle the context switching that might happen within a single thread between a user and a number.

You can find more information on how each notification platform sets and expires a stubsession in the respective documentation for that platform.

Key Concepts

Setting a Stubsession

When a new message is sent on an action, the stubsession can be set by using a parameter on the notification. This usually is done by setting a timeout of the session in hours.

Stubsession Expiry

A stubsession will expire after a certain amount of time in most cases.
It can also be explicitly expired by using a task.

Stubsession Cancellation

A stubsession can be cancelled as well, this is useful when a stub closes and you want to cancel all the stubsessions that are linked to it.

Incoming routing

Each notification platform implements a routing algorithm for incoming messages. These algorithms can incorporate many different aspects of the platform, like how to route replies ect. In general they all incorporate a check to see if there is an existing stubsession, which the routing algorithm will then use to route the incoming message to the stub specified in the stubsession setting.