In this action, I have a prior step in the workflow that will list all ConnectWise PSA members and build a list of possible choices for the drop down box. I have it show an assign card or an ignore card. Here is what the "CTX.member_list" variable looks like to be properly formatted for the "choices" key:
Similar to the Approve/Deny actions, the information contained in the "data" key gets submitted back to the response handler workflow.
Copy {
"type": "Container",
"id": "466ee0a4-b5ba-520e-0b5d-53841fffe66e",
"padding": "Default",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.ShowCard",
"title": "Assign New Resource",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "Input.Text",
"id": "AssignmentNote",
"placeholder": "Add a note to include with the assignment",
"isMultiline": true
},
{
"type": "Input.ChoiceSet",
"id": "ResourceToAssign",
"placeholder": "Select resource",
"label": "Which resource would you like to assign?",
"choices": {{ CTX.member_list }},
"isRequired": true
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"data": {
"Type": "TicketAssignment",
"AssignAction": "Assign",
"ServiceTicketId": "{{ CTX.body.retention_ticket_id }}",
"CardId": "{{ CTX.card_id}}",
"CardActivityId": "{{ CTX.card_activity_id }}"
}
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"padding": "None"
},
"style": "positive",
"isPrimary": true
},
{
"type": "Action.ShowCard",
"title": "Ignore",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Submit & Clear Actions",
"data": {
"Type": "TicketAssignment",
"AssignAction": "Ignore",
"ServiceTicketId": "{{ CTX.body.retention_ticket_id }}",
"CardId": "{{ CTX.card_id}}",
"CardActivityId": "{{ CTX.card_activity_id }}"
}
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"padding": "None"
},
"style": "positive",
"isPrimary": true
}
],
"spacing": "None"
}
],
"spacing": "None"
}