Brian's Integration and Automation Notes
  • Welcome!
  • Allow Me to Brag a Bit
  • About
  • Integrations
    • ConnectWise Home
      • Authentication
      • API Documentation
  • Automations
    • Teams Notifications Azure Bot
      • Acknowledgement
      • Considerations
      • The Basics/Getting Started
        • Create a Response Handler Workflow in Rewst
        • Getting the IDs from Teams
      • Two Stage Message Process
        • Formatting the Initial Message
        • Getting the Message IDs
        • Formatting the Message Update
      • Formatting Action Buttons
        • Approve/Deny
        • Assign Resource to Ticket
      • Working with the Responses
      • System Incident/Maintance Notifications
        • Admitting Defeat on the Database
        • The Workflow Structure
      • Resources
    • Automated GitHub/GitBook Update Notifications
      • Prerequisites
      • 1. Set up a Basic Workflow
      • 2. Fork the GitHub Repository
      • 3. Set up Automatic Updates
      • 4. Set up notifications in GitHub
      • 5. Set up Remaining Workflow Actions
  • ConnectWise PSA Actions
    • About
    • Assigning Resources to Tickets
    • Ticket Assignment Note
    • Unbundle Ticket
    • Sales Activity Assignment Note
Powered by GitBook
On this page
  1. Automations
  2. Teams Notifications Azure Bot
  3. Formatting Action Buttons

Assign Resource to Ticket

PreviousApprove/DenyNextWorking with the Responses

Last updated 1 year ago

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.

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