Customstate Element

Use

The customstate element enables executing a method that is imported to the system with a Python customizer. Results of the query are available in a variable customstate:[identifier], where [identifier] is the Identifier attribute of the customstate element.

The customstate results are available globally in the IVR application, even if it is placed in a parent element.

The customstate element can be nested in the following parent elements: block, error, form, if, timeout, vxml.

It can have the following child elements: error, timeout .

Attributes of customstate Element

Description

Identifier

Enter the identifier, either a short name or number. Use letters a-z, A-Z, numbers, and underscore (_), only. This ID is used as an address when the call is transferred to this element. The identifier appears in the drop-down list of expressions with the prefix customstate:, the results of the customized method are called with that expression.

Note:

Identifier is a mandatory attribute. If it is missing, a warning message appears.

Method Name

The method’s name that is called in the imported customizer file.

Note:

Method Name is a mandatory attribute. If it is missing, a warning message appears.

Parameter Values

To define parameter values as key/value pairs, enter them in Key and Value fields, and add each pair to dictionary with the plus (+) button.

To remove a key/value pair from the dictionary, choose the pair and click the minus (-) button.

To change the row order, choose the row, and move it with the Up and Down buttons.

Description

Enter a description of your element; what is it planned for, its requirements and limitations. Specific to Sinch Contact Pro .

Use Timer

To use timer for the customizer calling, select the checkbox. Specific to Sinch Contact Pro .

Timeout

To define how long time the response is waited for after calling the customizer, set the number of seconds or milliseconds. Requires that the Use Timer is selected. The default value is 5 seconds. Specific to Sinch Contact Pro .

Example

To add a customizer that fetches data from a database with the method DataMethod:

  1. To define the customizer, see Managing Customizers for IVRs.

  2. Add the customstate element and define the attributes:

    Identifier: for example MyXmlData

    Method Name: must be the customizer’s method exactly DataMethod.

    To save attributes, click Apply, and to save the element in the document, click Save.

  3. To get the results, define an appropriate element, such as block, if, transfer, var, that uses the variable customstate:MyXmlData, see for example the transfer element.