Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Save a Case

    For any incident in Service Now, you can modify the settings to submit the incident to create a case such as the priority and the e-mail list associated with a case. Once modified, use this API to save the case to the Case Manager.

    URI

    https://[host]/api/juniper/servicenow/incident-management/incidents/{id}/saveCase (HTTP method = POST)

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the incident for which associated case must be saved

    Consumes

    • application/vnd.juniper.servicenow.incident-management.incident+xml;version=3;charset=UTF-8
    • application/vnd.juniper.servicenow.incident-management.incident+json;version=3;charset=UTF-8

    Request Elements

    Element

    Type

    Description

    siteId

    String

    Site ID associated with the incident

    This field is mandatory if Service Now is operating in Partner Proxy or Direct mode.

    caseCreationUserName

    String

    ID of user who submits the incident to JSS for creating the case

    you must also include the caseCreationPassword element If you include this element in the request.

    Note: This element is not mandatory if Service Now is operating in the End Customer mode

    caseCreationPassword

    String

    Password of user who submits the incident to JSS for creating the case

    The password should be Base64 encrypted.

    Note: This element is not mandatory if Service Now is operating in the End Customer mode

    customerTrackingNumber

    String

    Number provided for tracking the case created in JSS for the incident.

    Note: This element is not mandatory if Service Now is operating in the End Customer mode

    priority

    String

    Priority of the case created for the incident (values are case-sensitive):

    Possible values:

    • 1 - Critical
    • 2 - High
    • 3 - Medium
    • 4 - Low

    followUpMethod

    String

    Follow-up method for the incident

    Possible values:

    • EMAIL_FULL_TEXT_UPDATE
    • EMAIL_SECURE_LINK
    • PHONE_CALL

    Note: This element is not mandatory if Service Now is operating in the End Customer mode.

    synopsisComments

    String

    Synopsis of the incident

    customerComments

    String

    Comments provided by the customer

    caseCCList

    email

    Collection of e-mail IDs to which notifications related to the incident must be sent

    email

    String

    E-mail ID of a user to whom notifications related to the incident must be sent

    addressGroup

    addressGroup

    Address Group associated with the organization in which the incident was generated

    Note: This object is optional for an RMA incident.

    If Service Now is operating in Partner Proxy mode, Service Now partner can override the

    href

    String

    Link to the address group

    coreFiles

    coreFile

    Collection of core files associated with the incident

    coreFile

    coreFile

    A core file associated with the incident

    fileName

    String

    Name of the core file

    Produces

    • application/vnd.juniper.servicenow.incident-management.servicenowmsg+xml;version=3
    • application/vnd.juniper.servicenow.incident-management.servicenowmsg+json;version=3

    Response Elements

    Element

    Type

    Description

    msg

    String

    Status message of the save case job

    Sample Input

    Sample XML Input

    <incident>
         <siteId>CJ18841</siteId>
         <caseCreationUserName>user@example.com</caseCreationUserName>
         <caseCreationPassword>password</caseCreationPassword>
         <customerTrackingNumber>ck23b274</customerTrackingNumber>
         <priority>Critical</priority>
         <followUpMethod>Email Full Text Update</followUpMethod>
         <synopsisComments>
              These are my synopsis comments here
         </synopsisComments>
         <customerComments>
              These are my customer comments here
         </customerComments>
         <caseCCList>
              <email>biruk@mycompany.com</email>
              <email>apathodia@mycompany.com</email>
         </caseCCList>
    <addressGroup href="/api/juniper/servicenow/address-group-management/addressGroups/11501570"/>
    <coreFiles>
    			<coreFile>
    			<fileName>/var/tmp/snmpd.core-tarball.1.tgz</filename>
    			</coreFile>
    </coreFiles>
    <deleteCoreFiles>true</deleteCoreFiles>
    </incident>
    

    Sample XML Input(End Customer Address Group in input)

    <incident>
    			<siteId>CJ18841</siteId>
    			<caseCreationUserName>user@example.com</caseCreationUserName>
    			<caseCreationPassword>password</caseCreationPassword>
    			<customerTrackingNumber>ck23b274</customerTrackingNumber>
    			<priority>Critical</priority>
    			<followUpMethod>Email Full Text Update</followUpMethod>
    			<synopsisComments>
    				These are my synopsis comments here
    			</synopsisComments>
    			<customerComments>
    				These are my customer comments here
    			</customerComments>
    			<caseCCList>
    				<email>biruk@juniper.net</email>
    				<email>apathodia@juniper.net</email>
    			</caseCCList>
    			<endCustomerAddressGroup href="/api/juniper/servicenow/address-group-management/endCustomerAddressGroups/ 20000002"/>
    </incident>

    Sample JSON Input

    {
       "incident":{
          "siteId":"CJ18841",
          "caseCreationUserName":"user@example.com",
          "caseCreationPassword":"password",,
          "customerTrackingNumber":"ck23b274",
          "priority":"Critical",
          "followUpMethod":"Email Full Text Update",
          "synopsisComments":"These are my synopsis comments here",
          "customerComments":"These are my customer comments here",
          "caseCCList":{
             "email":[
                "biruk@juniper.net",
                "apathodia@juniper.net"
             ]
          }
    "addressGroup": { "@href": "/api/juniper/servicenow/address-group-management/addressGroups/11501570" }
       }
    }
    

    Sample JSON Input (End Customer Address Group in input)

    {
      "incident": {
        "siteId": "CJ18841",
        "caseCreationUserName": "user@example.com",
        "caseCreationPassword": "password",
        "customerTrackingNumber": "ck23b274",
        "priority": "Critical",
        "followUpMethod": "Email Full Text Update",
        "synopsisComments": "These are my synopsis comments here",
        "customerComments": "These are my customer comments here",
        "caseCCList": {
          "email": [
            "biruk@juniper.net",
            "apathodia@juniper.net"
          ]
        },
        "endCustomeraddressGroup": { "@href": "/api/juniper/servicenow/address-group-management/endCustomerAddressGroups/11501570" }
      }
    }
    

    Sample Output

    Sample XML Output

    <servicenowmsg>
    	<msg Case saved successfully</msg>
    </servicenowmsg>
    

    Sample JSON Output

    {
       "servicenowmsg":{
          "msg":" Case saved successfully"
       }
    }
    

    Response Status Code

    Message

    Description

    500 Internal Server Error

    One of the following:

    • Cases cannot be saved or submitted because Service Now is in offline mode
    • An incident with the same customer tracking number already exists.

    404 Not Found

    One of the following:

    • Invalid incident ID.
    • Incident not found.

    400 Bad Request

    One of the following:

    • The case cannot be saved because the case has already been submitted or closed.
    • Site ID is mandatory and has not been specified.
    • Username and password both are required.
    • Invalid followUpMethod.
    • Invalid priority.
    • Invalid email address.
    • Device is not associated to the end customer address group

    Modified: 2016-08-10