There are basic steps performed by a Avaya IR application for queries and updates.
Note that the Vonetix functions discussed in the steps below, unless otherwise mentioned, will return a 0 if successful, or a negative number if unsuccessful. See the Vonetix Return Code Table in the applicable Vonetix Technical Training Guide or Data Channel Guide.
Use the Vonetix vntxLoadDoc(SESSIONNAME, FILENAME) function, where the argument FILENAME includes the path to the template from the root directory.
This involves using the Vonetix vntxSetTag (SESSIONNAME, TAGNAME, TAGNUMBER, TAGVALUE) function for each element identified by the arguments TAGNAME and TAGNUMBER. The content of the element is substituted for TAGVALUE.
HTTP request form data is used to log on to Siebel eBusiness, identify the XML document, and tell Siebel eBusiness what to do.
This form data consists of one or more fields that are logically tied together by a session name, and are each created using the Vonetix vntxSetFD(SESSIONNAME, FIELDNAME, FIELDVALUE) function, where the argument FIELDNAME is the field's name, and the argument FIELDVALUE is the field's value.
Each of the following fields needs to be defined:
The workflow name (Business Service Source), found in the Siebel eBusiness config file.
The command to be executed by Siebel eBusiness. The most commonly used command is likely to be Execute.
The login name.
The login password.
The XML document must itself be turned into form data before being sent by Vonetix. The Vonetix VntxSetDocFD ( SESSIONNAME, name ) function does this, where name is "SWEExtData".
The form data sent to Siebel eBusiness consists of the XML document created from the XML template, coupled with the HTTP request form data that was created in Prepare form data for the HTTP request.
Use the Vonetix vntxPostDoc(SESSIONNAME, URL) function, where the argument URL is the URL of the Website with the Siebel eBusiness data.
An error code will be returned by Vonetix if Siebel eBusiness has not responded within 20 seconds of the HTTP request.
Siebel eBusiness will respond to the POST command by sending a document to Avaya IR. The received document can be saved regardless of whether the Avaya IR application is doing a query or an update.
Use the Vonetix vntxStoreDoc(SESSIONNAME, FILENAME) function, where the argument FILENAME refers to the path and name you choose for the file that will be stored.
Extract the content of each element of interest. This will certainly be done during a query, but may also be done after an update.
Use the Vonetix vntxGetTag(SESSIONNAME, TAGNAME, TAGNUMBER, TAGTEXT) function. TAGTEXT is the name of the variable that will store the content.
After performing a query or update, the form data encoded XML document and/or HTTP request form data may need to be cleared. This action will not remove data saved in variables and stored XML documents.