Can we modify global variables in bot

I would like to use global variable as normal variable that store values every time
like this <env.variable = context.somevalue>
But it is not working like variable, it is working like constant

Hi @srihari.posanapalli,

Ideally, global variables are static and can only be modified through UI.

You can use BotUserSession variables which will persist the value all over the bot for that specific user and session. These variables are dynamic.
Please refer the following document for more information on variables:

Let us know if you have any further issues/queries.

Yoga Ramya.

In a Service Node, Web service, REST POST request body, How do I modify arrays of JSON body with varaiables

My full json body is this,

{ “startInfo”:
{ “ReleaseKey”: “{{context.entities.input_ReleaseKey}}”,
"Strategy": “{{context.entities.input_Strategy}}”,
"RobotIds": [ 123457 ],
"NoOfRobots": 0,
"Source": “Manual”,
"InputArguments": "{}"

I have tried this, error is at “RobotIds”: [ “{{context.entities.input_RobotID}}” ]
Error while giving Variables in array

Array Data type is Numeric

Hi @srihari.posanapalli,

Providing values to a parameter in an Array format is not supported, however, you can try to push these array values into the context variables through a script node.

And use the context variable as value to the parameter.

Let us know if you need any further information.

Yoga Ramya

Hi @yogaramya.mendu,
The problem here is, “” added to array, like this "[values]", but my requirement is [values], it must be without having Double quotes. if we have double quotes it will be error

I need this in that json body “RobotIds” : [ 145282, 785432]

But to achieve this we generally used “{{variable}}” —> “RobotIds”: “{{context.entities.input_RobotID}}”
suppose context.entities.input_RobotID = [ 145282, 785432]
so it resulting like this “RobotIds”: “[ 145282, 785432]”

even if i used context variables also same issue.
or is there any way to add json object directly to the body

please help me