0

I'm trying to test my dialogflow bot passing a payload to the bot using the SET_DIALOGFLOW_QUERYPARAMS, but the parameters are not reaching my webhook.

I'm using the SET_DIALOGFLOW_QUERYPARAMS like this at my convo:

#me
Ola
UPDATE_CUSTOM SET_DIALOGFLOW_QUERYPARAMS|payload|{"key": "value"}

But the request at my webhook is showing a json like this:

{
  "responseId": "###SOME RESPONSE ID",
  "queryResult": {
    "queryText": "Ola",
    "action": "input.welcome",
    "parameters": {
      "cumprimentos": ""
    },
    "allRequiredParamsPresent": true,
    "fulfillmentText": "Estou com alguns probleminhas aqui e n\xc3\xa3o vou conseguir te ajudar por agora, se quiser pode tentar mais tarde.",
    "fulfillmentMessages": [{
      "text": {
        "text": ["Estou com alguns probleminhas aqui e n\xc3\xa3o vou conseguir te ajudar por agora, se quiser pode tentar mais tarde."]
      }
    }],
    "outputContexts": [{
      "name": "###SOME CONTEXT",
      "lifespanCount": 99,
      "parameters": {
        "userEmail": "mailTest@test.com",
        "IsBotiumTest": true,
        "cumprimentos": "",
        "cumprimentos.original": ""
      }
    }, {
      "name": "###SOME CONTEXT",
      "parameters": {
        "no-input": 0.0,
        "no-match": 0.0,
        "cumprimentos": "",
        "cumprimentos.original": ""
      }
    }],
    "intent": {
      "name": "###SOME INTENT ID",
      "displayName": "bemVindo"
    },
    "intentDetectionConfidence": 1.0,
    "languageCode": "pt-br"
  },
  "originalDetectIntentRequest": {
    "payload": {
    }
  },
  "session": "###SOME SESSION ID"
}

The payload field under originalDetectIntentRequest is empty, I think that field would be filled with the key:value pair.

I've tried to debug the output from botium, but I have no idea what is going wrong.

The out from the verbose of botium-cli is:

botium-core-Convo PAYLOAD_CONVO_TEST/Line 3: user says (cleaned by binary and base64 data and sourceData) {
botium-core-Convo   "sender": "me",
botium-core-Convo   "channel": null,
botium-core-Convo   "not": false,
botium-core-Convo   "messageText": "Ola",
botium-core-Convo   "media": null,
botium-core-Convo   "buttons": null,
botium-core-Convo   "cards": null,
botium-core-Convo   "forms": null,
botium-core-Convo   "attachments": null,
botium-core-Convo   "asserters": [],
botium-core-Convo   "userInputs": [],
botium-core-Convo   "logicHooks": [
botium-core-Convo     {
botium-core-Convo       "name": "UPDATE_CUSTOM",
botium-core-Convo       "args": [
botium-core-Convo         "SET_DIALOGFLOW_QUERYPARAMS",
botium-core-Convo         "payload",
botium-core-Convo         "{\"key\": \"value\"}"
botium-core-Convo       ]
botium-core-Convo     }
botium-core-Convo   ],
botium-core-Convo   "SET_DIALOGFLOW_QUERYPARAMS": {
botium-core-Convo     "payload": {
botium-core-Convo       "key": "value"
botium-core-Convo     }
botium-core-Convo   }
botium-core-Convo } +0ms

botium-connector-dialogflow UserSays called +15ms
botium-connector-dialogflow dialogflow request: {
botium-connector-dialogflow   "session": "###SOME SESSION",
botium-connector-dialogflow   "queryInput": {
botium-connector-dialogflow     "text": {
botium-connector-dialogflow       "text": "Ola",
botium-connector-dialogflow       "languageCode": "en-US"
botium-connector-dialogflow     }
botium-connector-dialogflow   },
botium-connector-dialogflow   "queryParams": {
botium-connector-dialogflow     "contexts": [
botium-connector-dialogflow       {
botium-connector-dialogflow         "name": "###SOME CONTEXT NAME",
botium-connector-dialogflow         "lifespanCount": 100,
botium-connector-dialogflow         "parameters": {
botium-connector-dialogflow           "fields": {
botium-connector-dialogflow             "IsBotiumTest": {
botium-connector-dialogflow               "kind": "boolValue",
botium-connector-dialogflow               "boolValue": true
botium-connector-dialogflow             },
botium-connector-dialogflow             "userEmail": {
botium-connector-dialogflow               "kind": "stringValue",
botium-connector-dialogflow               "stringValue": "mailTest@botium.com"
botium-connector-dialogflow             }
botium-connector-dialogflow           }
botium-connector-dialogflow         }
botium-connector-dialogflow       }
botium-connector-dialogflow     ],
botium-connector-dialogflow     "payload": {
botium-connector-dialogflow       "key": "value"
botium-connector-dialogflow     }
botium-connector-dialogflow   }
botium-connector-dialogflow } +0ms
10 Rep
  • 2,217
  • 7
  • 19
  • 33
  • is related to this: https://stackoverflow.com/questions/47583996/send-parameters-to-webhook-on-dialogflow-sdk-v2, requires a fix in the botium connector – Florian Treml Aug 08 '20 at 09:10
  • Fixed in the latest build of the Botium Dialogflow connector. Will be part of the upcoming Botium Core release – Florian Treml Aug 13 '20 at 09:57

0 Answers0