Original Message:
Sent: 11-29-2025 11:37
From: Luiz Rosa
Subject: DataAction remove duplicate value in Array output
Hi Jeremy Monzo,
Yes, the simplest approach is to handle it in Architect (remove duplicates after you receive the array).
If you only need a specific value (for example, the first item from the array), you can use:
firstFromArray ${successTemplateUtils.firstFromArray(\"${ids}\", \"{}\")}
Alternatively, you can also solve it using Data Actions Function (by implementing a function to return a distinct list) and return the array already deduplicated: https://help.mypurecloud.com/articles/about-the-genesys-cloud-function-data-actions-integration/
Hope it helps.
------------------------------
Luiz Rosa
Full stack developer
Original Message:
Sent: 11-28-2025 05:07
From: Jeremy Monzo
Subject: DataAction remove duplicate value in Array output
Hello,
I would like remove the duplicated value in a array defined in output data action.
For example, if the output is ["apple","banana","apple"] I would like keep ["apple","banana"].
{"translationMap": {"queueName": "$.participants[?(@.purpose == 'acd')].queueName"},"translationMapDefaults": {"queueName": "[]"},
"successTemplate": "{\n \"queueName\": ${queueName}\n}"}
I try using velocity approach but cannot use complex feature (ex : #foreach). Is there a way to achieve the result in data action or must use data action + architect for achieve this? thanks
#DataActions
------------------------------
Jeremy
------------------------------