5 Steps to a G-Talk In­ter­face For Your Web Ap­pli­ca­tion!

If your web ap­pli­ca­tion is hosted on Google App En­gine, here is how you can in­clude a part of G-talk func­tion­al­ity in your ap­pli­ca­tion. Also, learn how that can be use­ful to you...

PCQuest - - PORTADA -

What can a chat in­ter­face do for my web ap­pli­ca­tions? Well, in­ter­ac­tiv­ity and all that fol­lows. If you pro­vide a chat ad­dress for your web ap­pli­ca­tion and you have some­one avail­able to chat live with vis­i­tors to your web­site dur­ing work­ing hours (e.g. for live web-based tech­ni­cal sup­port), you can set up chat bots in your ap­pli­ca­tion, which, upon re­ceiv­ing a cus­tomer’s IM on be­half of your ap­pli­ca­tion, can send in­stant au­to­mated replies such as “We are closed for the day”,”We are cur­rently ex­pe­ri­enc­ing un­planned down­time”,etc.

This is sim­i­lar to how you would in­ter­act with an IVRS us­ing the tele­phone. When you set up a well-de­fined chain of such au­to­mated re­sponses in your web ap­pli­ca­tion, not only will your ac­tual sup­port calls re­duce but also users will be freed from the frus­tra­tion to look up FAQs and other such doc­u­men­ta­tion. Ow­ing to quick con­textsen­si­tive replies, their user ex­pe­ri­ence will be bet­ter and they will not need to wait for you (or your web­site’s chat per­son) to re­turn to of­fice the next work­ing day. They won’t go away giv­ing up their pa­tience. Prob­a­bly the best part is, they are in­ter­act­ing with your ap­pli­ca­tion us­ing a pro­gram (an in­stant mes­sen­ger in this case) that they are so com­fort­able us­ing.

If reg­is­tered users/mem­bers of your web­site have pro­vided you their chat ad­dress, you, us­ing your own ap­pli­ca­tion, can de­tect whether they are on­line, with­out re­quir­ing them to visit your web­site, thanks to the chat no­ti­fi­ca­tion features. With the user’s con­sent, you can con­tact them when they are on­line to con­duct in­stant polls and other such tasks (such as ob­tain­ing fol­low-up in­for­ma­tion re­quired to progress in a tech­ni­cal sup­port

1. Call the XMPP(Ex­ten­si­ble Mes­sag­ing and Pres­ence Pro­to­col) ser­vice API 2. Iden­tify the re­ceiver by defin­ing a JID for the same

3. Con­struct the mes­sage

— Hiren Me­hta case or to ask quick ques­tions about the prod­ucts that they are in­ter­ested in or for feed­back, etc). Po­ten­tial op­por­tu­ni­ties are many more.

The fol­low­ing in­struc­tions ap­ply to Java de­vel­op­ers. How­ever, the func­tion­al­ity can be achieved with Python or Go too, both of which are sup­ported (with Go in an ex­per­i­men­tal state) on Google App En­gine. In or­der to make use of the XMPP ser­vice API, you will need to im­port the re­quired classes from the com.google. ap­pengine.api.xmpp package. A JID rep­re­sents an XMPP ad­dress for the re­cip­i­ent. You de­fine a JID by in­vok­ing the JID con­struc­tor as:

JID my­cus­tomer = new JID(“abc@ex­am­ple.com”); Send­ing struc­tured data in the form of XML is sup­ported. How­ever, you can also send plain­text Java strings as the body of the mes­sage. Any of the mes­sage types de­fined in RFC 3921 can be sent.

You con­struct the mes­sage in a sim­i­lar man­ner to how you would send a quick email, i.e. click on the `Cre­ate new mes­sage’/`Com­pose’ but­ton/menu item, spec­ify a `To:’ ad­dress and paste pre-de­fined text or type some­thing in the body. The fol­low­ing lines of code re­spec­tively do the same, ex­cept for the last one which ac­tu­ally builds the mes­sage for in­ter­nal rep­re­sen­ta­tion pur­poses.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.