***

title: Custom data
subtitle: Learn how to use custom data properties in Voximplant.
---------------------

For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

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

There is a [custom data](https://voximplant.com/docs/references/voxengine/voxengine/customdata) function in the VoxEngine instance, where you can store a string of up to 200 bytes associated with the current JS session. You can set it and access it throughout your scenario to keep 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 of how it works.

```javascript title="Custom data usage"
// set value
VoxEngine.customData('Hello world!');

// get value and write it to a log
Logger.write(VoxEngine.customData());

```

You can pass any string to the **custom data** function at the session start in the [routing rule](/platform/voxengine/routing-rules). 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](https://voximplant.com/docs/references/httpapi/scenarios#startscenarios) API request to launch a scenario, specify the optional **script\_custom\_data** parameter. You can later retrieve the value in your scenario.

You can search call history with specific custom data values. To do so, make a [GetCallHistory](https://voximplant.com/docs/references/httpapi/history#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

In the Call object instance, there is another independent [custom data](https://voximplant.com/docs/references/voxengine/call#customdata) function, where you can store up 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 of how it works.

```javascript title="Call custom data usage"
// set value
Call.customData('Hello world!');

// get value and write it to a log
Logger.write(Call.customData());

```

You can also access this function from the Call object in a [mobile or web SDK](https://voximplant.com/docs/references/websdk/voximplant/callsettings#customdata) and use it to transfer data between the scenario and the SDK.