1

Looking into starting a project using DialogFlow CX. Seems rather promising but have one issue I cannot seem to find an answer for. The agent will be connected to via IVR (from Flex/Callcenter). I need to gather some information on start so that I can identify the hotel/property that will be referenced in the conversation. I found session parameters but those are isolated to the session from start to finish but not passed to the start of a session. We are starting with about 60 properties and when the agent starts, it needs to "know" what property it is dealing with.

Another quick question - will I need a separate telephony integration number to run multiple concurrent instances?

I am really new to all this so my language may be off. Thanks in advance!!

Robert

Robert L
  • 11
  • 1
  • I think the solution is in this article. https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway – Robert L Sep 25 '22 at 14:18
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Sep 25 '22 at 19:08

1 Answers1

1

Passing parameters to dialogflow Cx depends on your integration, but a general way to do this would be to call a webhook at the Welcome node with parameters set to null that you want to return with updated values from backend:

enter image description here

Return Response in the following manner and it will work via a webhook:

Link to Google Cloud Functions Webhook Example

 {
        "fulfillment_response":
            {
                "messages": [
                    {
                        "text": {
                            "text": [
                                "Test Response"
                            ]
                        }
                    }
                ]
            },
        "session_info": {
            "session": projects/project-name/locations/your-agent-location/agents/a6ed61ef-008b-49bb-8526-d8e68982d2b4/sessions/d3bd9c-9d9-8c8-4a8-f623bdb25,
            "parameters": {
                "property1": 746932,
                "property2":34123
            }
        }
    }

Python Flask Solution:

import os
from flask import Flask, request, redirect
app =Flask(__name__)
@app.route('/test', methods=['POST'])
def test():
    req = request.get_json()
    session_name=req['sessionInfo']['session']
    print(req)
    res = {
        "fulfillment_response":
            {
                "messages": [
                    {
                        "text": {
                            "text": [
                                "Test Response"
                            ]
                        }
                    }
                ]
            },
        "session_info": {
            "session": session_name,
            "parameters": {
                "property1": 746932,
                "property2":34123
            }
        }
    }
    return res
if __name__ == "__main__":
        app.run(port=5000,debug=True)
Aymal
  • 191
  • 12