5 Steps to a G-Talk Interface For Your Web Application!
If your web application is hosted on Google App Engine, here is how you can include a part of G-talk functionality in your application. Also, learn how that can be useful to you...
What can a chat interface do for my web applications? Well, interactivity and all that follows. If you provide a chat address for your web application and you have someone available to chat live with visitors to your website during working hours (e.g. for live web-based technical support), you can set up chat bots in your application, which, upon receiving a customer’s IM on behalf of your application, can send instant automated replies such as “We are closed for the day”,”We are currently experiencing unplanned downtime”,etc.
This is similar to how you would interact with an IVRS using the telephone. When you set up a well-defined chain of such automated responses in your web application, not only will your actual support calls reduce but also users will be freed from the frustration to look up FAQs and other such documentation. Owing to quick contextsensitive replies, their user experience will be better and they will not need to wait for you (or your website’s chat person) to return to office the next working day. They won’t go away giving up their patience. Probably the best part is, they are interacting with your application using a program (an instant messenger in this case) that they are so comfortable using.
If registered users/members of your website have provided you their chat address, you, using your own application, can detect whether they are online, without requiring them to visit your website, thanks to the chat notification features. With the user’s consent, you can contact them when they are online to conduct instant polls and other such tasks (such as obtaining follow-up information required to progress in a technical support
1. Call the XMPP(Extensible Messaging and Presence Protocol) service API 2. Identify the receiver by defining a JID for the same
3. Construct the message
— Hiren Mehta case or to ask quick questions about the products that they are interested in or for feedback, etc). Potential opportunities are many more.
The following instructions apply to Java developers. However, the functionality can be achieved with Python or Go too, both of which are supported (with Go in an experimental state) on Google App Engine. In order to make use of the XMPP service API, you will need to import the required classes from the com.google. appengine.api.xmpp package. A JID represents an XMPP address for the recipient. You define a JID by invoking the JID constructor as:
JID mycustomer = new JID(“firstname.lastname@example.org”); Sending structured data in the form of XML is supported. However, you can also send plaintext Java strings as the body of the message. Any of the message types defined in RFC 3921 can be sent.
You construct the message in a similar manner to how you would send a quick email, i.e. click on the `Create new message’/`Compose’ button/menu item, specify a `To:’ address and paste pre-defined text or type something in the body. The following lines of code respectively do the same, except for the last one which actually builds the message for internal representation purposes.