Legacy Dev Forum Posts

 View Only

Sign Up

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

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

    Posted 06-05-2025 18:45

    whoff | 2023-12-08 13:24:03 UTC | #1

    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!


    Jason_Mathison | 2023-12-08 15:15:24 UTC | #2

    What do you need to provide to the API? You can use java string manipulation methods to split a list apart: https://help.mypurecloud.com/articles/velocity-macros-data-actions/#JavaStringMethods

    So, you could turn "bob,nancy,drew" into an array using something like

    set($c = $b.split(",") )


    whoff | 2023-12-08 15:23:06 UTC | #3

    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!


    system | 2024-01-08 15:20:37 UTC | #4

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


    This post was migrated from the old Developer Forum.

    ref: 23602