AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Match input to stored variables
 
 

Assuming I have previously stored a user’s name via

<set name="name"><star/><set/> 

How would i go about to match this with an input. This is what I tried and doesn’t work:

<category>
<
pattern>DO YOU KNOW <get name="name"/></pattern>
<
template>Of course I know you!</template>
</
category

This works with <bot name=“name”> to match the bot’s name. Is there a way to get this working?

 

 
  [ # 1 ]

You would need to use the learn tag to set up these categories on the fly.
For example, in your category where you set the person’s name, you could also set up things like:

DO YOU KNOW <get name="name"/>
WHO IS <get name="name"/>
AM I CALLED <get name="name"/> 

or even one for just:

<get name="name"/> 
 

 
  [ # 2 ]

Thanks a lot for the reply, Steve. I was about to suggest a solution that worked for me after doing some further tests:

<category>
<
pattern>DO YOU KNOW *</pattern>
<
template>
<
condition name="name">
<
li><value><star/></value>Of course I know you!</li>
<
li>Nodo not.</li>
</
condition>
</
template>
</
category
 

 
  login or register to react