Rate this page:

Custom data

You can store short string values to use them in your scenario in the customData functions of a VoxEngine instance and a Call object.

In a VoxEngine scenario

Copy URL

There is a custom data function in the VoxEngine instance, where you can store a string up to 200 bytes associatod with the current JS session. You can set it and access throughout your scenario for keeping any data you may need.

To set up a value, pass the value to the function. To get a value, call the function without arguments. See the code example on how it works.

Custom data usage

Custom data usage

You can pass any string to the custom data function at the session start in the routing rule. When you start a rule, a popup window appears asking for the custom data value (optional).

Alternatively, you can set custom data when launching a scenario with management API. When you call the StartScenarios API request to launch a scenario, specify the optional script_custom_data parameter. You can later retreive the value in your scenario.

You can search call history with a specific custom data values. To do so, make a GetCallHistory management API request and specify an optional call_session_history_custom_data parameter with the value you want to search.

In the Call instance

Copy URL

In the Call object instance, there is another independent custom data function, where you can storeup to 200 bytes, associated with a particular call object.

To set up a value, pass the value to the function. To get a value, call the function without arguments. See the code example on how it works.

Call custom data usage

Call custom data usage

You can also access this function from the Call object in a mobile or web SDK and use it to transfer data between the scenario and the SDK.