Is it possible to share a session between Dialogflow agents of different languages?

65 views
Skip to first unread message

Alok Gupta

unread,
Jul 7, 2021, 12:09:50 PM7/7/21
to Dialogflow CX Edition users
Hi,

Is it possible to share a session between Dialogflow agents of different languages? The plan is to use the same session Id when switching to a different language with the same virtual agent. As per our test, it seems to work. But, can you please confirm?

Thanks,


Hannah Jane Nicole Altares

unread,
Jul 9, 2021, 11:58:51 AM7/9/21
to Dialogflow CX Edition users

Yes, you should be able to use the same session ID when switching to a different language in the same Dialogflow agent.

When sending a detectIntent request to your agent, simply specify your desired session ID in the detectIntent request and specify your desired “languageCode” in the “queryInput.languageCode” field of your request body.

Here’s a sample detectIntent request for REST API:

Sample URL for detect intent API:

POST     https://dialogflow.googleapis.com/v3/projects/project-id/locations/location-id/agents/agent-id/sessions/session-id:detectIntent

Make the following replacements for the URL:

  • project-id: your GCP project ID

  • agent-id: your agent ID

  • location-id: your agent’s location ID

  • session-id: your desired session ID

Sample JSON Request Body should look like this:

{

  "queryInput": {

    “text": {

       "text": "hello"

    },

     "languageCode": "en" // desired language code

Alok Gupta

unread,
Jul 9, 2021, 12:21:52 PM7/9/21
to Hannah Jane Nicole Altares, Dialogflow CX Edition users
Thank you for confirming!

SADA Systems is a premier cloud solutions provider specializing in technology consulting, IT services, application development, and managed services.
TwitterFacebookLinkedInYoutube

ALOK GUPTA

Architect, Emerging Solutions

M: (562) 276-8980

 



--
© 2021 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Dialogflow CX Edition Discussion Google Group (dialogflow-cx...@googlegroups.com) to participate in discussions with other members of the Dialogflow community and the Dialogflow Team.
---
You received this message because you are subscribed to the Google Groups "Dialogflow CX Edition users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dialogflow-cx-editi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dialogflow-cx-edition-users/2e527f66-09d2-4628-bdfb-172596901950n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages