Hi @bholden,
To get the routing skills and language assigned to a specific conversation, you can make an API call to the following endpoint:
GET /api/v2/conversations/{conversationId}
The data action should take the conversationId as input and provide two outputs: language (a string representing the assigned language) and skills (an array containing all ACD skills associated with the conversation). Finally, you need to adjust the translationMap and success template as the following:
{
"translationMap": {
"Skills": "$.participants[?(@.purpose === 'acd')].conversationRoutingData.skills[*].id",
"LanguageSkill": "$.participants[?(@.purpose === 'acd')].conversationRoutingData.language.id"
},
"translationMapDefaults": {
"Skills": "[]",
"LanguageSkill": "\"\""
},
"successTemplate": "{\"LanguageSkill\": ${successTemplateUtils.firstFromArray(\"${LanguageSkill}\")}, \"Skills\": ${Skills}}"
}
Example:
In this inbound call scenario, English is assigned as the language, and three ACD skills (VIP, CX, and Support) are assigned.
By calling the data action, below is the result:
The retrieved data includes the corresponding Ids for both language and skills, which will be replaced by their corresponding names shortly.
The next step is about displaying these names/labels to agents within the script component.
On the default script page, I created a custom action named "Fetch Skills & Language" and used it as a Page Load Action. This action invokes the data action with conversationId as input, returning the language and skills.

For language, obtaining the name is straightforward. I created another data action that takes a languageId as input and returns the language name by calling:
GET /api/v2/routing/languages/{languageId}
This task is completed within the "Get Language Name" custom action.
The challenge (at least for me) lies in retrieving skill names because the skills are stored as an array, and there's no built-in loop mechanism for iterating through them. To address this, I created a:
- new custom action called "Get Skill Name".
- skillList variable of type List of strings.
- dimension variable of type dynamic number, to capture the size of the skills array using the
size({{Skills}})
method.
- Index variable of type number for the loop
- Data action (Get Skill by Id) that accepts a skillId as input and returns the skill name by calling :
GET /api/v2/routing/skills/{skillId}
The process involves looping through each skillId, calling the data action (Get Skill by Id) on it.
As you can see, the action begins by comparing the index variable (initialized to 0) against the dimension variable. If the index is less than the dimension, the data action is called using the function getIndexValue({{Skills}}, {{index}})
.
The result is temporarily stored and then added to the skillList variable by using the Push action.

The index is incremented, and the custom action is recursively called until all skills are processed.

Once all skills are handled, the loop ends.
In addtion, a Set Variable action (highlighted in blue) can be used to display skill names in a table using the markdown component if needed. This is an optional approach rather than using a dropdown.

Note:
- If you are unable to see the List section in the actions menu, you need to activate it in the script settings.
Go to Script properties and enable the List feature.
- skillList needs to be used as a Variable within the dropdown component, not as a List.
The final result in the script:
Attached below is the data actions I used to assist in getting started 
Get-Skills--Language-by-conversationId-20230821185439.custom.json (1.5 KB)
Get-Skill-by-Id-20230821185450.custom.json (941 Bytes)
Get-language-by-Id-20230821185457.custom.json (953 Bytes)
I hope that helps and let me know if you have any additional questions or clarification.
Best regards,
Charaf