I’m trying to iterate over a JSON array returned from a Data Action in Genesys Cloud Architect. The Data Action returns a list of customer IDs, but the Loop block seems to be overwriting the variable on each iteration instead of processing each item. Here is the JSON payload I’m working with:
{
"customerIds": ["12345", "67890", "11122"]
}
I’ve set the Loop block to use Current Item.id as the input, but it only processes the last item in the array. Is there a specific way to handle the scope of the variable within the Loop block to ensure each customer ID is processed correctly? I’ve tried using Set Variable and Assign blocks within the loop, but the behavior remains the same. Any insights on how to properly iterate over the JSON array in this context would be helpful.