Trying to update intent parameter using custom events in Dialogflow V2 API and its not passing through to the intent The Next CEO of Stack Overflowset parameters in EventInput in Dialogflow V2 APIUnable to get bot to initiate a dialog with the user at a particular point in the conversation, using 'Event' or 'FollowupEvent'. What's the solution?dialogflow simple fulfillment webhook in c# not workingDialogFlow : 'facebook_welcome' event not triggeredDialogflow : display “processing” message on intents triggered by followup eventsDialogFlow vs Lex for streaming intent detectionDialogflow webhook set parameter valueInvoke custom event not being invokedDialogflow, detection intent from audioDialogflow - Strange behavior using pt-BR language by defaultHow to update session entity in Dialogflow?

What is meant by "large scale tonal organization?"

Why is information "lost" when it got into a black hole?

Is it convenient to ask the journal's editor for two additional days to complete a review?

How to get from Geneva Airport to Metabief, Doubs, France by public transport?

Why don't programming languages automatically manage the synchronous/asynchronous problem?

Domestic-to-international connection at Orlando (MCO)

Why do remote US companies require working in the US?

Is it okay to majorly distort historical facts while writing a fiction story?

How many extra stops do monopods offer for tele photographs?

Is it possible to replace duplicates of a character with one character using tr

Reference request: Grassmannian and Plucker coordinates in type B, C, D

RigExpert AA-35 - Interpreting The Information

WOW air has ceased operation, can I get my tickets refunded?

Why didn't Khan get resurrected in the Genesis Explosion?

Poetry, calligrams and TikZ/PStricks challenge

Why do airplanes bank sharply to the right after air-to-air refueling?

Calculator final project in Python

Is it professional to write unrelated content in an almost-empty email?

Can you be charged for obstruction for refusing to answer questions?

Is there a way to save my career from absolute disaster?

A small doubt about the dominated convergence theorem

How to check if all elements of 1 list are in the *same quantity* and in any order, in the list2?

How to prove a simple equation?

What flight has the highest ratio of timezone difference to flight time?



Trying to update intent parameter using custom events in Dialogflow V2 API and its not passing through to the intent



The Next CEO of Stack Overflowset parameters in EventInput in Dialogflow V2 APIUnable to get bot to initiate a dialog with the user at a particular point in the conversation, using 'Event' or 'FollowupEvent'. What's the solution?dialogflow simple fulfillment webhook in c# not workingDialogFlow : 'facebook_welcome' event not triggeredDialogflow : display “processing” message on intents triggered by followup eventsDialogFlow vs Lex for streaming intent detectionDialogflow webhook set parameter valueInvoke custom event not being invokedDialogflow, detection intent from audioDialogflow - Strange behavior using pt-BR language by defaultHow to update session entity in Dialogflow?










2















In our Dialogflow agent, We have an intent set up with an event called "updateParams" associated with the intent. The intent has a parameter called "ExampleEntity" that I would like to update using c# by invoking the event using the Detect Intent API. We are using this version of the sdk Google.Cloud.Dialogflow.V2" Version="1.0.0-beta02"



 queryInput.Event = new EventInput

Name = "updateParams",

Parameters = new Struct

Fields = "ExampleEntity",Value.ForString("Bla")
,
LanguageCode = languageCode
;


An example of the response can be seen here. As you can see the "ExampleEntity" parameter isn't being updated as per the request:
enter image description here



Any tips on where we're going wrong? We're fairly new to Dialogflow so it is probably something simple.










share|improve this question






















  • How are you returning the response to Dialogflow in your agent? If you're using the default Json.NET conversion from the WebhookResponse to JSON, that would explain it. (You need to use the Protobuf JSON conversion.)

    – Jon Skeet
    Mar 7 at 20:20












  • In this project we are implementing a .net core project using df as the natural language processor. Phrases come through to an endpoint that project, and we use the df detectIntent API to work out the intent, we then use the Fulfillment text(s) to decide what response should be sent to the user. In some circumstances, we might want to programatically fill some empty parameters on the intent if we can get those without prompting the user, so we do a second call to detectIntent to pass the custom event with the parameters filled, using the above call which is where we are having the issue.

    – mjroodt
    Mar 7 at 23:56











  • So to be clear, you're not using a web hook at all, just calling DetectIntent entirely separately? (Most of the problems using Dialogflow from C# are in terms of JSON encoding/decoding for web hooks.)

    – Jon Skeet
    Mar 8 at 6:45







  • 1





    That's right. Our dialogflow agent does not use the webhook functionality at all. Instead we use it to manage all of our intents, entities, small talk etc, and we use it to guide the flow of the conversation, but all controlled via a separate .net core project which is based on bot-framework/. Responses back to the user are done using that component, not dialogflow. This is working well when allowing dialogflow to prompt for filling empty required parameters, we just have this issue trying to 'pre-populate' parameters on the detected intent, without user interaction. Hope that makes sense.

    – mjroodt
    Mar 8 at 8:00












  • Hmm... I'll have to have a look at that later. (I'm on vacation today, and about to go out.) The C# code looks okay to me...

    – Jon Skeet
    Mar 8 at 9:00















2















In our Dialogflow agent, We have an intent set up with an event called "updateParams" associated with the intent. The intent has a parameter called "ExampleEntity" that I would like to update using c# by invoking the event using the Detect Intent API. We are using this version of the sdk Google.Cloud.Dialogflow.V2" Version="1.0.0-beta02"



 queryInput.Event = new EventInput

Name = "updateParams",

Parameters = new Struct

Fields = "ExampleEntity",Value.ForString("Bla")
,
LanguageCode = languageCode
;


An example of the response can be seen here. As you can see the "ExampleEntity" parameter isn't being updated as per the request:
enter image description here



Any tips on where we're going wrong? We're fairly new to Dialogflow so it is probably something simple.










share|improve this question






















  • How are you returning the response to Dialogflow in your agent? If you're using the default Json.NET conversion from the WebhookResponse to JSON, that would explain it. (You need to use the Protobuf JSON conversion.)

    – Jon Skeet
    Mar 7 at 20:20












  • In this project we are implementing a .net core project using df as the natural language processor. Phrases come through to an endpoint that project, and we use the df detectIntent API to work out the intent, we then use the Fulfillment text(s) to decide what response should be sent to the user. In some circumstances, we might want to programatically fill some empty parameters on the intent if we can get those without prompting the user, so we do a second call to detectIntent to pass the custom event with the parameters filled, using the above call which is where we are having the issue.

    – mjroodt
    Mar 7 at 23:56











  • So to be clear, you're not using a web hook at all, just calling DetectIntent entirely separately? (Most of the problems using Dialogflow from C# are in terms of JSON encoding/decoding for web hooks.)

    – Jon Skeet
    Mar 8 at 6:45







  • 1





    That's right. Our dialogflow agent does not use the webhook functionality at all. Instead we use it to manage all of our intents, entities, small talk etc, and we use it to guide the flow of the conversation, but all controlled via a separate .net core project which is based on bot-framework/. Responses back to the user are done using that component, not dialogflow. This is working well when allowing dialogflow to prompt for filling empty required parameters, we just have this issue trying to 'pre-populate' parameters on the detected intent, without user interaction. Hope that makes sense.

    – mjroodt
    Mar 8 at 8:00












  • Hmm... I'll have to have a look at that later. (I'm on vacation today, and about to go out.) The C# code looks okay to me...

    – Jon Skeet
    Mar 8 at 9:00













2












2








2








In our Dialogflow agent, We have an intent set up with an event called "updateParams" associated with the intent. The intent has a parameter called "ExampleEntity" that I would like to update using c# by invoking the event using the Detect Intent API. We are using this version of the sdk Google.Cloud.Dialogflow.V2" Version="1.0.0-beta02"



 queryInput.Event = new EventInput

Name = "updateParams",

Parameters = new Struct

Fields = "ExampleEntity",Value.ForString("Bla")
,
LanguageCode = languageCode
;


An example of the response can be seen here. As you can see the "ExampleEntity" parameter isn't being updated as per the request:
enter image description here



Any tips on where we're going wrong? We're fairly new to Dialogflow so it is probably something simple.










share|improve this question














In our Dialogflow agent, We have an intent set up with an event called "updateParams" associated with the intent. The intent has a parameter called "ExampleEntity" that I would like to update using c# by invoking the event using the Detect Intent API. We are using this version of the sdk Google.Cloud.Dialogflow.V2" Version="1.0.0-beta02"



 queryInput.Event = new EventInput

Name = "updateParams",

Parameters = new Struct

Fields = "ExampleEntity",Value.ForString("Bla")
,
LanguageCode = languageCode
;


An example of the response can be seen here. As you can see the "ExampleEntity" parameter isn't being updated as per the request:
enter image description here



Any tips on where we're going wrong? We're fairly new to Dialogflow so it is probably something simple.







c# .net-core google-cloud-platform dialogflow chatbot






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 17:01









mjroodtmjroodt

1,34341433




1,34341433












  • How are you returning the response to Dialogflow in your agent? If you're using the default Json.NET conversion from the WebhookResponse to JSON, that would explain it. (You need to use the Protobuf JSON conversion.)

    – Jon Skeet
    Mar 7 at 20:20












  • In this project we are implementing a .net core project using df as the natural language processor. Phrases come through to an endpoint that project, and we use the df detectIntent API to work out the intent, we then use the Fulfillment text(s) to decide what response should be sent to the user. In some circumstances, we might want to programatically fill some empty parameters on the intent if we can get those without prompting the user, so we do a second call to detectIntent to pass the custom event with the parameters filled, using the above call which is where we are having the issue.

    – mjroodt
    Mar 7 at 23:56











  • So to be clear, you're not using a web hook at all, just calling DetectIntent entirely separately? (Most of the problems using Dialogflow from C# are in terms of JSON encoding/decoding for web hooks.)

    – Jon Skeet
    Mar 8 at 6:45







  • 1





    That's right. Our dialogflow agent does not use the webhook functionality at all. Instead we use it to manage all of our intents, entities, small talk etc, and we use it to guide the flow of the conversation, but all controlled via a separate .net core project which is based on bot-framework/. Responses back to the user are done using that component, not dialogflow. This is working well when allowing dialogflow to prompt for filling empty required parameters, we just have this issue trying to 'pre-populate' parameters on the detected intent, without user interaction. Hope that makes sense.

    – mjroodt
    Mar 8 at 8:00












  • Hmm... I'll have to have a look at that later. (I'm on vacation today, and about to go out.) The C# code looks okay to me...

    – Jon Skeet
    Mar 8 at 9:00

















  • How are you returning the response to Dialogflow in your agent? If you're using the default Json.NET conversion from the WebhookResponse to JSON, that would explain it. (You need to use the Protobuf JSON conversion.)

    – Jon Skeet
    Mar 7 at 20:20












  • In this project we are implementing a .net core project using df as the natural language processor. Phrases come through to an endpoint that project, and we use the df detectIntent API to work out the intent, we then use the Fulfillment text(s) to decide what response should be sent to the user. In some circumstances, we might want to programatically fill some empty parameters on the intent if we can get those without prompting the user, so we do a second call to detectIntent to pass the custom event with the parameters filled, using the above call which is where we are having the issue.

    – mjroodt
    Mar 7 at 23:56











  • So to be clear, you're not using a web hook at all, just calling DetectIntent entirely separately? (Most of the problems using Dialogflow from C# are in terms of JSON encoding/decoding for web hooks.)

    – Jon Skeet
    Mar 8 at 6:45







  • 1





    That's right. Our dialogflow agent does not use the webhook functionality at all. Instead we use it to manage all of our intents, entities, small talk etc, and we use it to guide the flow of the conversation, but all controlled via a separate .net core project which is based on bot-framework/. Responses back to the user are done using that component, not dialogflow. This is working well when allowing dialogflow to prompt for filling empty required parameters, we just have this issue trying to 'pre-populate' parameters on the detected intent, without user interaction. Hope that makes sense.

    – mjroodt
    Mar 8 at 8:00












  • Hmm... I'll have to have a look at that later. (I'm on vacation today, and about to go out.) The C# code looks okay to me...

    – Jon Skeet
    Mar 8 at 9:00
















How are you returning the response to Dialogflow in your agent? If you're using the default Json.NET conversion from the WebhookResponse to JSON, that would explain it. (You need to use the Protobuf JSON conversion.)

– Jon Skeet
Mar 7 at 20:20






How are you returning the response to Dialogflow in your agent? If you're using the default Json.NET conversion from the WebhookResponse to JSON, that would explain it. (You need to use the Protobuf JSON conversion.)

– Jon Skeet
Mar 7 at 20:20














In this project we are implementing a .net core project using df as the natural language processor. Phrases come through to an endpoint that project, and we use the df detectIntent API to work out the intent, we then use the Fulfillment text(s) to decide what response should be sent to the user. In some circumstances, we might want to programatically fill some empty parameters on the intent if we can get those without prompting the user, so we do a second call to detectIntent to pass the custom event with the parameters filled, using the above call which is where we are having the issue.

– mjroodt
Mar 7 at 23:56





In this project we are implementing a .net core project using df as the natural language processor. Phrases come through to an endpoint that project, and we use the df detectIntent API to work out the intent, we then use the Fulfillment text(s) to decide what response should be sent to the user. In some circumstances, we might want to programatically fill some empty parameters on the intent if we can get those without prompting the user, so we do a second call to detectIntent to pass the custom event with the parameters filled, using the above call which is where we are having the issue.

– mjroodt
Mar 7 at 23:56













So to be clear, you're not using a web hook at all, just calling DetectIntent entirely separately? (Most of the problems using Dialogflow from C# are in terms of JSON encoding/decoding for web hooks.)

– Jon Skeet
Mar 8 at 6:45






So to be clear, you're not using a web hook at all, just calling DetectIntent entirely separately? (Most of the problems using Dialogflow from C# are in terms of JSON encoding/decoding for web hooks.)

– Jon Skeet
Mar 8 at 6:45





1




1





That's right. Our dialogflow agent does not use the webhook functionality at all. Instead we use it to manage all of our intents, entities, small talk etc, and we use it to guide the flow of the conversation, but all controlled via a separate .net core project which is based on bot-framework/. Responses back to the user are done using that component, not dialogflow. This is working well when allowing dialogflow to prompt for filling empty required parameters, we just have this issue trying to 'pre-populate' parameters on the detected intent, without user interaction. Hope that makes sense.

– mjroodt
Mar 8 at 8:00






That's right. Our dialogflow agent does not use the webhook functionality at all. Instead we use it to manage all of our intents, entities, small talk etc, and we use it to guide the flow of the conversation, but all controlled via a separate .net core project which is based on bot-framework/. Responses back to the user are done using that component, not dialogflow. This is working well when allowing dialogflow to prompt for filling empty required parameters, we just have this issue trying to 'pre-populate' parameters on the detected intent, without user interaction. Hope that makes sense.

– mjroodt
Mar 8 at 8:00














Hmm... I'll have to have a look at that later. (I'm on vacation today, and about to go out.) The C# code looks okay to me...

– Jon Skeet
Mar 8 at 9:00





Hmm... I'll have to have a look at that later. (I'm on vacation today, and about to go out.) The C# code looks okay to me...

– Jon Skeet
Mar 8 at 9:00












1 Answer
1






active

oldest

votes


















3














Your code looks okay.

However, in your intent, you need to provide default value of the entity ExampleEntity.



Give it as : #event_name.entity_name

Your event is updateParams and entity name is ExampleEntity, so in this case default value will be #updateParams.ExampleEntity



This way, when your intent is invoked through the event with the values passed, ExampleEntity will know from where to pick up the default value.



You can check out this answer for details as well.



Hope it helps.






share|improve this answer

























  • Yes this worked for us! In our example we had to use #updateParams.ExampleEntity in our default value.

    – mjroodt
    Mar 8 at 11:26











  • @mjroodt glad it worked :)

    – sid8491
    Mar 8 at 12:11











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55049207%2ftrying-to-update-intent-parameter-using-custom-events-in-dialogflow-v2-api-and-i%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














Your code looks okay.

However, in your intent, you need to provide default value of the entity ExampleEntity.



Give it as : #event_name.entity_name

Your event is updateParams and entity name is ExampleEntity, so in this case default value will be #updateParams.ExampleEntity



This way, when your intent is invoked through the event with the values passed, ExampleEntity will know from where to pick up the default value.



You can check out this answer for details as well.



Hope it helps.






share|improve this answer

























  • Yes this worked for us! In our example we had to use #updateParams.ExampleEntity in our default value.

    – mjroodt
    Mar 8 at 11:26











  • @mjroodt glad it worked :)

    – sid8491
    Mar 8 at 12:11















3














Your code looks okay.

However, in your intent, you need to provide default value of the entity ExampleEntity.



Give it as : #event_name.entity_name

Your event is updateParams and entity name is ExampleEntity, so in this case default value will be #updateParams.ExampleEntity



This way, when your intent is invoked through the event with the values passed, ExampleEntity will know from where to pick up the default value.



You can check out this answer for details as well.



Hope it helps.






share|improve this answer

























  • Yes this worked for us! In our example we had to use #updateParams.ExampleEntity in our default value.

    – mjroodt
    Mar 8 at 11:26











  • @mjroodt glad it worked :)

    – sid8491
    Mar 8 at 12:11













3












3








3







Your code looks okay.

However, in your intent, you need to provide default value of the entity ExampleEntity.



Give it as : #event_name.entity_name

Your event is updateParams and entity name is ExampleEntity, so in this case default value will be #updateParams.ExampleEntity



This way, when your intent is invoked through the event with the values passed, ExampleEntity will know from where to pick up the default value.



You can check out this answer for details as well.



Hope it helps.






share|improve this answer















Your code looks okay.

However, in your intent, you need to provide default value of the entity ExampleEntity.



Give it as : #event_name.entity_name

Your event is updateParams and entity name is ExampleEntity, so in this case default value will be #updateParams.ExampleEntity



This way, when your intent is invoked through the event with the values passed, ExampleEntity will know from where to pick up the default value.



You can check out this answer for details as well.



Hope it helps.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 8 at 12:11

























answered Mar 8 at 9:27









sid8491sid8491

3,55631334




3,55631334












  • Yes this worked for us! In our example we had to use #updateParams.ExampleEntity in our default value.

    – mjroodt
    Mar 8 at 11:26











  • @mjroodt glad it worked :)

    – sid8491
    Mar 8 at 12:11

















  • Yes this worked for us! In our example we had to use #updateParams.ExampleEntity in our default value.

    – mjroodt
    Mar 8 at 11:26











  • @mjroodt glad it worked :)

    – sid8491
    Mar 8 at 12:11
















Yes this worked for us! In our example we had to use #updateParams.ExampleEntity in our default value.

– mjroodt
Mar 8 at 11:26





Yes this worked for us! In our example we had to use #updateParams.ExampleEntity in our default value.

– mjroodt
Mar 8 at 11:26













@mjroodt glad it worked :)

– sid8491
Mar 8 at 12:11





@mjroodt glad it worked :)

– sid8491
Mar 8 at 12:11



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55049207%2ftrying-to-update-intent-parameter-using-custom-events-in-dialogflow-v2-api-and-i%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко