Skip to content

Commit 7afa36f

Browse files
aribraygcf-owl-bot[bot]
authored and
Ace Nassri
committed
docs(samples): hardcode parameter in webhook sample (#268)
* streamline and clarify webhook samples Change-Id: I80d80b42f60ac6ccc643afb7b2931916d6843813 * remove sessionInfo config Change-Id: I1b14852ad9e238e7cdc04dbb418ed5ed0fca2992 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * hardcode parameter Change-Id: Iea962f2ea2bf73ca86ce3ecd7852a290dd3a2fac * clarify parameter name Change-Id: I5c0a1c654be5133889f4838a118e5bdebe667303 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent fe6cb09 commit 7afa36f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dialogflow-cx/configure-webhook-to-set-form-parameter-as-optional-or-required.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@
2121
exports.configureOptionalFormParam = (request, response) => {
2222
// The value of the parameter that the webhook will set as optional or required.
2323
// Note that the webhook cannot add or remove any form parameter
24-
const parameter = request.body.pageInfo.formInfo.parameterInfo[0].value;
2524

2625
const jsonResponse = {
2726
pageInfo: {
2827
formInfo: {
2928
parameterInfo: [
3029
{
31-
displayName: parameter,
30+
displayName: 'order-number',
3231
// if required: false, the agent will not reprompt for this parameter, even if the state is 'INVALID'
3332
required: true,
3433
state: 'VALID',

0 commit comments

Comments
 (0)