DialogFlow , Google Assistant responses and Detect Intent API












1















I want to use a DialogFlow (DF) agent such that it integrates with a website. I therefore intend to use the detect intent API.



Within the DF agent I notice that if I just use the DF default responses they are just text based responses. Alternatively, if I want to use the media rich responses then I use the Google Assistant responses and the JSON the agent outputs is fundamentally different, (since when you use things like suggestion chips they have different JSON).



My question is whether it is a good idea to use the Google Assistant responses even though I'm not intending to use Google assistant. I know that I can also use the fulfilment option to provide media rich responses but I prefer to use the GUI based Google Assistant responses. Are there any downsides to using the Google Assistant (GA) responses in this way?



To give you an example, I have created intents that use the GA suggestion chips and the output of the agent gives responses like this in the JSON:



  {
"platform": "ACTIONS_ON_GOOGLE",
"suggestions": {
"suggestions": [
{
"title": "Suggestion Chip 1!"
},
{
"title": "Suggestion 2!"
}
]
}
},


My intention is to use the Detect Intent API and then put logic in my GUI to interpret things like suggestion chips and then display accordingly.










share|improve this question





























    1















    I want to use a DialogFlow (DF) agent such that it integrates with a website. I therefore intend to use the detect intent API.



    Within the DF agent I notice that if I just use the DF default responses they are just text based responses. Alternatively, if I want to use the media rich responses then I use the Google Assistant responses and the JSON the agent outputs is fundamentally different, (since when you use things like suggestion chips they have different JSON).



    My question is whether it is a good idea to use the Google Assistant responses even though I'm not intending to use Google assistant. I know that I can also use the fulfilment option to provide media rich responses but I prefer to use the GUI based Google Assistant responses. Are there any downsides to using the Google Assistant (GA) responses in this way?



    To give you an example, I have created intents that use the GA suggestion chips and the output of the agent gives responses like this in the JSON:



      {
    "platform": "ACTIONS_ON_GOOGLE",
    "suggestions": {
    "suggestions": [
    {
    "title": "Suggestion Chip 1!"
    },
    {
    "title": "Suggestion 2!"
    }
    ]
    }
    },


    My intention is to use the Detect Intent API and then put logic in my GUI to interpret things like suggestion chips and then display accordingly.










    share|improve this question



























      1












      1








      1








      I want to use a DialogFlow (DF) agent such that it integrates with a website. I therefore intend to use the detect intent API.



      Within the DF agent I notice that if I just use the DF default responses they are just text based responses. Alternatively, if I want to use the media rich responses then I use the Google Assistant responses and the JSON the agent outputs is fundamentally different, (since when you use things like suggestion chips they have different JSON).



      My question is whether it is a good idea to use the Google Assistant responses even though I'm not intending to use Google assistant. I know that I can also use the fulfilment option to provide media rich responses but I prefer to use the GUI based Google Assistant responses. Are there any downsides to using the Google Assistant (GA) responses in this way?



      To give you an example, I have created intents that use the GA suggestion chips and the output of the agent gives responses like this in the JSON:



        {
      "platform": "ACTIONS_ON_GOOGLE",
      "suggestions": {
      "suggestions": [
      {
      "title": "Suggestion Chip 1!"
      },
      {
      "title": "Suggestion 2!"
      }
      ]
      }
      },


      My intention is to use the Detect Intent API and then put logic in my GUI to interpret things like suggestion chips and then display accordingly.










      share|improve this question
















      I want to use a DialogFlow (DF) agent such that it integrates with a website. I therefore intend to use the detect intent API.



      Within the DF agent I notice that if I just use the DF default responses they are just text based responses. Alternatively, if I want to use the media rich responses then I use the Google Assistant responses and the JSON the agent outputs is fundamentally different, (since when you use things like suggestion chips they have different JSON).



      My question is whether it is a good idea to use the Google Assistant responses even though I'm not intending to use Google assistant. I know that I can also use the fulfilment option to provide media rich responses but I prefer to use the GUI based Google Assistant responses. Are there any downsides to using the Google Assistant (GA) responses in this way?



      To give you an example, I have created intents that use the GA suggestion chips and the output of the agent gives responses like this in the JSON:



        {
      "platform": "ACTIONS_ON_GOOGLE",
      "suggestions": {
      "suggestions": [
      {
      "title": "Suggestion Chip 1!"
      },
      {
      "title": "Suggestion 2!"
      }
      ]
      }
      },


      My intention is to use the Detect Intent API and then put logic in my GUI to interpret things like suggestion chips and then display accordingly.







      dialogflow actions-on-google






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 24 '18 at 11:52









      Prisoner

      33.8k23158




      33.8k23158










      asked Nov 22 '18 at 17:00









      RisteardRisteard

      567




      567
























          1 Answer
          1






          active

          oldest

          votes


















          1














          The biggest reason not to use the Actions on Google responses is that you're not an Assistant client.




          • Google can change the format of the response (they have in the past) and you will need to change yours.

          • You may have different GUI requirements than the Assistant does, and trying to force yourself into their model may constrain how you act.


          Instead, Dialogflow lets you embed platform-specific content in your reply, so you can include whatever information you want in whatever format in the reply.



          Update to clarify the response.



          In the JSON response that your webhook would send, you can include a payload field, which is a JSON object containing whatever you want. For Actions on Google, it puts data into a google field under the payload that contains AoG specific information. You can create your own field and put whatever you want in whatever format you want there.



          So your JSON might look something like this:



          {
          "fulfillmentText": "Normal message here."
          "payload": {
          "myDisplayFormat": {
          "suggestions": [
          "Suggestion 1",
          "Suggestion 2"
          ]
          }
          }
          }


          The advantage to this, as opposed to using AoG's response, is that you can include whatever additional information your agent needs. For example, you can include text color or font information here if you want to be able to show things differently. If you want additional buttons that go to different URLs or trigger different things on your page, you can include them here. Most importantly - this is entirely in your control, you're not subject to whatever Google decides to do.



          Everything in the payload section is passed unchanged to your API call in the queryResult.webhookPayload field.






          share|improve this answer


























          • Ok thanks, but if my goal is to use DF with a web client and to use rich responses like suggestion chips then clearly the default text responses aren't sufficient. Are you suggesting that the inline fulfillment webhook is the best option or is there a better way to achieve my goal?

            – Risteard
            Nov 24 '18 at 21:09











          • Answer updated, to hopefully clarify what I mean.

            – Prisoner
            Nov 26 '18 at 0:34











          • Thanks that makes sense. However my previous comment was about how to do it. i.e. should you provide your custom response via the inline editor or via the external webhook that essentially calls a single external API service. The issue I see with the former is that it doesn't scale well while with the latter you can only call a single API endpoint; therefore that endpoint needs to become an intent handler and call other API endpoints.

            – Risteard
            Nov 26 '18 at 13:57











          • That's a different question, and you may want to ask it as a new StackOverflow question with details about your concerns. However, the "inline editor" is implemented under the covers as a webhook that runs on Firebase Cloud Functions. Both have the same scalability and design considerations.

            – Prisoner
            Nov 26 '18 at 13:59











          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%2f53435506%2fdialogflow-google-assistant-responses-and-detect-intent-api%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









          1














          The biggest reason not to use the Actions on Google responses is that you're not an Assistant client.




          • Google can change the format of the response (they have in the past) and you will need to change yours.

          • You may have different GUI requirements than the Assistant does, and trying to force yourself into their model may constrain how you act.


          Instead, Dialogflow lets you embed platform-specific content in your reply, so you can include whatever information you want in whatever format in the reply.



          Update to clarify the response.



          In the JSON response that your webhook would send, you can include a payload field, which is a JSON object containing whatever you want. For Actions on Google, it puts data into a google field under the payload that contains AoG specific information. You can create your own field and put whatever you want in whatever format you want there.



          So your JSON might look something like this:



          {
          "fulfillmentText": "Normal message here."
          "payload": {
          "myDisplayFormat": {
          "suggestions": [
          "Suggestion 1",
          "Suggestion 2"
          ]
          }
          }
          }


          The advantage to this, as opposed to using AoG's response, is that you can include whatever additional information your agent needs. For example, you can include text color or font information here if you want to be able to show things differently. If you want additional buttons that go to different URLs or trigger different things on your page, you can include them here. Most importantly - this is entirely in your control, you're not subject to whatever Google decides to do.



          Everything in the payload section is passed unchanged to your API call in the queryResult.webhookPayload field.






          share|improve this answer


























          • Ok thanks, but if my goal is to use DF with a web client and to use rich responses like suggestion chips then clearly the default text responses aren't sufficient. Are you suggesting that the inline fulfillment webhook is the best option or is there a better way to achieve my goal?

            – Risteard
            Nov 24 '18 at 21:09











          • Answer updated, to hopefully clarify what I mean.

            – Prisoner
            Nov 26 '18 at 0:34











          • Thanks that makes sense. However my previous comment was about how to do it. i.e. should you provide your custom response via the inline editor or via the external webhook that essentially calls a single external API service. The issue I see with the former is that it doesn't scale well while with the latter you can only call a single API endpoint; therefore that endpoint needs to become an intent handler and call other API endpoints.

            – Risteard
            Nov 26 '18 at 13:57











          • That's a different question, and you may want to ask it as a new StackOverflow question with details about your concerns. However, the "inline editor" is implemented under the covers as a webhook that runs on Firebase Cloud Functions. Both have the same scalability and design considerations.

            – Prisoner
            Nov 26 '18 at 13:59
















          1














          The biggest reason not to use the Actions on Google responses is that you're not an Assistant client.




          • Google can change the format of the response (they have in the past) and you will need to change yours.

          • You may have different GUI requirements than the Assistant does, and trying to force yourself into their model may constrain how you act.


          Instead, Dialogflow lets you embed platform-specific content in your reply, so you can include whatever information you want in whatever format in the reply.



          Update to clarify the response.



          In the JSON response that your webhook would send, you can include a payload field, which is a JSON object containing whatever you want. For Actions on Google, it puts data into a google field under the payload that contains AoG specific information. You can create your own field and put whatever you want in whatever format you want there.



          So your JSON might look something like this:



          {
          "fulfillmentText": "Normal message here."
          "payload": {
          "myDisplayFormat": {
          "suggestions": [
          "Suggestion 1",
          "Suggestion 2"
          ]
          }
          }
          }


          The advantage to this, as opposed to using AoG's response, is that you can include whatever additional information your agent needs. For example, you can include text color or font information here if you want to be able to show things differently. If you want additional buttons that go to different URLs or trigger different things on your page, you can include them here. Most importantly - this is entirely in your control, you're not subject to whatever Google decides to do.



          Everything in the payload section is passed unchanged to your API call in the queryResult.webhookPayload field.






          share|improve this answer


























          • Ok thanks, but if my goal is to use DF with a web client and to use rich responses like suggestion chips then clearly the default text responses aren't sufficient. Are you suggesting that the inline fulfillment webhook is the best option or is there a better way to achieve my goal?

            – Risteard
            Nov 24 '18 at 21:09











          • Answer updated, to hopefully clarify what I mean.

            – Prisoner
            Nov 26 '18 at 0:34











          • Thanks that makes sense. However my previous comment was about how to do it. i.e. should you provide your custom response via the inline editor or via the external webhook that essentially calls a single external API service. The issue I see with the former is that it doesn't scale well while with the latter you can only call a single API endpoint; therefore that endpoint needs to become an intent handler and call other API endpoints.

            – Risteard
            Nov 26 '18 at 13:57











          • That's a different question, and you may want to ask it as a new StackOverflow question with details about your concerns. However, the "inline editor" is implemented under the covers as a webhook that runs on Firebase Cloud Functions. Both have the same scalability and design considerations.

            – Prisoner
            Nov 26 '18 at 13:59














          1












          1








          1







          The biggest reason not to use the Actions on Google responses is that you're not an Assistant client.




          • Google can change the format of the response (they have in the past) and you will need to change yours.

          • You may have different GUI requirements than the Assistant does, and trying to force yourself into their model may constrain how you act.


          Instead, Dialogflow lets you embed platform-specific content in your reply, so you can include whatever information you want in whatever format in the reply.



          Update to clarify the response.



          In the JSON response that your webhook would send, you can include a payload field, which is a JSON object containing whatever you want. For Actions on Google, it puts data into a google field under the payload that contains AoG specific information. You can create your own field and put whatever you want in whatever format you want there.



          So your JSON might look something like this:



          {
          "fulfillmentText": "Normal message here."
          "payload": {
          "myDisplayFormat": {
          "suggestions": [
          "Suggestion 1",
          "Suggestion 2"
          ]
          }
          }
          }


          The advantage to this, as opposed to using AoG's response, is that you can include whatever additional information your agent needs. For example, you can include text color or font information here if you want to be able to show things differently. If you want additional buttons that go to different URLs or trigger different things on your page, you can include them here. Most importantly - this is entirely in your control, you're not subject to whatever Google decides to do.



          Everything in the payload section is passed unchanged to your API call in the queryResult.webhookPayload field.






          share|improve this answer















          The biggest reason not to use the Actions on Google responses is that you're not an Assistant client.




          • Google can change the format of the response (they have in the past) and you will need to change yours.

          • You may have different GUI requirements than the Assistant does, and trying to force yourself into their model may constrain how you act.


          Instead, Dialogflow lets you embed platform-specific content in your reply, so you can include whatever information you want in whatever format in the reply.



          Update to clarify the response.



          In the JSON response that your webhook would send, you can include a payload field, which is a JSON object containing whatever you want. For Actions on Google, it puts data into a google field under the payload that contains AoG specific information. You can create your own field and put whatever you want in whatever format you want there.



          So your JSON might look something like this:



          {
          "fulfillmentText": "Normal message here."
          "payload": {
          "myDisplayFormat": {
          "suggestions": [
          "Suggestion 1",
          "Suggestion 2"
          ]
          }
          }
          }


          The advantage to this, as opposed to using AoG's response, is that you can include whatever additional information your agent needs. For example, you can include text color or font information here if you want to be able to show things differently. If you want additional buttons that go to different URLs or trigger different things on your page, you can include them here. Most importantly - this is entirely in your control, you're not subject to whatever Google decides to do.



          Everything in the payload section is passed unchanged to your API call in the queryResult.webhookPayload field.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 26 '18 at 0:34

























          answered Nov 24 '18 at 11:52









          PrisonerPrisoner

          33.8k23158




          33.8k23158













          • Ok thanks, but if my goal is to use DF with a web client and to use rich responses like suggestion chips then clearly the default text responses aren't sufficient. Are you suggesting that the inline fulfillment webhook is the best option or is there a better way to achieve my goal?

            – Risteard
            Nov 24 '18 at 21:09











          • Answer updated, to hopefully clarify what I mean.

            – Prisoner
            Nov 26 '18 at 0:34











          • Thanks that makes sense. However my previous comment was about how to do it. i.e. should you provide your custom response via the inline editor or via the external webhook that essentially calls a single external API service. The issue I see with the former is that it doesn't scale well while with the latter you can only call a single API endpoint; therefore that endpoint needs to become an intent handler and call other API endpoints.

            – Risteard
            Nov 26 '18 at 13:57











          • That's a different question, and you may want to ask it as a new StackOverflow question with details about your concerns. However, the "inline editor" is implemented under the covers as a webhook that runs on Firebase Cloud Functions. Both have the same scalability and design considerations.

            – Prisoner
            Nov 26 '18 at 13:59



















          • Ok thanks, but if my goal is to use DF with a web client and to use rich responses like suggestion chips then clearly the default text responses aren't sufficient. Are you suggesting that the inline fulfillment webhook is the best option or is there a better way to achieve my goal?

            – Risteard
            Nov 24 '18 at 21:09











          • Answer updated, to hopefully clarify what I mean.

            – Prisoner
            Nov 26 '18 at 0:34











          • Thanks that makes sense. However my previous comment was about how to do it. i.e. should you provide your custom response via the inline editor or via the external webhook that essentially calls a single external API service. The issue I see with the former is that it doesn't scale well while with the latter you can only call a single API endpoint; therefore that endpoint needs to become an intent handler and call other API endpoints.

            – Risteard
            Nov 26 '18 at 13:57











          • That's a different question, and you may want to ask it as a new StackOverflow question with details about your concerns. However, the "inline editor" is implemented under the covers as a webhook that runs on Firebase Cloud Functions. Both have the same scalability and design considerations.

            – Prisoner
            Nov 26 '18 at 13:59

















          Ok thanks, but if my goal is to use DF with a web client and to use rich responses like suggestion chips then clearly the default text responses aren't sufficient. Are you suggesting that the inline fulfillment webhook is the best option or is there a better way to achieve my goal?

          – Risteard
          Nov 24 '18 at 21:09





          Ok thanks, but if my goal is to use DF with a web client and to use rich responses like suggestion chips then clearly the default text responses aren't sufficient. Are you suggesting that the inline fulfillment webhook is the best option or is there a better way to achieve my goal?

          – Risteard
          Nov 24 '18 at 21:09













          Answer updated, to hopefully clarify what I mean.

          – Prisoner
          Nov 26 '18 at 0:34





          Answer updated, to hopefully clarify what I mean.

          – Prisoner
          Nov 26 '18 at 0:34













          Thanks that makes sense. However my previous comment was about how to do it. i.e. should you provide your custom response via the inline editor or via the external webhook that essentially calls a single external API service. The issue I see with the former is that it doesn't scale well while with the latter you can only call a single API endpoint; therefore that endpoint needs to become an intent handler and call other API endpoints.

          – Risteard
          Nov 26 '18 at 13:57





          Thanks that makes sense. However my previous comment was about how to do it. i.e. should you provide your custom response via the inline editor or via the external webhook that essentially calls a single external API service. The issue I see with the former is that it doesn't scale well while with the latter you can only call a single API endpoint; therefore that endpoint needs to become an intent handler and call other API endpoints.

          – Risteard
          Nov 26 '18 at 13:57













          That's a different question, and you may want to ask it as a new StackOverflow question with details about your concerns. However, the "inline editor" is implemented under the covers as a webhook that runs on Firebase Cloud Functions. Both have the same scalability and design considerations.

          – Prisoner
          Nov 26 '18 at 13:59





          That's a different question, and you may want to ask it as a new StackOverflow question with details about your concerns. However, the "inline editor" is implemented under the covers as a webhook that runs on Firebase Cloud Functions. Both have the same scalability and design considerations.

          – Prisoner
          Nov 26 '18 at 13:59


















          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%2f53435506%2fdialogflow-google-assistant-responses-and-detect-intent-api%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

          Wiesbaden

          Marschland

          Dieringhausen