Search code examples
dialogflow-es

Dialogflow: How are user-contexts differentiated


How does Dialogflow differentiate between different customers
I am storing user related data in contexts, how does dialogflow differentiate between different users using dialogflow simultaneously and keep contexts specific to users


Use case is that many users will make a request to a vendor and the vendor would make a request to dialogflow

Solution

  • Dialogflow keeps track of context based on the session ID, so even if two users are in the same context, you will be able to see a difference in their session. Below is a sample from the Dialogflow simulator. You can find it under the Diagnostic Info button.

    "outputContexts": [
      {
        "name": "projects/[ProjectName]/agent/sessions/[SessionID]/contexts/[ContextName]",
        "lifespanCount": 5,
        }
      }
    ],