kind: TaskDialog
modelDisplayName: Incident lookup
modelDescription: Get information on incidents in ServiceNow using the incident number.
inputs:
  - kind: ManualTaskInput
    propertyName: tableType
    value: incident

  - kind: ManualTaskInput
    propertyName: sysparm_display_value
    value: true

  - kind: ManualTaskInput
    propertyName: sysparm_exclude_reference_link
    value: true

  - kind: AutomaticTaskInput
    propertyName: sysparm_query
    description: "Encoded query used to filter the result set. Example: active=true^ORDERBYnumber^ORDERBYDESCcategory"
    entity: StringPrebuiltEntity

outputs:
  - propertyName: result
    name: Ticket information
    description: ServiceNow Ticket Information

action:
  kind: InvokeConnectorTaskAction
  connectionReference: cr5e0_itHelpdeskTicketAssistant.cr.pgq7R_31
  connectionProperties:
    mode: Maker

  operationId: GetRecords
  dynamicOutputSchema:
    kind: Record
    properties:
      result:
        order: 0
        type:
          kind: Table
          properties:
            active:
              displayName: Active
              order: 29
              type: String

            activity_due:
              displayName: Activity due
              description: Date by which the Inactivity Monitor expects the task to be updated
              order: 76
              type: String

            additional_assignee_list:
              displayName: Additional assignee list
              description: Additional assignees
              order: 55
              type: String

            approval:
              displayName: Approval
              order: 80
              type: String

            approval_history:
              displayName: Approval history
              order: 10
              type: String

            approval_set:
              displayName: Approval set
              order: 45
              type: String

            assigned_to:
              displayName: Assigned to
              description: Person primarily responsible for working this task
              order: 77
              type: String

            assignment_group:
              displayName: Assignment group
              order: 54
              type: String

            business_duration:
              displayName: Business duration
              description: Business time elapsed before task was closed
              order: 39
              type: String

            business_impact:
              displayName: Business impact
              order: 32
              type: String

            business_service:
              displayName: Service
              order: 31
              type: String

            business_stc:
              displayName: Business resolve time
              description: Business time elapsed (stored in seconds) before Incident was resolved
              order: 56
              type: String

            calendar_duration:
              displayName: Duration
              description: Time elapsed before task was closed
              order: 60
              type: String

            calendar_stc:
              displayName: Resolve time
              description: Time elapsed (stored in seconds) before Incident was Resolved
              order: 23
              type: String

            caller_id:
              displayName: Caller
              description: Person who reported or is affected by this incident
              order: 42
              type: String

            category:
              displayName: Category
              order: 91
              type: String

            cause:
              displayName: Probable cause
              order: 57
              type: String

            caused_by:
              displayName: Caused by Change
              description: Change request that caused the incident
              order: 2
              type: String

            child_incidents:
              displayName: Child Incidents
              description: Number of child Incidents related to this Problem
              order: 6
              type: String

            close_code:
              displayName: Resolution code
              description: For use in reporting
              order: 50
              type: String

            close_notes:
              displayName: Resolution notes
              order: 61
              type: String

            closed_at:
              displayName: Closed
              order: 24
              type: String

            closed_by:
              displayName: Closed by
              order: 65
              type: String

            cmdb_ci:
              displayName: Configuration item
              description: Item or service affected
              order: 25
              type: String

            comments:
              displayName: Additional comments
              description: Journaled field, shared with the end user
              order: 79
              type: String

            comments_and_work_notes:
              displayName: Comments and Work notes
              description: Combined output of Additional comments and Work notes
              order: 82
              type: String

            company:
              displayName: Company
              order: 74
              type: String

            contact_type:
              displayName: Channel
              order: 69
              type: String

            contract:
              displayName: Contract
              order: 27
              type: String

            correlation_display:
              displayName: Correlation display
              order: 51
              type: String

            correlation_id:
              displayName: Correlation ID
              order: 89
              type: String

            delivery_plan:
              displayName: Delivery plan
              order: 26
              type: String

            delivery_task:
              displayName: Delivery task
              order: 52
              type: String

            description:
              displayName: Description
              order: 58
              type: String

            due_date:
              displayName: Due date
              description: Expected date from assigned to
              order: 83
              type: String

            escalation:
              displayName: Escalation
              order: 87
              type: String

            expected_start:
              displayName: Expected start
              order: 37
              type: String

            follow_up:
              displayName: Follow up
              order: 66
              type: String

            group_list:
              displayName: Group list
              description: Interested groups
              order: 40
              type: String

            hold_reason:
              displayName: On hold reason
              order: 7
              type: String

            impact:
              displayName: Impact
              description: Measure of the business criticality of the affected service
              order: 28
              type: String

            incident_state:
              displayName: Incident state
              description: Workflow state of the incident
              order: 71
              type: String

            knowledge:
              displayName: Knowledge
              description: If checked, will automatically create a Draft knowledge article upon closure
              order: 21
              type: String

            location:
              displayName: Location
              description: Where the caller or service is located
              order: 90
              type: String

            made_sla:
              displayName: Made SLA
              order: 1
              type: String

            notify:
              displayName: Notify
              order: 62
              type: String

            number:
              displayName: Number
              order: 11
              type: String

            opened_at:
              displayName: Opened
              order: 38
              type: String

            opened_by:
              displayName: Opened by
              order: 14
              type: String

            order:
              displayName: Order
              order: 22
              type: String

            origin_id:
              displayName: Origin
              order: 59
              type: String

            origin_table:
              displayName: Origin table
              description: Table of the Origin record
              order: 8
              type: String

            parent:
              displayName: Parent
              order: 0
              type: String

            parent_incident:
              displayName: Parent Incident
              description: Can be used to collect Incidents for the same root issue
              order: 67
              type: String

            priority:
              displayName: Priority
              description: Sequence in which an Incident or Problem needs to be resolved, based on impact and urgency
              order: 33
              type: String

            problem_id:
              displayName: Problem
              description: Related problem, if one exists
              order: 73
              type: String

            reassignment_count:
              displayName: Reassignment count
              order: 75
              type: String

            reopen_count:
              displayName: Reopen count
              description: Number of times Incident state has changed from Resolved or Closed to another state
              order: 85
              type: String

            reopened_by:
              displayName: Last reopened by
              order: 70
              type: String

            reopened_time:
              displayName: Last reopened at
              order: 43
              type: String

            resolved_at:
              displayName: Resolved
              order: 44
              type: String

            resolved_by:
              displayName: Resolved by
              order: 12
              type: String

            rfc:
              displayName: Change Request
              description: Related change, if one exists
              order: 35
              type: String

            route_reason:
              displayName: Transfer reason
              order: 19
              type: String

            service_offering:
              displayName: Service offering
              order: 63
              type: String

            severity:
              displayName: Severity
              order: 78
              type: String

            short_description:
              displayName: Short description
              order: 49
              type: String

            sla_due:
              displayName: SLA due
              description: Date by which the SLA expects this task to be completed
              order: 81
              type: String

            state:
              displayName: State
              order: 18
              type: String

            subcategory:
              displayName: Subcategory
              order: 46
              type: String

            sys_class_name:
              displayName: Task type
              order: 64
              type: String

            sys_created_by:
              displayName: Created by
              order: 20
              type: String

            sys_created_on:
              displayName: Created
              order: 16
              type: String

            sys_domain:
              displayName: Domain
              description: Domain to which the task belongs
              order: 17
              type: String

            sys_domain_path:
              displayName: Domain Path
              order: 34
              type: String

            sys_id:
              displayName: Sys ID
              order: 68
              type: String

            sys_mod_count:
              displayName: Updates
              order: 84
              type: String

            sys_tags:
              displayName: Tags
              order: 86
              type: String

            sys_updated_by:
              displayName: Updated by
              order: 13
              type: String

            sys_updated_on:
              displayName: Updated
              order: 5
              type: String

            task_effective_number:
              displayName: Effective number
              order: 9
              type: String

            time_worked:
              displayName: Time worked
              order: 36
              type: String

            universal_request:
              displayName: Universal Request
              order: 48
              type: String

            upon_approval:
              displayName: Upon approval
              order: 88
              type: String

            upon_reject:
              displayName: Upon reject
              order: 4
              type: String

            urgency:
              displayName: Urgency
              description: Measure of the business criticality based on the impact and on the business needs of the Customer
              order: 72
              type: String

            user_input:
              displayName: User input
              order: 15
              type: String

            watch_list:
              displayName: Watch list
              description: Interested users
              order: 3
              type: String

            work_end:
              displayName: Actual end
              order: 41
              type: String

            work_notes:
              displayName: Work notes
              order: 47
              type: String

            work_notes_list:
              displayName: Work notes list
              description: Users interested in work notes
              order: 30
              type: String

            work_start:
              displayName: Actual start
              order: 53
              type: String

response:
  mode: Generated

triggerCondition: false