Khoros Flow Basics: Context

Context is an essential part of conversational design. In Flow, context includes both state of the conversation and the direction that the conversation thread is going.

Flow's Natural language processing (NLP) engine keeps track of the state of the conversation. As the context of a conversation changes, Khoros Flow can seamlessly switch between different flows.

Steps provide context

Each step in a flow steps provides the NLP engine with the context to determine which action and flow to match.

For example, here are two different flows that use the same contextual follow-up step:

So whenever a user triggers the second step by adding And which one is relatable to the context of the first question- How many stars are there in the Milky Way? or I am looking for a restaurant, is used as context to match the second step to send a reply.

How context works

You might notice the design of a flow looks linear, but this is not the case. A user does not get stuck inside a flow whenever a step was matched. With each new message, the NLP engine decides the next course of action based on context (probabilistic model) and selects the matching step withing a specific flow.

Switching between flows

This example shows how a conversation can seamlessly move between two flows.

  1. A customer starts a conversation with I want to order pizza (using the order flow type).
  2. The app replies Delivery or Carry out?
  3. The customer doesn't answer that question but instead asks What's on the menu? (using menu flow type).
  4. The app then replies with a menu.
  5. The customer can continue with I want my pizza delivered.

📘

Note: Context applies to every trigger. When a user shares an image, shares a location or triggers and event, this also works with context, not just text. The only exception is events, those can be triggered mid-flow.

Best practices

When designing flows, here are some best practices to keep in mind.

Single topic

Don't combine multiple topics into one flow. For example, greetings and goodbyes are separate topics and should not be combined. This allows the engine to switch between greetings, pizza ordering, and goodbyes without a problem.

Instead, keep your flows as focussed as possible to provide maximum flexibility for your app. Create separate flows for each topic. This helps the NLP engine to keep track of the position of the conversation.

Open context

Start your flows with triggers that are not within context.

In other words, never start a flow with something like a Yes or a No text trigger. Such a trigger should best be in context of any previous question or response.

Instead of creating these specific flows, you can use branching for these contextual follow-ups.

Resetting context

Context builds up and exists for at least 24 hours. Sometimes context can lead to unexpected behavior and for that, you can clear context by using a Reset Action.