How to handle user names in Dialogflow?Send back rich responses to Actions on Google through Dialogflow webhook fulfillmentHow to tie an account from a backend server to a google assistant userWhat is the relationship between 'intents' and 'actions' in Dialogflow?Infinite loop between a function and if condition (Javascript, Dialogflow)Open Mic issue for DialogFlow appHow to trigger an email sendingfailing to get dialogflow-helper-intents-nodejsHow to uniquely identify a user on Dialogflow fullfilment?Ping Dialogflow Actions on Google Cloud FunctionAssistance with recipes for Dialogflow?
Construct a word ladder
What is a fully qualified name?
Specific alignment within beginalign environment
Why didn't Thanos use the Time Stone to stop the Avengers' plan?
Do photons bend spacetime or not?
Popcorn is the only acceptable snack to consume while watching a movie
In general, would I need to season a meat when making a sauce?
Why would Ryanair allow me to book this journey through a third party, but not through their own website?
Why aren't space telescopes put in GEO?
Is the field of q-series 'dead'?
Is there a simple example that empirical evidence is misleading?
Should one buy new hardware after a system compromise?
Is it legal to have an abortion in another state or abroad?
How to respond to upset student?
Apt - strange requests to d16r8ew072anqo.cloudfront.net:80
The art of clickbait captions
When the Torah was almost lost and one (or several) Rabbis saved it?
How to deal with a colleague who is being aggressive?
Could a 19.25mm revolver actually exist?
How to patch glass cuts in a bicycle tire?
Is it legal to meet with potential future employers in the UK, whilst visiting from the USA
Using credit/debit card details vs swiping a card in a payment (credit card) terminal
Can a person survive on blood in place of water?
What was the idiom for something that we take without a doubt?
How to handle user names in Dialogflow?
Send back rich responses to Actions on Google through Dialogflow webhook fulfillmentHow to tie an account from a backend server to a google assistant userWhat is the relationship between 'intents' and 'actions' in Dialogflow?Infinite loop between a function and if condition (Javascript, Dialogflow)Open Mic issue for DialogFlow appHow to trigger an email sendingfailing to get dialogflow-helper-intents-nodejsHow to uniquely identify a user on Dialogflow fullfilment?Ping Dialogflow Actions on Google Cloud FunctionAssistance with recipes for Dialogflow?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
First of all, I'm new to Dialogflow as well as new to coding in general. I'm trying to build a bot that handles subscription pauses.
I have set up some intents and entities for the following steps:
- Greet the user and explain what the bot can do
- Request a pause for a service subscription (from a pool of ~10
services) - Ask for start time and end time of the pause (two different values)
- Sum up the request and repeat the key values
I'm (almost) happy with it but I want to implement a prompt for a username. I don't know if any of the built-in variables can help me here.
That's what I'd like the conversation to look like:
(User): Hi, I would like to pause my subscription for [SUB_NAME] from
[START_DATE] to [END_DATE]
(Assistant): What is your user name for the subscription?
(User): [user_name_123 or UserName123 or USER_NAME] (alphanumeric, not following a certain pattern)
(Assistant): Done. You requested a pause for [SUB_NAME] from [START_DATE] to [END_DATE] for [user_name_123]. Please check your e-mails and confirm your request.
What (I think) I need is a very simple custom variable. In Python I would go for something like this:
user_name = input("What's your user name?")
I'd like to store this as a variable that I can reference with '$'.
Is there any way to do this with Dialogflow?
Also, is it possible to pick up the user name as shown above, i.e. without ML-compatible surrounding sentence structures?
I wouldn't want the conversation to be forcedly repetitive like so:
(Assistant): What's your user name?
(User): My user name is [user_name_123]
dialogflow actions-on-google
add a comment |
First of all, I'm new to Dialogflow as well as new to coding in general. I'm trying to build a bot that handles subscription pauses.
I have set up some intents and entities for the following steps:
- Greet the user and explain what the bot can do
- Request a pause for a service subscription (from a pool of ~10
services) - Ask for start time and end time of the pause (two different values)
- Sum up the request and repeat the key values
I'm (almost) happy with it but I want to implement a prompt for a username. I don't know if any of the built-in variables can help me here.
That's what I'd like the conversation to look like:
(User): Hi, I would like to pause my subscription for [SUB_NAME] from
[START_DATE] to [END_DATE]
(Assistant): What is your user name for the subscription?
(User): [user_name_123 or UserName123 or USER_NAME] (alphanumeric, not following a certain pattern)
(Assistant): Done. You requested a pause for [SUB_NAME] from [START_DATE] to [END_DATE] for [user_name_123]. Please check your e-mails and confirm your request.
What (I think) I need is a very simple custom variable. In Python I would go for something like this:
user_name = input("What's your user name?")
I'd like to store this as a variable that I can reference with '$'.
Is there any way to do this with Dialogflow?
Also, is it possible to pick up the user name as shown above, i.e. without ML-compatible surrounding sentence structures?
I wouldn't want the conversation to be forcedly repetitive like so:
(Assistant): What's your user name?
(User): My user name is [user_name_123]
dialogflow actions-on-google
add a comment |
First of all, I'm new to Dialogflow as well as new to coding in general. I'm trying to build a bot that handles subscription pauses.
I have set up some intents and entities for the following steps:
- Greet the user and explain what the bot can do
- Request a pause for a service subscription (from a pool of ~10
services) - Ask for start time and end time of the pause (two different values)
- Sum up the request and repeat the key values
I'm (almost) happy with it but I want to implement a prompt for a username. I don't know if any of the built-in variables can help me here.
That's what I'd like the conversation to look like:
(User): Hi, I would like to pause my subscription for [SUB_NAME] from
[START_DATE] to [END_DATE]
(Assistant): What is your user name for the subscription?
(User): [user_name_123 or UserName123 or USER_NAME] (alphanumeric, not following a certain pattern)
(Assistant): Done. You requested a pause for [SUB_NAME] from [START_DATE] to [END_DATE] for [user_name_123]. Please check your e-mails and confirm your request.
What (I think) I need is a very simple custom variable. In Python I would go for something like this:
user_name = input("What's your user name?")
I'd like to store this as a variable that I can reference with '$'.
Is there any way to do this with Dialogflow?
Also, is it possible to pick up the user name as shown above, i.e. without ML-compatible surrounding sentence structures?
I wouldn't want the conversation to be forcedly repetitive like so:
(Assistant): What's your user name?
(User): My user name is [user_name_123]
dialogflow actions-on-google
First of all, I'm new to Dialogflow as well as new to coding in general. I'm trying to build a bot that handles subscription pauses.
I have set up some intents and entities for the following steps:
- Greet the user and explain what the bot can do
- Request a pause for a service subscription (from a pool of ~10
services) - Ask for start time and end time of the pause (two different values)
- Sum up the request and repeat the key values
I'm (almost) happy with it but I want to implement a prompt for a username. I don't know if any of the built-in variables can help me here.
That's what I'd like the conversation to look like:
(User): Hi, I would like to pause my subscription for [SUB_NAME] from
[START_DATE] to [END_DATE]
(Assistant): What is your user name for the subscription?
(User): [user_name_123 or UserName123 or USER_NAME] (alphanumeric, not following a certain pattern)
(Assistant): Done. You requested a pause for [SUB_NAME] from [START_DATE] to [END_DATE] for [user_name_123]. Please check your e-mails and confirm your request.
What (I think) I need is a very simple custom variable. In Python I would go for something like this:
user_name = input("What's your user name?")
I'd like to store this as a variable that I can reference with '$'.
Is there any way to do this with Dialogflow?
Also, is it possible to pick up the user name as shown above, i.e. without ML-compatible surrounding sentence structures?
I wouldn't want the conversation to be forcedly repetitive like so:
(Assistant): What's your user name?
(User): My user name is [user_name_123]
dialogflow actions-on-google
dialogflow actions-on-google
edited Mar 24 at 12:13
Sairaj Sawant
857414
857414
asked Mar 24 at 2:25
acxcvacxcv
85
85
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
If you are using Actions on Google, you can use userStorage to save the username of the user and then later access it to perform tasks ( in your case pausing Subscriptions )
Assuming your intent returns a username, Setting a username in storage is as simple as :
app.intent('ask_username', (conv, params) =>
conv.user.storage.username = params.username; // use $ as conv.user.storage.$ if you want
conv.ask(`Ok, What would I help you with ?.`);
);
Then you can simply access the username as:
conv.user.storage.username
Hope that helps!
Thanks for your answer, it definitely helps. I think this is exactly what I'm looking for. Unfortunately, I have no idea how to implement it. As I understand it, I can access external functions through Webhook or Inline Editor, neither of which I have used yet. Are there any beginner-friendly tutorials on how to implement this code? Or do you know where this is documented in a way that is easy to understand?
– acxcv
Mar 24 at 17:02
Glad it helped. Kindly upvote & mark the answer as accepted ! You can have a look at the codelab to get started.
– Sairaj Sawant
Mar 25 at 2:04
add a comment |
You can tag specific words in Dialogflow's training phrases with the type @sys.any, which will be able to grab a part of the input. Then you can grab it as a parameter.
Sys.any is really useful in these types of abstract input types, but will require more training phrases as matching only the username becomes harder.
Instead of using usernames, which don't seem to be authenticated to your service, you may want to look at Google sign-in or OAuth instead. The recommendation above will work, but isn't the best way to do usernames.
Thanks for your answer! I'll experiment with sys.any and see if it can do the job for me. At this point I'm not actually trying to link this to an API that communicates with a server and authenticates users. For now, I only want the chatbot structure to work, that is extract and repeat the user name, a dummy if you like. Thanks also for suggesting Google sign-in and OAuth. I'll definitely have a look into this kind of thing at some later point.
– acxcv
Mar 24 at 17:25
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320213%2fhow-to-handle-user-names-in-dialogflow%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you are using Actions on Google, you can use userStorage to save the username of the user and then later access it to perform tasks ( in your case pausing Subscriptions )
Assuming your intent returns a username, Setting a username in storage is as simple as :
app.intent('ask_username', (conv, params) =>
conv.user.storage.username = params.username; // use $ as conv.user.storage.$ if you want
conv.ask(`Ok, What would I help you with ?.`);
);
Then you can simply access the username as:
conv.user.storage.username
Hope that helps!
Thanks for your answer, it definitely helps. I think this is exactly what I'm looking for. Unfortunately, I have no idea how to implement it. As I understand it, I can access external functions through Webhook or Inline Editor, neither of which I have used yet. Are there any beginner-friendly tutorials on how to implement this code? Or do you know where this is documented in a way that is easy to understand?
– acxcv
Mar 24 at 17:02
Glad it helped. Kindly upvote & mark the answer as accepted ! You can have a look at the codelab to get started.
– Sairaj Sawant
Mar 25 at 2:04
add a comment |
If you are using Actions on Google, you can use userStorage to save the username of the user and then later access it to perform tasks ( in your case pausing Subscriptions )
Assuming your intent returns a username, Setting a username in storage is as simple as :
app.intent('ask_username', (conv, params) =>
conv.user.storage.username = params.username; // use $ as conv.user.storage.$ if you want
conv.ask(`Ok, What would I help you with ?.`);
);
Then you can simply access the username as:
conv.user.storage.username
Hope that helps!
Thanks for your answer, it definitely helps. I think this is exactly what I'm looking for. Unfortunately, I have no idea how to implement it. As I understand it, I can access external functions through Webhook or Inline Editor, neither of which I have used yet. Are there any beginner-friendly tutorials on how to implement this code? Or do you know where this is documented in a way that is easy to understand?
– acxcv
Mar 24 at 17:02
Glad it helped. Kindly upvote & mark the answer as accepted ! You can have a look at the codelab to get started.
– Sairaj Sawant
Mar 25 at 2:04
add a comment |
If you are using Actions on Google, you can use userStorage to save the username of the user and then later access it to perform tasks ( in your case pausing Subscriptions )
Assuming your intent returns a username, Setting a username in storage is as simple as :
app.intent('ask_username', (conv, params) =>
conv.user.storage.username = params.username; // use $ as conv.user.storage.$ if you want
conv.ask(`Ok, What would I help you with ?.`);
);
Then you can simply access the username as:
conv.user.storage.username
Hope that helps!
If you are using Actions on Google, you can use userStorage to save the username of the user and then later access it to perform tasks ( in your case pausing Subscriptions )
Assuming your intent returns a username, Setting a username in storage is as simple as :
app.intent('ask_username', (conv, params) =>
conv.user.storage.username = params.username; // use $ as conv.user.storage.$ if you want
conv.ask(`Ok, What would I help you with ?.`);
);
Then you can simply access the username as:
conv.user.storage.username
Hope that helps!
edited Mar 24 at 2:51
answered Mar 24 at 2:44
Sairaj SawantSairaj Sawant
857414
857414
Thanks for your answer, it definitely helps. I think this is exactly what I'm looking for. Unfortunately, I have no idea how to implement it. As I understand it, I can access external functions through Webhook or Inline Editor, neither of which I have used yet. Are there any beginner-friendly tutorials on how to implement this code? Or do you know where this is documented in a way that is easy to understand?
– acxcv
Mar 24 at 17:02
Glad it helped. Kindly upvote & mark the answer as accepted ! You can have a look at the codelab to get started.
– Sairaj Sawant
Mar 25 at 2:04
add a comment |
Thanks for your answer, it definitely helps. I think this is exactly what I'm looking for. Unfortunately, I have no idea how to implement it. As I understand it, I can access external functions through Webhook or Inline Editor, neither of which I have used yet. Are there any beginner-friendly tutorials on how to implement this code? Or do you know where this is documented in a way that is easy to understand?
– acxcv
Mar 24 at 17:02
Glad it helped. Kindly upvote & mark the answer as accepted ! You can have a look at the codelab to get started.
– Sairaj Sawant
Mar 25 at 2:04
Thanks for your answer, it definitely helps. I think this is exactly what I'm looking for. Unfortunately, I have no idea how to implement it. As I understand it, I can access external functions through Webhook or Inline Editor, neither of which I have used yet. Are there any beginner-friendly tutorials on how to implement this code? Or do you know where this is documented in a way that is easy to understand?
– acxcv
Mar 24 at 17:02
Thanks for your answer, it definitely helps. I think this is exactly what I'm looking for. Unfortunately, I have no idea how to implement it. As I understand it, I can access external functions through Webhook or Inline Editor, neither of which I have used yet. Are there any beginner-friendly tutorials on how to implement this code? Or do you know where this is documented in a way that is easy to understand?
– acxcv
Mar 24 at 17:02
Glad it helped. Kindly upvote & mark the answer as accepted ! You can have a look at the codelab to get started.
– Sairaj Sawant
Mar 25 at 2:04
Glad it helped. Kindly upvote & mark the answer as accepted ! You can have a look at the codelab to get started.
– Sairaj Sawant
Mar 25 at 2:04
add a comment |
You can tag specific words in Dialogflow's training phrases with the type @sys.any, which will be able to grab a part of the input. Then you can grab it as a parameter.
Sys.any is really useful in these types of abstract input types, but will require more training phrases as matching only the username becomes harder.
Instead of using usernames, which don't seem to be authenticated to your service, you may want to look at Google sign-in or OAuth instead. The recommendation above will work, but isn't the best way to do usernames.
Thanks for your answer! I'll experiment with sys.any and see if it can do the job for me. At this point I'm not actually trying to link this to an API that communicates with a server and authenticates users. For now, I only want the chatbot structure to work, that is extract and repeat the user name, a dummy if you like. Thanks also for suggesting Google sign-in and OAuth. I'll definitely have a look into this kind of thing at some later point.
– acxcv
Mar 24 at 17:25
add a comment |
You can tag specific words in Dialogflow's training phrases with the type @sys.any, which will be able to grab a part of the input. Then you can grab it as a parameter.
Sys.any is really useful in these types of abstract input types, but will require more training phrases as matching only the username becomes harder.
Instead of using usernames, which don't seem to be authenticated to your service, you may want to look at Google sign-in or OAuth instead. The recommendation above will work, but isn't the best way to do usernames.
Thanks for your answer! I'll experiment with sys.any and see if it can do the job for me. At this point I'm not actually trying to link this to an API that communicates with a server and authenticates users. For now, I only want the chatbot structure to work, that is extract and repeat the user name, a dummy if you like. Thanks also for suggesting Google sign-in and OAuth. I'll definitely have a look into this kind of thing at some later point.
– acxcv
Mar 24 at 17:25
add a comment |
You can tag specific words in Dialogflow's training phrases with the type @sys.any, which will be able to grab a part of the input. Then you can grab it as a parameter.
Sys.any is really useful in these types of abstract input types, but will require more training phrases as matching only the username becomes harder.
Instead of using usernames, which don't seem to be authenticated to your service, you may want to look at Google sign-in or OAuth instead. The recommendation above will work, but isn't the best way to do usernames.
You can tag specific words in Dialogflow's training phrases with the type @sys.any, which will be able to grab a part of the input. Then you can grab it as a parameter.
Sys.any is really useful in these types of abstract input types, but will require more training phrases as matching only the username becomes harder.
Instead of using usernames, which don't seem to be authenticated to your service, you may want to look at Google sign-in or OAuth instead. The recommendation above will work, but isn't the best way to do usernames.
answered Mar 24 at 16:21
Nick FelkerNick Felker
6,76811022
6,76811022
Thanks for your answer! I'll experiment with sys.any and see if it can do the job for me. At this point I'm not actually trying to link this to an API that communicates with a server and authenticates users. For now, I only want the chatbot structure to work, that is extract and repeat the user name, a dummy if you like. Thanks also for suggesting Google sign-in and OAuth. I'll definitely have a look into this kind of thing at some later point.
– acxcv
Mar 24 at 17:25
add a comment |
Thanks for your answer! I'll experiment with sys.any and see if it can do the job for me. At this point I'm not actually trying to link this to an API that communicates with a server and authenticates users. For now, I only want the chatbot structure to work, that is extract and repeat the user name, a dummy if you like. Thanks also for suggesting Google sign-in and OAuth. I'll definitely have a look into this kind of thing at some later point.
– acxcv
Mar 24 at 17:25
Thanks for your answer! I'll experiment with sys.any and see if it can do the job for me. At this point I'm not actually trying to link this to an API that communicates with a server and authenticates users. For now, I only want the chatbot structure to work, that is extract and repeat the user name, a dummy if you like. Thanks also for suggesting Google sign-in and OAuth. I'll definitely have a look into this kind of thing at some later point.
– acxcv
Mar 24 at 17:25
Thanks for your answer! I'll experiment with sys.any and see if it can do the job for me. At this point I'm not actually trying to link this to an API that communicates with a server and authenticates users. For now, I only want the chatbot structure to work, that is extract and repeat the user name, a dummy if you like. Thanks also for suggesting Google sign-in and OAuth. I'll definitely have a look into this kind of thing at some later point.
– acxcv
Mar 24 at 17:25
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320213%2fhow-to-handle-user-names-in-dialogflow%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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