" /> Composer - read customer database from a text file? - Genesys CTI User Forum

Author Topic: Composer - read customer database from a text file?  (Read 4406 times)

Offline Emz

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
Composer - read customer database from a text file?
« on: July 18, 2012, 07:00:25 PM »
Advertisement
Hi,

we own a self-service IVR application that will first ask the user for his pin number and password.

The application must be migrated to the Genesys platform.

The IT department exports a txt file every night containing the users database (pin+password). This file is loaded in the ivr memory every morning.

Would it be possible to read a text file within composer and store the content into gvp memory?

Keeping the text file intact would allow us to migrate the application quicker because we would not need a contribution from the it department.

i think i have a part of the answer...
I know that it is possible to read the text file from a javascript inserted in composer but how do you put the content in the GVP memory?

Thank you in advance

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Composer - read customer database from a text file?
« Reply #1 on: July 19, 2012, 08:53:11 AM »
Hi,

Yes, it should be possible but not in JavaScript as it is interpreted by GVP and it doesn't support persistence. [s]I wouldn't recommend you doing it in JavaScript due to possible performance issues (depends on size of text file) and problematic persistence.[/s]

Optimal solution in my opinion should be based on some web server module (either ASPX page + .NET assembly or JSP page + Java class) that will read text file, parse and provides some lookup possibility when called from GVP. You can use Backend or Web Request block for communication with that server module.

Let me know if you need more help.

R.

Edit: JavaScript is interpreted by GVP VoiceXML interpreter and not webserver thus it isn't possible to use JavaScript.
« Last Edit: July 19, 2012, 12:04:34 PM by René »

Offline Emz

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
Re: Composer - read customer database from a text file?
« Reply #2 on: July 19, 2012, 02:26:14 PM »
Hi Rene,

i like your idea and i understand that it would be wrong to do the file reading within Composer. I will build a seperate Webservice then call it from my Composer Strategy.

I will post an update when possible.

Thank you

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Composer - read customer database from a text file?
« Reply #3 on: July 19, 2012, 03:08:34 PM »
Emz,

Web service is an option but I was thinking about something 'lightweight'. What platform do you use - .NET or Java?

If you do .NET then it support some nice caching features (ASP.NET State Service) allowing you to cache the file in web server's memory (kind of global variable) and access it from ASPX page. It should be quicker that calling web service and probably even easier to develop.

Probably there will be similar functionality available for Java as well.

R.
« Last Edit: July 19, 2012, 03:33:30 PM by René »

Offline Emz

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
Re: Composer - read customer database from a text file?
« Reply #4 on: July 23, 2012, 04:29:18 PM »
Hi,

i created a Java project in Eclipse that host a Web Service. The web service has two functions.

ValidCustomer: Validate the pin/password
ReloadCustomer: Will re-read the input file

When you start the web service, the content of the file is stored in an array.

We can push a newer version of the file in the web service directory anytime and then call the "ReloadCustomer" web service.

I did follow this Web Service tutorial and i created the project within Composer. (I did not install a new version of Eclipse)

[url=http://www.ibm.com/developerworks/webservices/tutorials/ws-eclipse-javase1/section2.html]http://www.ibm.com/developerworks/webservices/tutorials/ws-eclipse-javase1/section2.html[/url]

I have a new problem now. My web service works great when i test it outside of Composer.

I added some logs in my Java webservice and i can see that when i call it from Composer, the webservice receives the parameter in as "null" instead of the "pin number" that i passed.

Any idea?



Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Composer - read customer database from a text file?
« Reply #5 on: July 25, 2012, 08:51:13 PM »
Hi,

Does 'when I call it from Composer' mean that you use debug function of Composer to test it?

Can you post here log of MCP and WSDL of your web service?

R.


Offline Emz

  • Newbie
  • *
  • Posts: 18
  • Karma: 2
Re: Composer - read customer database from a text file?
« Reply #6 on: July 26, 2012, 05:16:09 PM »
Hi Rene,

Yes i was using the debug function of Composer.

I have fixed the problem. I was using Composer version 8.0.003.55 and i upgraded to 8.1.101.88.