I have a custom application that users use to set their opening, closing/emergency time. This is done via a web gui and then produces a VXML document. I then have a call studio app that reads the VXML document to determine if the site is open, close emergency etc. (NB: I didnt write of the above applications)
What I am now trying to achieve is to be able to update the VXML document via ICM script. Ie when users call in using a phone line, set the site emergency to on, I want to ICM to pass this to CVP and the CVP goes to the VXML document to write the value of the resultant parameter.
My sample VXML document looks like this. I am not proficient in using call studio, so please direct me on how to have a studio app created to update whatever variable is passed from ICM on the VXML document
<variable id="4fb03238-d05a-4146-80cf-b8a4f2292f41" array="0" index="1" type="TIME" key="AVD_Customer_Time"/>
<variable id="984ef50e-9ee5-4b8e-bef4-595d41e2a1e5" array="0" index="2" type="DATE" key="AVDHoliday"/>
<variable id="d07f1961-8236-42e3-a3fc-cb0666c8f797" array="0" index="3" type="DATE" key="AVDPartial_Holiday"/>
<variable id="367d35e2-0657-4cdb-8bbf-70c568dd5a7c" array="0" index="4" type="TIME" key="AVDPartial_Holiday_Time"/>
<variable id="c7a3d321-d930-4739-b29d-ac2d57a8474d" array="0" index="5" type="BOOLEAN" key="AVD_Customer_Emergency"/>
<variable key="AVD_Customer_Emergency" value="false"/>
Eg If I change the value of this emergency variable key to True, I want that to update the resultant VXML document so that next time CVP reads the document it knows the site is in Emergency.
Call studio doesn't have any standard tools to work with XML files. You have to create a custom java class to do it.
Probably the best way is to have some training like CVP java developer.
Another way to go might be to make minor modifications to the existing application, so that if the person calls in via the ICM script, you pass that variable to the existing application and have that override whatever is set via the web GUI.
Again, not sure if that is possible, how often that existing application is called, but to potentially call it and pass in a parameter may get you what you need in the interim.
Or until you get the training you need, simply create a new variable, set it via the ICM script, and change your logic to look for both values (i.e. the value set in the web gui and the one set via the phone call). Not ideal, but at least it gets you something for now while you plan.
If all you're dealing with is emergency on or off, why not create a CVP app which replaces the whole document with on or off? Then when the UI reads the file it will always be up to date.
I think using http might be a challenge. After debugging the https request all I can see is the GET request. It looks like the actual variables are set within the js html tags and then a post request is called within it. The page uses an onclick button event to send or save whatever value is set on the page, I dont actually see any POST request been sent. This might be because once the data is saved, its writing directly to a XML document