Mapping of Global variable to Integration Service

On the action method of a button, I am trying to pass the input values to an API's payload (integration service). One of the request parameter is of type collection. So, I created a global variable of value type collection. But in the mapping editor, the global variable is showing as string type, so I am unable to bind the global variable with the service's parameter. Please guide. PFA images.

Can I do it through coding then how?

Hi Bibin,

There are a couple of ways of declaring global variables : One from the action sequence itself (which you are using), the other from Edit menu (which is preferred for your use-case). The former is global to the scope of the controller, not the entire application, the latter is available to entire application.

Whichever use-case you go with, the initialization value overrides the variable type you declare. As such, you can see I have declared both of the variables (attached screenshots) as []. Consequently, when I try to assign a service response to either (screenshot attached), both show up as "collection" type.

Hope that helps!