# Through bot conversations i need static values

**URL:** <https://discourse.nodered.org/t/through-bot-conversations-i-need-static-values/15300>\
**Category:** General\
**Created:** [9 September 2019 08:37 UTC](https://discourse.nodered.org/t/through-bot-conversations-i-need-static-values/15300 "2019-09-09T08:37:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lastm4n](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lastm4n](https://discourse.nodered.org/u/lastm4n)\
**Post date:** [9 September 2019 08:37 UTC](https://discourse.nodered.org/t/through-bot-conversations-i-need-static-values/15300/1 "2019-09-09T08:37:14Z")

</div>

![Screenshot%20from%202019-09-09%2011-26-42](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/68dfd56b5e251eaaff9793621ee0498e5993df03.png)

I am using bot red via Smooch (platform integration messenger,viber etc..) and at the start of the conversation i initialize variables that during the conversation they might change. At the start, the user when sends to the bot i initialise some variables 0, and when the user talk again these variables instead of being lets say 1 they will be 0 because it starts all over again. I want with some way to have access to the changed variables.

![Screenshot%20from%202019-09-09%2011-34-52](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/79edb3adb216cc711a272d63f2e2865eab3c010c.png)

For example, the first count node increments the count per 1 every time that users speaks, but when the bot answer to the user the flow will start again and the count will be again 0 but i need the count =1 to use it properly in my program because when the count reaches count=2 need to perform some functionality.

Thanks for your time

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [9 September 2019 10:01 UTC](https://discourse.nodered.org/t/through-bot-conversations-i-need-static-values/15300/2 "2019-09-09T10:01:33Z")

</div>

Read the page called “working with context” in the docs

---

<div class="post-metadata">

**Author:** ![lastm4n](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lastm4n](https://discourse.nodered.org/u/lastm4n)\
**Post date:** [9 September 2019 10:08 UTC](https://discourse.nodered.org/t/through-bot-conversations-i-need-static-values/15300/3 "2019-09-09T10:08:52Z")

</div>

Thanks for your response.  
I have red it and i have not figured out the way to use it properly.To be honest im not sure if it can hold my state and use the value to the new user's answer.

If this can happen, may you please give me some info?  
Thanks for your time

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 September 2019 10:19 UTC](https://discourse.nodered.org/t/through-bot-conversations-i-need-static-values/15300/4 "2019-09-09T10:19:00Z")

</div>

do a search in the Flow tab for 'context' (uncheck the `nodes` box) and see if you find an example you can look at.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [9 September 2019 10:25 UTC](https://discourse.nodered.org/t/through-bot-conversations-i-need-static-values/15300/5 "2019-09-09T10:25:23Z")

</div>

also take a look at the cookbook [cookbook.nodered.org](http://cookbook.nodered.org)
