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..

Email in AIML
 
 

Hello Everyone,

Can someone please point me on to the correct path. One of the requirements I have on my plate is for the BOT to solicit email of the user, and to send that email address to our Product Support Team.

Basically, when a person comes to our website and chat with the BOT, the BOT will solicit the person’s contact email and then “send and email” this solicited “contact email address” to an email address of our Product Support Team.

How can this be done using AIML on the Pandorabots platform?

Any pointers will be most appreciated.
Dickson Lukose

 

 
  [ # 1 ]

You can do this using the power of URL buttons. Here is an example using the user’s email software but it would probably be better to use a php mailing script, so the user doesn’t see the work being carried out.

You can test it at https://www.pandorabots.com/mitsuku/
Say “testemail” to start the demo.

<category>
<
pattern>TESTEMAIL</pattern>
    <
template>
        
What is your email address?
    </
template>
</
category>
    
<
category>
    <
pattern>_</pattern>
    <
that>WHAT IS YOUR EMAIL ADDRESS</that>
    <
template>
        <
think><set name="emailaddress"><star/></set></think>
        
GreatCan I pass that to our support team?
        <
button>
            <
text>Yes</text>
            <
url>mailto:support@company.com?Subject=New Email Address&amp;Body=new email address: <get name="emailaddress"/></url>
        </
button>
        <
button>
            <
text>No thank you</text>
            <
postback>nothanks</postback>
        </
button>
    </
template>
</
category>
    
<
category>
    <
pattern>NOTHANKS</pattern>
    <
template>
        
Okno problem.
    </
template>
</
category
 

 
  [ # 2 ]

Hello Steve, This is exactly what I was looking for. Many thanks. I learned something new today from the above sample code. I am investigating how to use the php mailing script. If you do have any sample, please share.
Most appreciated.
Dickson Lukose

 

 
  [ # 3 ]

Great. Glad I could help.

Yes, PHP would be better as the email is sent behind the scenes without the user having to see anything. Also, you don’t have to assume that the user has an email client. I’m no expert on PHP but there’s a command called “mail” which you can pass your parameters to.

More details here but I’ll have to let one of the PHP guys here step in if you need further help with this particular part.
https://www.w3schools.com/php/func_mail_mail.asp

 

 
  [ # 4 ]

Thanks for the pointers Steve. I have been looking into it today. Will have it tested. Will need some help from PHP expert.

 

 
  login or register to react