Showing posts with label web services. Show all posts
Showing posts with label web services. Show all posts

<continuous>

Determines whether a long polling session ends after it receives data or continues until it is stopped with <long_poll>STOP</long_poll>.

Child of: <long_poll connect=""/>
Parent of: Nothing

Example:

<continuous>NO</continuous>

<delimiter>

The delimiter for data that is returned from a web service (see <web_service>) or a long polling session (see <long_poll connect="">).

Child of: <long_poll connect="">, <web_service>
Parent of: Nothing

Example:

<delimiter>,</delimiter>

<error_node>

The node to advance to if there is a connection error or timeout in <get_info commid=""> or a long polling or voice recognition session (see <long_poll connect=""> and <voice_rec>), or if a file defined within <preload> tags is not found.

Flash has a built-in connection timeout of approximately five seconds, so the application will proceed to the error node if this timeout is reached. This timeout cannot be overridden.

If no error node is specified and the connection times out, the user will receive a generic "connection failed" message from Flash.

Child of: <get_info commid="">, <long_poll connect="">, <preload>, <voice_rec>
Parent of: Nothing

Example:

<error_node>voice_rec_error</error_node>

<event>

Allows an event defined externally in a Flash project (see Embedding Your Application) to be executed and defines the node to proceed to upon completion of the event.

Because the application will execute the external function defined within the <type> tag and will not return until the external resume() API is called, no tags that automatically advance the experience (e.g., <next_node>, <media_custom_event node=""/>, etc.) should be used in the same node as an <event> tag.

Only one <event> tag should be defined within a single node.

Child of: <node name="">
Parent of: <type>, <resume_node>
See also: <metric>

Example:

<event>
            <type>EVENT</type>
            <resume_node>RESUME_NODE</resume_node>
</event>

<get_info commid="" responses="">

Generates and returns application and session IDs for use in logging or polling (e.g., in a voice recognition session).

This tag can also request the value of any number of cookies using the <cookie> tag. Each requested cookie value is returned in a variable of the same name as the cookie itself.

If <next_node> is present, advances to the specified node upon completion.

If commid is set to YES, a communication ID will be generated and returned for use in a subsequent long polling session. The default value of commid is NO.

If responses is set to YES, the communication ID will send the canned messages CONNECTED and OK in an SMS or IM interaction. The default value of responses is YES.

This tag makes the following variables available for evaluation (in addition to any requested cookie values):

ID – the Interactivation ID for the application. ID is stored in the user's HTML cookies and won't change unless the user deletes the cookie.
COMMID – a communications ID for use in a subsequent long polling session. This variable is only returned if the attribute commid is set to YES.
IPADDRESS – the user's IP address.

Child of: <node name="">
Parent of: <cookie>, <next_node>, <error_node>

Example:

<get_info commid="YES" responses="NO">
            <cookie>Cookie1</cookie>
            <cookie>Cookie2</cookie>
            <cookie>Cookie3</cookie>
            <next_node>a_node</next_node>
            <error_node>error_node</error_node>
</get_info>

<long_poll connect="">

Allows the application to connect to a server and await input such as voice recognition through the browser (see <voice_rec>), a call from a phone, an SMS text, etc.

Accepted values of connect="" are YES, NO and FRESH. Use connect="NO" to define long polling settings for future use. Use connect="FRESH" to discard any undelivered message that may have been cached.

If <next_node> is not defined within <long_poll connect="">, next node will be defined as the value that is returned by the long polling.

Delimited data returned by the long polling is placed into an array named long_poll_value as follows: long_poll_value[1], long_poll_value[2], long_poll_value[3], etc. In addition, the following variables may be available:

long_poll_value_type – the type of poll returned (e.g., EMAIL, SMS, VXML, etc.).
long_poll_value_data – extra data, such as a phone number if long_poll_value_type is SMS or an email address if it is EMAIL. Note: If one long polling session is interrupted by another to the same server, the first session will end and the value CHOPPED will be returned in the long_poll_value_data variable. If the first session is restarted while the second one is still underway, the second one will end and return CHOPPED in long_poll_value_data. If next_node is not defined, the application with the interrupted polling will proceed to a node named CHOPPED. Be sure to have such a node in place or to interrogate the variable long_poll_value in the node defined as next_node and handle appropriately if the value is CHOPPED.

Child of: <node name="">
Parent of: <socket_server>, <socket_port>, <continuous>, <next_node>, <error_node>, <delimiter>
See also: <voice_rec>

Examples:

<long_poll connect="YES">
            <socket_server>12.34.56.78</socket_server>
            <socket_port>8888</socket_port>
            <continuous>NO</continuous>
            <next_node>a_node</next_node>
            <error_node>long_poll_error</error_node>
            <delimiter>,</delimiter>
</long_poll>

To stop the long polling:

<long_poll>STOP</long_poll>

To start a long poll that was previously defined using connect="NO":

<long_poll>START</long_poll>

To restart a long poll that was originally defined using connect="NO" while discarding any undelivered message that may have been cached in the previous start:

<long_poll>STARTFRESH</long_poll>

<metric>

Passes a function to the registerMetricCallback(METRICFUNCTION) API (see Embedding Your Application).

The function passed must take a string as a parameter.

Child of: <node name="">
Parent of: Nothing
See also: <event>

Example:

<metric>METRIC</metric>

<obfuscate>

Obfuscates data being sent to a web service.

Accepted values are YES or NO.

Default value: NO
Child of: <web_service>
Parent of: Nothing

Example:

<obfuscate>YES</obfuscate>

<port>

The server port to connect to in a long polling session.

Child of: <long_poll connect=""/>
Parent of: Nothing

Example:

<port>8888</port>

<resume_node>

The node to resume with when the resume() API (see Embedding Your Application) is called from a Flash project outside the Interactive XML application.

Child of: <event>
Parent of: Nothing
See also: resume(), <type>

Example:

<resume_node>a_node</resume_node>

<socket_server>

The IP address of the socket on the server to connect to in a long polling session.

Child of: <long_poll connect=""/>
Parent of: Nothing

Example:

<socket_server>12.34.56.78</socket_server>

<type>

Sends the specified function to the registerEventFunction(EVENT) API (see Embedding Your Application) when the enclosing <event> tag is encountered.

The function must have a single string as a parameter.

Child of: <event>
Parent of: Nothing
See also: registerEventFunction(EVENT), <resume_node>

Example:

<type>EVENT</type>

<url>

The URL within a multi-line <link> tag or the URL to access for a web service.

When used within <web_service>, the return data is placed in a variable named web_service_value.

Child of: <link>, <web_service>
Parent of: Nothing

Examples:

<link>
<url>http://www.my_site.com</url>
<height>436</height>
<width>626</width>
</link>

<web_service>
            <url>http://www.my_site.com/my_web_service.asp</url>
            <next_node>a_node</next_node>
</web_service>

<voice_rec>

Allows the recognition of user voice input through the browser.

Voice recognition must be used in conjunction with long polling (see <long_poll connect="">) in order to capture the voice input and evaluate the result.

Note that the <next_node> specified in <voice_rec> is the node during which the actual recognition will take place. Therefore, the <timeout> specified in <voice_rec> will occur relative to the start of the <next_node>, not the node in which <voice_rec> is defined. However, if <mic_delayed> is set to YES, the recognition and timeout will not begin until the recognition is explicitly started using <voice_rec_start/>.

Once a <voice_rec> tag has been used, the variable max_level is available. max_level is the highest volume out of 100 that the user's voice input reached. Input that scores too high may result in distortion; input that scores too low may be too soft to be recognized. Note that if you try to use max_level before using <voice_rec>, an unknown variable error will occur.

Child of: <click>, <mouse_click>, <mouse_down>, <mouse_move>, <mouse_out>, <mouse_over>, <node name="">, <press>, <release>
Parent of: <timeout>, <server>, <grammar>, <dynamic_grammar>, <next_node>, <error_node>, <all_full_node>, <mic_deny_node>, <mic_delayed>, <recording_start start_level="15">
See also: <long_poll connect="">

Examples:

<voice_rec>
            <timeout>12</timeout>
            <server>http://12.34.56.78</server>
            <grammar>yesorno, largeorsmall</grammar>
            <dynamic_grammar>PTN_1:RET_1, PTN_2:RET_2</dynamic_grammar>
            <next_node>voice_recognition_on</next_node>
            <error_node>voice_rec_error</error_node>
            <all_full_node>voice_rec_full</all_full_node>
            <mic_deny_node>voice_rec_denied</mic_deny_node>
            <mic_delayed>NO</mic_delayed>
            <recording_start start_level="15">
                        ...
            </recording_start>
</voice_rec>

To stop a voice recognition session independently of <timeout>:

<voice_rec>STOP</voice_rec>

To stop a voice recognition session and close the connection without receiving a return value from the long polling session, use CANCEL as follows:

<voice_rec>CANCEL</voice_rec>

<web_service>

Calls a web service and places the return value into a variable named web_service_value.

Delimited data returned by the web service is placed into an array named web_service_value as follows: web_service_value[1], web_service_value[2], web_service_value[3], etc.


Example:

<web_service>
            <url>http://www.my_site.com/my_web_service.asp</url>
            <next_node>a_node</next_node>
<delimiter>,</delimiter>
<obfuscate>YES</obfuscate>
</web_service>