# How to set up the needed data?

In our Conversation Flow Scenario ![](https://lh4.googleusercontent.com/BK-0TJdEC-M8eOcuyDkiFaXe1ISq4NO__83EhE2X5mO8f0lE5ezqVgoxEh4oPSdhQdp6FFkBvfEKvuNEil0zUxJyCXqsxjyWdrXd94BxZh71Df9au9P-_HksXQsE-TRxDEaTHoaw)we want a voicebot to confirm a dental appointment. In real life, we would set up an API option in the Start call or use an API block to get the data from your dentist’s IT system.

{% hint style="info" %}
In our case, we are going to fake it. And we will teach you some useful things in the process.
{% endhint %}

### The [Custom JS](https://help.inteliwise.com/what-can-you-do-with-inteliwise-blocks/custom-js-where-to-insert-a-custom-code) block allows adding custom JavaScript code that can do magic.

It sounds like this is a solution only for programmers.&#x20;

No! :no\_entry:&#x20;

If you know a few tricks:man\_juggling:,  you can reuse ready-made code snippets. You can copy them and use them.

![](https://3178614347-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZH0pztnT6Y2pBzyXGg%2F-M_ym2Aq0DZFOjlcf_lW%2F-M_ypgAmEhnh20TDmYyF%2FBez%C2%A0tytu%C5%82u.png?alt=media\&token=5b0d644a-b440-40d7-8485-f001e0eddd03)

So, let us now simulate, that the voicebot received your data from the dentist’s IT system. We will set this data manually.

Set a global variable that stores names so the voicebot knows your name.&#x20;

{% code title="" %}

```javascript
globals.first_name = ”Anna Gregorczyk”
```

{% endcode %}

> *My name is Anna Gregorczyk, so I place this name in our example.*

{% code title="" %}

```javascript
globals.date = new Date(2021,05,26,15,30) 
```

{% endcode %}

> I also set the date of the dentist appointment, which has been planned for 26 of June 2021 at 15:30.

{% hint style="danger" %}
**Notice** that in Java Script, months are counted from 0, so January is 0, and 05 is June (**not** May!)
{% endhint %}

You must remember to put `return out1()` as the last line of the code. This makes the [Custom JS](https://help.inteliwise.com/what-can-you-do-with-inteliwise-blocks/custom-js-where-to-insert-a-custom-code) block return its output to the next block.

{% hint style="warning" %}
Remember to connect the Start Call block to the Custom JS block by a [connector](https://help.inteliwise.com/quick-guide-to-creating-voicebots.-1/how-to-create-a-voicebot/how-to-add-blocks-and-connectors-and-how-to-remove-them)!
{% endhint %}
