kind: TaskDialog
modelDisplayName: Get User information from ServiceNow
modelDescription: This tool allows a user to lookup information about their account like their address, job title, employee number, cost center, phone numbers, and other account information tied to their user id in ServiceNow. This tool does not help with policy information and only provides user profile information stored in your user profile in ServiceNow.
inputs:
  - kind: ManualTaskInput
    propertyName: sysid
    value: =Global.SNUserSysID

  - kind: ManualTaskInput
    propertyName: tableType
    value: sys_user

  - kind: ManualTaskInput
    propertyName: sysparm_display_value
    value: true

outputs:
  - propertyName: result.building
    name: Building
    description: The building that the user works in according to data in user profile in ServiceNow

  - propertyName: result.city
    name: City
    description: City of residence according to information in user profile in ServiceNow

  - propertyName: result.cost_center
    name: Cost center
    description: The cost center for the user according to information in user profile in ServiceNow

  - propertyName: result.department
    name: Department
    description: Department that the user works at the company according to information in user profile in ServiceNow

  - propertyName: result.country
    name: Country code
    description: Country of residence in user profile in ServiceNow

  - propertyName: result.email
    name: Email
    description: Email address recorded in user profile in ServiceNow

  - propertyName: result.employee_number
    name: Employee number
    description: The employee's unique employee ID number in user profile in ServiceNow

  - propertyName: result.first_name
    name: First name
    description: First Name of user in user profile in ServiceNow

  - propertyName: result.home_phone
    name: Home phone
    description: Home phone number of record in user profile in ServiceNow

  - propertyName: result.last_name
    name: Last name
    description: Last Name of user in user profile in ServiceNow

  - propertyName: result.middle_name
    name: Middle name
    description: Middle Name of user in user profile in ServiceNow

  - propertyName: result.gender
    name: Gender
    description: user's gender as recorded in user profile in ServiceNow

  - propertyName: result.manager
    name: Manager
    description: The user's manager in user profile in ServiceNow

  - propertyName: result.mobile_phone
    name: Mobile phone
    description: Mobile Phone Number in user profile in ServiceNow

  - propertyName: result.phone
    name: Business phone
    description: Work Phone Number in user profile in ServiceNow

  - propertyName: result.state
    name: State / Province
    description: State of occupancy in user profile in ServiceNow

  - propertyName: result.title
    name: Title
    description: Job Title for user in user profile in ServiceNow

  - propertyName: result.name
    name: Name
    description: Preferred Name for user in user profile in ServiceNow

  - propertyName: result.street
    name: Street
    description: Street Address in user profile in ServiceNow

  - propertyName: result.zip
    name: Zip / Postal code
    description: Zip code in user profile in ServiceNow

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

  operationId: GetRecord
  dynamicOutputSchema:
    kind: Record
    properties:
      result:
        order: 0
        type:
          kind: Record
          properties:
            active:
              displayName: Active
              description: Inactive users do not show in user choice lists
              order: 21
              type: String

            avatar:
              displayName: Avatar
              order: 52
              type: String

            building:
              displayName: Building
              order: 6
              type: String

            calendar_integration:
              displayName: Calendar integration
              order: 0
              type: String

            city:
              displayName: City
              order: 29
              type: String

            company:
              displayName: Company
              order: 41
              type: String

            cost_center:
              displayName: Cost center
              order: 23
              type: String

            country:
              displayName: Country code
              order: 1
              type: String

            date_format:
              displayName: Date format
              description: Display dates with this format (blank means system default)
              order: 57
              type: String

            default_perspective:
              displayName: Default perspective
              order: 20
              type: String

            department:
              displayName: Department
              order: 42
              type: String

            email:
              displayName: Email
              order: 44
              type: String

            employee_number:
              displayName: Employee number
              order: 26
              type: String

            enable_multifactor_authn:
              displayName: Enable Multifactor Authentication
              order: 9
              type: String

            failed_attempts:
              displayName: Failed login attempts
              order: 30
              type: String

            federated_id:
              displayName: Federated ID
              order: 36
              type: String

            first_name:
              displayName: First name
              order: 43
              type: String

            gender:
              displayName: Gender
              order: 28
              type: String

            home_phone:
              displayName: Home phone
              order: 17
              type: String

            internal_integration_user:
              displayName: Internal Integration User
              order: 37
              type: String

            introduction:
              displayName: Prefix
              order: 45
              type: String

            last_login:
              displayName: Last login
              order: 19
              type: String

            last_login_time:
              displayName: Last login time
              order: 3
              type: String

            last_name:
              displayName: Last name
              order: 50
              type: String

            ldap_server:
              displayName: LDAP server
              order: 38
              type: String

            location:
              displayName: Location
              order: 58
              type: String

            locked_out:
              displayName: Locked out
              description: When checked, user cannot login
              order: 48
              type: String

            manager:
              displayName: Manager
              order: 47
              type: String

            middle_name:
              displayName: Middle name
              order: 53
              type: String

            mobile_phone:
              displayName: Mobile phone
              order: 39
              type: String

            name:
              displayName: Name
              order: 25
              type: String

            notification:
              displayName: Notification
              description: Enable or disable notifications for this user ie. email, SMS etc
              order: 8
              type: String

            password_needs_reset:
              displayName: Password needs reset
              description: User will be prompted to change password at next login
              order: 27
              type: String

            phone:
              displayName: Business phone
              order: 24
              type: String

            photo:
              displayName: Photo
              order: 51
              type: String

            preferred_language:
              displayName: Language
              order: 46
              type: String

            roles:
              displayName: Roles
              order: 32
              type: String

            schedule:
              displayName: Schedule
              order: 56
              type: String

            source:
              displayName: Source
              order: 4
              type: String

            state:
              displayName: State / Province
              order: 13
              type: String

            street:
              displayName: Street
              order: 40
              type: String

            sys_class_name:
              displayName: Class
              order: 34
              type: String

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

            sys_created_on:
              displayName: Created
              order: 11
              type: String

            sys_domain:
              displayName: Domain
              description: Domain to which the user belongs
              order: 12
              type: String

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

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

            sys_mod_count:
              displayName: Updates
              order: 49
              type: String

            sys_tags:
              displayName: Tags
              order: 54
              type: String

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

            sys_updated_on:
              displayName: Updated
              order: 5
              type: String

            time_format:
              displayName: Time format
              description: Display times with this format (blank means system default)
              order: 18
              type: String

            time_zone:
              displayName: Time zone
              order: 55
              type: String

            title:
              displayName: Title
              order: 33
              type: String

            user_name:
              displayName: User ID
              order: 31
              type: String

            user_password:
              displayName: Password
              order: 2
              type: String

            vip:
              displayName: VIP
              order: 14
              type: String

            web_service_access_only:
              displayName: Web service access only
              description: Prevent user from accessing UI, and require a SOAP role to make API protocol calls (such as SOAP and WSDL requests)
              order: 7
              type: String

            zip:
              displayName: Zip / Postal code
              order: 16
              type: String

response:
  mode: Generated