> For the complete documentation index, see [llms.txt](https://blog.rhinoautomator.com/brians-integration-and-automation-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.rhinoautomator.com/brians-integration-and-automation-notes/automations/teams-notifications-azure-bot/formatting-action-buttons/assign-resource-to-ticket.md).

# Assign Resource to Ticket

{% hint style="danger" %}
I've migrated the entire blog over to my new website. Please go to [https://rhinoautomator.com](https://rhinoautomator.com/) for more as this will be deleted at some point.
{% endhint %}

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:

<figure><img src="https://965055951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzwHskk220tGpzlbz7txC%2Fuploads%2F9SKpF3kboHbg6lYqhdVH%2Fimage.png?alt=media&amp;token=aed9343f-b428-4e3f-9e76-8e5d83c8017a" alt=""><figcaption></figcaption></figure>

Similar to the Approve/Deny actions, the information contained in the "data" key gets submitted back to the response handler workflow.

```json
{
  "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"
}
```
