1

At this moment I'm working on an advice conversation about holidays. We've created a feed in firestore with all the posible holidays including an url to the offer. The function we build searches for an offer in firestore and than provides the URL back to Dialogflow so it can be send to the customer.

In fulfillment I set the following response:

  "followupEventInput": {
    "languageCode": "nl",
    "name": "Query-Result"
  },
     "parameters": [
      {
      "url": "$urlvalue"
    }
   ]
}

in Stackdriver I see that there is indeed a url value in the provided response:

{
 insertId: "bdzlmdg1foc8wt"  
 labels: {…}  
 logName: "projects/vakantiesnl-dev/logs/dialogflow_agent"  
 receiveTimestamp: "2020-05-14T09:17:51.034607137Z"  
 resource: {…}  
 severity: "INFO"  
 textPayload: "Dialogflow fulfillment response : {"followupEventInput":{"languageCode":"nl","name":"Query-Result"},"parameters":[{"url":"https://www.vakanties.nl/griekenland/kreta/malia/real-palace?departure=28-08-2020&flexibleDeparture=False&hotelId=229003&offer=28-08-2020|8|RTM|HER|GT06-AO|STSD00000PSC|STSD00000P|VAKNLB2C|0"}]}
"  
 timestamp: "2020-05-14T09:17:51.019Z"  
 trace: "944e1df4-5f91-4766-94dd-6cd4c47edbf7"  
}

However, Dialogflow doesn't retrieve the parameter value into the conversation. In the intent I set the parameter as follows:

see screenshot of the parameters set in the intent of Dialogflow

In Stackdriver I see that the value for URL is indeed empty

      key: "url"
      value {
        string_value: ""
      }
    }

My question What do I need to to in order to retrieve the url value in the conversation?

Thank you so much in advance!

  • Hi Xaviera, welcome to Stackoverflow! Could you go into a bit more detail on how you are setting the response in the fulfillment? Are you using a code library or just sending back the raw JSON? In most cases the parameter field is read-only and cannot be set from the fulfillment as it is used by the NLP to retrieve parameters from the user input. https://cloud.google.com/dialogflow/docs/tutorials/build-an-agent/create-intent-with-parameters#extract_information_using_entities_and_parameters – Jordi May 14 '20 at 14:11
  • Hi Jordi! Thank you so much for your response. We are sending back the raw JSON, but normally I have no problem with retrieving parameter value from it. The link you set sadly doesn't apply to my issue since the customer won't provide information about the URL. – Xaviera Huisman May 15 '20 at 09:43

1 Answers1

0

It looks like you're setting parameters as part of an Intent that has an Event set. This isn't necessary, you can access the Event Parameters in your ressponse directly by using the #parameterName syntax.

In general, however, you can also just use your fulfillment to send back the response directly - you don't need to forward to an Event Intent just to send a response.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • Thank you for your reply and your advice! The first one I'll check myself today. The second one sounds also logic and maybe the best solution to the problem. Though our developer is only back next tuesday so I have to try it later. Will let you know the outcome! – Xaviera Huisman May 15 '20 at 09:45