Skip to content

Commit

Permalink
Removed trailing comma from v2 req output context obj
Browse files Browse the repository at this point in the history
Change-Id: I1fd970f58e70a416c69029ece6e8e1c8e95e9fc3
  • Loading branch information
Sarah Dwyer committed Jul 31, 2018
1 parent 4c7fa3d commit 65cd0a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,28 @@
This sample shows Dialogflow's fulfillment webhook JSON requests and responses for v1 and v2 agents, including Actions on Google-specific responses/requests for rich responses (cards, lists, suggestions, etc.) and event (ask for name, location, sign in, etc.) as well as platform-agnostic request/response examples.

## Setup Instructions
1. [Create a Google account](https://accounts.google.com/SignUp?hl=en) and login
1. [Create a Firebase project](https://console.firebase.google.com/)
1. Deploy the `responses` folder with [Firebase hosting](https://firebase.google.com/docs/hosting/):
1. Follow the instructions to [set up and initialize Firebase SDK for Cloud Functions](https://firebase.google.com/docs/functions/get-started#set_up_and_initialize_functions_sdk). Make sure to select the project that you have previously generated in the Actions on Google Console and to reply `N` when asked to overwrite existing files by the Firebase CLI.
1. Run `firebase deploy --only hosting` and take note of the endpoint where the `responses` folder has been published. It should look like `Hosting URL: https://${PROJECTID}.firebaseapp.com`
1. Select the correct JSON file for your Dialogflow fulfillment and take a note of the URL of the file (e.g. `https://${PROJECTID}.firebaseapp.com/v2/ActionsOnGoogle/RichResponses/SimpleResponse.json`)
1. Go to the Dialogflow console and select *Fulfillment* from the left navigation menu.
1. Enable *Webhook*, set the value of *URL* to the URL of the JSON file from the previous step, then click *Save*.
1. Select *Intents* from the left navigation menu and for every intent that you'd like to enable fulfillment for:
1. Select the intent
1. Click the switch next to `Enable webhook call for this intent` in the fulfillment section
1. [Sign-up/Login](https://accounts.google.com/SignUp?hl=en) to Google account
2. [Create a Firebase project](https://console.firebase.google.com/)
3. Deploy the `responses` directory with [Firebase hosting](https://firebase.google.com/docs/hosting/):
+ Follow the instructions to [set up and initialize Firebase SDK for Cloud Functions](https://firebase.google.com/docs/functions/get-started#set_up_and_initialize_functions_sdk). Make sure to select the project that you have previously generated in the Actions on Google Console and to reply `N` when asked to overwrite existing files by the Firebase CLI.
+ Run `firebase deploy --only hosting` and take note of the endpoint where the `responses` folder has been published. It should look like `Hosting URL: https://${PROJECTID}.firebaseapp.com`
4. Select the correct JSON file for your Dialogflow fulfillment and take a note of the URL of the file (e.g. `https://${PROJECTID}.firebaseapp.com/v2/ActionsOnGoogle/RichResponses/SimpleResponse.json`)
5. Go to the Dialogflow console and select **Fulfillment** from the left navigation menu.
6. **Enable Webhook** > **URL** to the URL of the JSON file from the previous step, then select **Save**.
7. Go to **Intents** from the left navigation menu and for every intent that you'd like to enable fulfillment for:
+ Select the intent
+ In **Fulfillment** > **Enable Webhook** call for this intent.

## References and How to report bugs
* If you find any issues, please open a bug here on GitHub
How to make contributions?
## Issues & References
* For bugs, please add an issue on [Github](https://github.com/dialogflow/fulfillment-webhook-json/issues).
* Questions? Try [StackOverflow](https://stackoverflow.com/questions/tagged/dialogflow).
* For Dialogflow [documentation](https://docs.dialogflow.com).

## How to Make Contributions?
Please read and follow the steps in the CONTRIBUTING.md
License

## License
See LICENSE.md

## Terms
Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the [Google APIs Terms of Service](https://developers.google.com/terms/) and the [API.AI's Terms of Use and Privacy Policy](https://api.ai/terms/).
Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the [Google APIs Terms of Service](https://developers.google.com/terms/) and [Dialogflow's Terms of Use and Privacy Policy](https://api.ai/terms/).
4 changes: 2 additions & 2 deletions requests/v2/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"name": "projects/your-agents-project-id/agent/sessions/88d13aa8-2999-4f71-b233-39cbf3a824a0/contexts/generic",
"lifespanCount": 5,
"parameters": {
"param": "param value",
"param": "param value"
}
}
],
Expand All @@ -35,4 +35,4 @@
"languageCode": "en"
},
"originalDetectIntentRequest": {}
}
}

0 comments on commit 65cd0a7

Please sign in to comment.