Skip to content Skip to sidebar Skip to footer

Get Original Parameter Input - Dialogflow Fulfillment

I want to get the original input of a parameter in my fulfillment code. I tried: var time = agent.parameters.time.original but the result was undefined. I have tried: var query =

Solution 1:

The actual name of the original value used for the parameter is "time.original". In order to get this, you need to use something like

var time = agent.parameters['time.original'];

What you were trying was to get an attribute of agent.parameters.time named original instead of an attribute of agent.parameters named time.original.

Solution 2:

The solution i found as dated 3rd-Apr-2019 is following

Add custom parameter with actual entity name heaving value $yourparametername.orignal

Add custom parameter with Actual entity name heaving value $yourparametername.orignal

And get its value like that enter image description here

Solution 3:

According to an answer on the old API.ai discourse forums, it looks like original parameters may only be available in a webhook fulfillment request if you set a context on the intent. At that point, the original parameter should be available in the contexts key in the request.

Solution 4:

Please try:

var time = agent.contexts[0].parameters['time.original']

Post a Comment for "Get Original Parameter Input - Dialogflow Fulfillment"