Search code examples
javascriptfirebasedialogflow-esactions-on-googledialogflow-es-fulfillment

Deploying the transactions on google webhook sample on dialogflow inline editor


I'm making a project on dialogflow / actions on google that has multi functionality outside of just transactions of physical products. I'm currently following the tutorial provided by google (I'll post the link below).

I'm just wondering if this is possible to deploy to the inline editor and it will work the same? Only reason I am asking is because in the tutorial they are using the firebase CLI and using a url for a webhook (Which I've seen them use in other tutorials, but I have always just used the inline editor and it's worked fine).I have tried already deploying to the inline editor and I got an error, although that could have just been me doing something wrong.

Just curious if anyone has done a similar project using the inline editor and it's worked?

Thanks for the help!

Github link here

Actions on Google link here


Solution

  • I would try to answer your questions below:

    If this is possible to deploy to the inline editor and it will work the same?

    Yes. It would work the same in the Inline Editor ( because it is powered by Cloud Functions for Firebase ) as long as you handle responses for all the intents required for your transactions.

    But I would like to emphasize on following limitations using the Inline Editor for fulfillment:

    • The inline editor only supports two files: index.js and package.json (modifying package.json will install any dependencies you specify upon deployment). Hence, It becomes difficult to keep the code modularized using the inline editor.

    • You cannot save or download code modified in the inline editor without first deploying. Hence, It becomes difficult to debug your intents before deploying.

    So, I would recommend using the Webhook Fulfillment i.e setting up your local development environment and then using Firebase CLI to deploy your code to Firebase Functions.

    I would recommend completing this codelab and then following the instructions in the Github link and Actions on Google links you mentioned in the question to complete setting up transactions in Actions on Google.

    Good Luck! Hope that helps!