Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use/

Overview

ServiceNow aims in delivering to deliver digital workflows that create great experiences and unlock productivity for enterprise operations. The company's core business revolves around management of "incident, problem, and change".

...

Template NameExtension NameExtension Version
ServiceNow Incidentue-servicenow-incident12.0.0

Refer to Changelog for  for version history information.

...

Software Requirements for Universal Template and Universal Task

Requires Tested with Python version 3.7.0 or higher. Tested with 6 and with the Universal Agent bundled Python distribution.

...

  • Universal Agent for Windows x64 Version 7.01.0.0 and later with python Python options installed.
  • Universal Agent for Linux Version 7.01.0.0 and later with python Python options installed.

Software Requirements for Universal Controller

Universal Controller Version 7.01.0.0 and later.

Network and Connectivity Requirements

  • Extension's Universal Agent host should be able to reach ServiceNow REST endpoints.
  • When creating attachments from Task Instances, the extension's Universal Agent Host should be able to reach the Universal Controller.
  • The ServiceNow Credentials provided in the ServiceNow Incident Universal Task , should have sufficient permissions to invoke ServiceNow API's APIs and create incidents.

Supported ServiceNow Versions

...

  • Actions
    • Create a ServiceNow Incident.
  • Authentication
    • Authentication using ServiceNow Credentials.
  • Input/Output
    • Capability to send the output of any task instance as an incident attachment.

Import Universal Template

...

FieldInput typeDefault valueTypeDescription
ActionRequiredCreate IncidentChoiceAction performed upon the task execution. Available actions.
  • Create Incident
ServiceNow Instance URLRequired-TextURL of the ServiceNow instance.
ServiceNow CredentialsRequired-CredentialsCredentials for accessing ServiceNow via API.The Credentials definition should be as follows.
  • ServiceNow username as "Runtime User".
  • ServiceNow password as "Runtime Password".
CallerOptional-Dynamic ChoiceUser who reported or is affected by this incident.
CategoryOptional-Dynamic ChoiceThe category for incident creation. If not provided, the default category defined on ServiceNow will be considered.
SubcategoryOptional-Dynamic ChoiceThe subcategory for incident creation. The choice of Subcategory depends on the previous choice of Category.
ImpactOptional-Dynamic ChoiceImpact The impact of the created incident. The following options are available.
  • High
  • Medium
  • Low
    UrgencyOptional-Dynamic ChoiceUrgency The urgency of the created incident. The following options are available.
  • High
  • Medium
  • Low
  • Assigned To
    Optional-Dynamic ChoiceUser The user is primarily responsible for treating this incident in ServiceNow.
    Assignment GroupOptional-Dynamic ChoiceAssignment group that is responsible for working on this incident in ServiceNow.
    Short DescriptionRequired-TextShort description of the incident.
    DescriptionOptional-Large TextDescription of the incident.
    Attach Output SourceRequired-- None --ChoiceParameter controlling whether an attachment will be attached to the incident and the source of it. The following options are available.
    • -- None --
    • Sibling Task Instance
    • Any Task Instance
    Output TypeOptionalAllChoiceThe type of output to be used as an attachment. The following options are available.
    • All
    • Standard Output
    • Standard Error
    Required when Attach Output Source is “Sibling Task” or “Any Task Instance”.
    Number of linesOptional100IntegerThe number of lines to be retrieved from the task instance output. The extension will provide up to the specified number of lines, less if there is are not enough lines generated.

    Required when Attach Output Source is “Sibling Task” or “Any Task Instance”.

    The value must be greater then than 0.
    Task Instance IDOptional-TextUUID of the task instance the output of which is attached. UAC Functions can be used to resolve the required Task Instance ID. For more information, the reader can refer to the task examples.

    Required when Attach Output Source is “Sibling Task” or “Any Task Instance”.
    UC URLOptional-TextBase URL of the target Universal Controller.

    Required when Attach Output Source is “Sibling Task” or “Any Task Instance”.
    UC CredentialOptional-
    Credential for accessing the Controller.

    The Credentials definition should be as follows.
    • UA Controller username as "Runtime User".
    • UA Controller password as "Runtime Password".
    Required when Attach Output Source is “Sibling Task” or “Any Task Instance”.


    Note

    Using empty value values for dynamic choice fields will result with in ServiceNow setting a default value for the field if one exists.


    Note

    Using non-existing value values for dynamic choice fields will result with in ServiceNow setting an empty value or a default value for the field if one exists.

    ...

    Example of creation of an incident.

    Create an Incident with an attachment from a Sibling Task

    Example of creation of an incident with an attachment from a sibling task within a workflow. The workflow is configured to create a ServiceNow incident when a task fails.
    An example workflow where the Failure transition of a SQL Task is followed by a ServiceNow Incident Universal Task is provided below.

    Image Removed Image Added
    An example of a task configured to use the information from the failed Universal Task Instance as attachment for creating a ServiceNow Incident is provided below.

    Create an Incident from any Task Instance

    Example of creation of an incident from any Task Instance.

    The best practice to configure such a scenario within UAC is the following.

    Step 1: Create a Monitor Task which that monitors the failure of tasks by configuring related "Monitor Details".

    ...

    Step 2: Configure the ServiceNow Incident task. The created Incident Task propagates the output of the failed Task Instance as an attachment to ServiceNow. For that, a Task Monitor trigger is required. More information on this on Step 3.

    ...

    Step 3: Create a Task Monitor Trigger linked to the Monitor Task (on Step 1) which controls the action that needs to be taken when the monitor successfully monitors a failure, in this case, the trigger of an incident ticket configure configured on Step 2.

    Task Output

    Exit Codes

    ...

    Exit CodeStatus Classification CodeStatus Classification DescriptionStatus Description
    0SUCCESSSuccessful ExecutionSUCCESS: Ticket Created
    1FAILClient Error. Error The error originated on the client side.FAIL: Client Error: < Error description >
    1FAILServer Error. Error The error originated from the server side.FAIL: Server Error: < Error description >
    2AUTHENTICATION_ERRORBad credentialsCredentialsAUTHENTICATION_ERROR: Account The account cannot be authenticated.
    3AUTHORIZATION_ERRORInsufficient permissionsAUTHORIZATION_ERROR: Account The account is not authorized to perform the requested action.
    20DATA_VALIDATION_ERRORInput fields validation error.DATA_VALIDATION_ERROR: Some of the input fields cannot be validated. See STDERR for more details.

    ...

    Attribute changed is populated as follows

    • true, in case a ServiceNow incident is successfully created.
    • false, in case a ServiceNow incident is not successfully created.

    The Extension output contains the attribute result. Attribute result contains the following sub-attributes:

    AttributeTypeDescription
    codenumberThe HTTP Response Code from ServiceNow.
    ticket_numberstringThe ticket number is given to the created incident.
    sys_idstringThe UID of the incident, generated by ServiceNow.

    An example of the Extension Output for the creation of an a ServiceNow Incident using the output of an a Task Instance ID as an attachment is presented below.

    {
        "exit_code": 0,
        "status_description": "SUCCESS: ServiceNow Incident Create Incident executed successfully!",
        "changed": true,
        "invocation": {
            "extension": "ue-servicenow-incident",
            "version": "12.0.0",
            "fields": {
                "action": "Create Incident",
                "servicenow_instance_url": "https://dev.service-now.com",
                "servicenow_credentials_username": "****",
                "servicenow_credentials_password": "****",
                "caller": "Jewel Agresta",
                "category": "Database",
                "subcategory": "Oracle",
                "impact": "2 - Medium",
                "urgency": "3 - Low",
                "assigned_to": "Naomi Greenly",
                "assignment_group": "Application Development",
                "short_description": "It's a short description",
                "description": "It's a large text description",
                "attach_output_source": null,
                "output_type": null,
                "number_of_lines": null,
                "task_instance_id": null,
                "uc_url": null,
                "uc_credentials_username": null,
                "uc_credentials_password": null
            }
        },
        "result": {
            "code": 201,
            "ticket_number": "INC0012120",
            "sys_id": "b2f52e531bb011104105caa4604bcba0"
        }
    }

    ...

    STDOUT and STDERR provide additional information to the User. The populated content can be changed in future versions of this extension without notice. Backward compatibility is not guaranteed.

    ...

    Modifications applied by users or customers, before or after import, might affect the supportability of this integration. The following modifications are discouraged to retain the support level as applied for this integration.

    • Python code modifications should not be done.
    • Template Modifications
      • General Section
        • "Name", "Extension", "Variable Prefix", and "Icon" should not be changed.
      • Universal Template Details Section
        • "Template Type", "Agent Type", "Send Extension Variables", and "Always Cancel on Force Finish" should not be changed.
      • Result Processing Defaults Section
        • Success and Failure Exit codes should not be changed.
        • Success and Failure Output processing should not be changed.
      • Fields Restriction Section
        • Default configured values should not be changed.

    ...

    Document LinkDescription
    Universal TemplatesUser documentation for creating, working with, and understanding Universal Templates and Integrations.
    Universal TasksUser documentation for creating Universal Tasks in the Universal Controller user interface.
    CredentialsUser documentation for creating and working with credentials.
    Resolvable Credentials Permitted PropertyUser documentation for Resolvable Credentials Permitted Property.
    ServiceNow DocumentationUser documentation for ServiceNow.

    Anchor
    Changelog
    Changelog

    Changelog

    ue-servicenow-incident-2.0.0 (2023-09-14)

    Deprecations and Breaking Changes

    • breaking changes: This integration is no longer importable on Universal Controller 7.0 or runnable on Agent version 7.0. (#34222)

    Fixes

    • Fixed: Remove value validation for the "Urgency" and "Impact" Dynamic Choice Fields. (#34232)

    ue-servicenow-incident-1.0.0 (2022-07-29)

    • AddedInitial Release: Basic Functionality for ServiceNow Incidents (#29442)