Running PATCH /api/v2/routing/queues/{queueId}/members via data action

I have a dynamic list of users that I am wanting to join and unjoin from a given queue. Inside of the data action configure we do not have a way to use a dynamic array for input. Using the new(ish) JSON tools can you use a JSON string as the input for a data action? Is there an example of this anywhere to look at the data action request formatting?

Thanks!

What do you need to provide to the API? You can use java string manipulation methods to split a list apart:

So, you could turn "bob,nancy,drew" into an array using something like
#set($c = $b.split(",") )

1 Like

it would be a basic join with user id and joined set to true.

something like this, but with anywhere from 1 to 100+ users.

 [
  {
    "id": "e5f24a8e-9b10-45ea-ba91-db217b26a852",
    "joined": true
  },
  {
    "id": "afe1956e-3c25-4bb9-9dfc-6d035b48be6d",
    "joined": true
  }
]

in my workflow right now I am looping on a collection but I am finding that I am getting too many rate limits. I'll try sending it as a list though that is a good idea!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.