The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Rahul Priyadars
Giga Sage
Giga Sage

The Service Order Open API provides a standardized mechanism for placing service orders.

This API is a ServiceNow implementation of the Open API Forum TMF641 Service Ordering Management API specification.

 

How to Enable- To Access it Order Management for Telecommunications (sn_ind_tmt_orm) plugin must be activated.

In UTAH version it supports GET,POST and PATCH operations.

 

Once Plugin is activated you can see this in Rest API explorer.

 

 

RahulPriyadars_0-1683522261878.png

 

Sample JSON Payload For POST Call - 

POST https://dev76115.service-now.com/api/sn_ind_tmt_orm/serviceorder

 

{
  "id": "2392d9da777301108e191e599a5a9919",
  "ponr": "true",
  "priority": 4,
  "completionDate": "2024-11-12T06:19:17.000Z",
  "expectedCompletionDate": "2020-06-26T13:07:40.000Z",
  "orderDate": "2024-11-11T20:25:49.000Z",
  "requestedCompletionDate": "2020-06-26T13:07:40.000Z",
  "requestedStartDate": "2020-06-26T13:07:40.000Z",
  "serviceOrderItem": [
    {
      "id": "0",
      "ponr": "true",
      "action": "add",
      "service": {
        "@type": "Service",
        "state": "",
        "serviceType": "cfs",
        "serviceCharacteristic": [
          {
            "name": "CPE Type",
            "valueType": "choice",
            "value": "Physical",
            "previousValue": ""
          },
          {
            "name": "Firewall Security",
            "valueType": "choice",
            "value": "Basic",
            "previousValue": ""
          },
          {
            "name": "Firewall coverage",
            "valueType": "choice",
            "value": "Premium(Up to 50 sites)",
            "previousValue": ""
          },
          {
            "name": "Administration Support",
            "valueType": "choice",
            "value": "Basic( Customer Managed)",
            "previousValue": ""
          }
        ],
        "serviceSpecification": {
          "id": "f99546ff07266010a7955b7e0ad300a8",
          "name": "Managed Firewall Service",
          "version": "",
          "internalVersion": "2",
          "internalId": "f99546ff07266010a7955b7e0ad300a8",
          "@type": "ServiceSpecificationRef"
        }
      },
      "state": "completed",
      "version": "1",
      "@type": "ServiceOrderItem"
    }
  ],
  "relatedParty": [
    {
      "id": "ffc68911c35420105252716b7d40dd55",
      "name": "Funco Intl",
      "@type": "RelatedParty",
      "@referredType": "Customer"
    },
    {
      "id": "eaf68911c35420105252716b7d40ddde",
      "name": "Sally Thomas",
      "@type": "RelatedParty",
      "@referredType": "CustomerContact"
    }
  ],
  "state": "completed",
  "version": "1",
  "@type": "ServiceOrder"
}

 

Service Order Is Created , Check for Response

 

RahulPriyadars_1-1683522441818.png

 

Actual Order

 

RahulPriyadars_2-1683522557432.png

 

We will approve the Order and then Send a PATCH for Service Order Update.

 

RahulPriyadars_4-1683522767695.png

 

JSON Payload is Updated for PATCH Simulation in JSON editor.

 

RahulPriyadars_3-1683522716500.png

 

Patch Order URL

PATCH https://dev76115.service-now.com/api/sn_ind_tmt_orm/serviceorder/{id}

 We will use the Sys_ID field in PATCH in rest api explorer.

RahulPriyadars_5-1683522846731.png

 

Patch Json Payload.

{
"id": "df483ea32fa22110d6d4debcf699b62a",
"ponr": "true",
"priority": 4,
"completionDate": "2024-11-12T06:19:17.000Z",
"expectedCompletionDate": "2020-06-26T13:07:40.000Z",
"orderDate": "2024-11-11T20:25:49.000Z",
"requestedCompletionDate": "2020-06-26T13:07:40.000Z",
"requestedStartDate": "2020-06-26T13:07:40.000Z",
"serviceOrderItem": [
{
"id": "0",
"ponr": "true",
"action": "add",
"service": {
"@type": "Service",
"state": "",
"serviceType": "cfs",
"serviceCharacteristic": [
{
"name": "CPE Type",
"valueType": "choice",
"value": "Virtual",
"previousValue": "Physical"
},
{
"name": "Firewall Security",
"valueType": "choice",
"value": "Basic",
"previousValue": ""
},
{
"name": "Firewall coverage",
"valueType": "choice",
"value": "Premium(Up to 50 sites)",
"previousValue": ""
},
{
"name": "Administration Support",
"valueType": "choice",
"value": "Basic( Customer Managed)",
"previousValue": ""
}
],
"serviceSpecification": {
"id": "f99546ff07266010a7955b7e0ad300a8",
"name": "Managed Firewall Service",
"version": "",
"internalVersion": "2",
"internalId": "f99546ff07266010a7955b7e0ad300a8",
"@type": "ServiceSpecificationRef"
}
},
"state": "new",
"version": "1",
"@type": "ServiceOrderItem"
}
],
"relatedParty": [
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "eaf68911c35420105252716b7d40ddde",
"name": "Sally Thomas",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"state": "new",
"version": "1",
"@type": "ServiceOrder",
"orderCurrency": "USD"
}

=================

Patch operations response

RahulPriyadars_6-1683522945198.png

 

This is how Service Order Looks Like . It Again went for Approval , Version is changed to 2.

 

RahulPriyadars_7-1683523034588.png

 

Value of Characteristics CPE Type is updated now .

 

RahulPriyadars_0-1683523178101.png

 

Now It can reapproved for fulfillment.

 

Hope This helps.

Regards

RP

Comments
PaulSylo
Tera Sage
Tera Sage

Thanks, Rahul. this will be useful for us. 

Juhi Batra1
Tera Contributor

Thanks Rahul for the detailed explanation.

MayankVineet
Tera Explorer

Thanks for this explanation

molayd
Mega Guru

Hi Rahul,

 

Any reason you're sending 'ponr' attribute as true? As per document, this PONR flag can only be set by flow.

 

Regards,

Molay

PaulSylo
Tera Sage
Tera Sage

Rahul has given as per his requirement  to test. but actually, if PONR ( point of no return ) to beset by Flow base don the order line and inflight chnages

komalsalunke
Tera Contributor

Can you please let me know how to call the same API in ServiceNow itself through scripting

komalsalunke
Tera Contributor

Hi,

Plugin is activated "sn_ind_tmt_orm" but these service order open API is missing.

Can you please let me know what I am missing

Version history
Last update:
‎05-07-2023 10:20 PM
Updated by:
Contributors