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

ShashankInamdar
ServiceNow Employee
ServiceNow Employee

DYK (Did You Know) is a series of articles that introduces simple and basic concepts of the working of ServiceNow TMT Applications.

 

Application: Order Management

Release: All applicable

 

Order Management application is Catalog driven. Typical set of steps followed at any implementation are:

[1] Design & Construct the Catalog model via Catalog Manager

[2] Design & Configure the Orchestration subflows via Flow Designer

[3] Configure the Subflow invocation conditions via Decision Tables

 

Once this is done, we are ready to test the configuration by submitting Orders.

Order Management accepts orders via TMF APIs (622 – Product Orders or 641 – Service Orders) or via Agent Workspace (UI driven).

 

The design-build-test is an iterative process, and we end up submitting a lot of orders.

The most efficient way of submitting an order is to submit this via an API, but often a challenge faced by folks is ‘how to construct the API payload’ or ‘it is cumbersome to create a TMF API payload’.

 

This article suggests a simple way of solving this problem, that hopefully saves time for you.

 

Step 1: Once the initial set up is done, create an order via the Agent workspace and submit it.

Optional: Go ahead and complete the fulfilment tasks to complete the Order – but for the purposes of this article it is not required.

 

Step 2: Get the Sys Id (sys_id) of the Order that was submitted.

 

ShashankInamdar_0-1694451364340.png

 

 

Step 3: Navigate to All > REST API Explorer

 

ShashankInamdar_1-1694451364349.png

 

 

Step 4: On the REST API Explorer, select:

 

Namespace = sn_ind_tmt_orm

API Name = Product Order Open API or Service Order Open API (subject to payload you need)

API version = latest

 

Select the API – ‘Get Product Order’ or ‘Get Service Order’

 

ShashankInamdar_2-1694451364352.png

 

 

This is the GET method supported for the TMF622/TMF641 API.

Notice the URL formed on the right, such as –

 

GET https://<yourinstance>.service-now.com/api/sn_ind_tmt_orm/order/productOrder/{id}

 

 

Step 5: Under Prepare request, key in the Sys Id of the order that was fetched in Step 2 and hit the Send button at the bottom.

 

ShashankInamdar_3-1694451364358.png

 

 

For a valid Sys Id, the API returns a 200 OK response along with the response payload.

The response payload is a representation of the TMF622 (Product) or TMF641 (Service Order).

 

ShashankInamdar_4-1694451364375.png

 

 

Step 6: Copy the response body from Step 5, view it in your choice of json viewer/editor.

Edit the payload as necessary – such as for different characteristic values, Account/Contact/Location information etc.

 

Note: Ensure the Requested Start/Completion dates follow the business rules.

Step 7: To submit an order using this payload, either use a REST client such as Postman or from the REST API Explorer choose the API ‘Create Order (POST)’ and paste the payload under the Request Body under the Raw tab.

 

ShashankInamdar_5-1694451364383.png

 

 

Note: When using Create Order API, from the Utah release there is an option to set the value for the field ‘mode’.

When no value is set, the order is treated as a ‘sync’ order.

When the value is set as ‘sync’, the order is processed asynchronously.

(We will cover the Async mode in a separate article)

 

ShashankInamdar_6-1694451364386.png

 

 

On successful submission of the POST request, the API returns a 201 Created response.

The Response Body returns the Sys Id (id) of the newly created Order.

Check the Order from under Customer Orders.

 

Feel free to comment or provide feedback on this article. 

Mark this as Helpful 👍, if you found this of value and/or feel this will be useful for the wider community.

Comments
gourav_aggarwal
Tera Contributor

HI @ShashankInamdar ,

 

How do you integrate the Core Commerce Management layer in Service Now with the Production layer via TMF 641 interface. Currently, SN accepts only product order creation via TMF 622 or service order creation via TMF 641. TMF Forum guidelines suggest that TMF 622 product order creation in CCM layer should be followed by TMF 641 service order creation in Production layer but the request should come from the CCM layer itself. SN has provided decoupling between the two layers but did not provide a mechanism for integration between these two out of the box. Do we need to customize the CCM layer generating the OLIs to convert them into TMF 641 formats and then submit Create Service Order Requests? How will product inventory sync up between customer orders (Order Type: Product) and Customer Orders (Order Type: Service)?

 

A different solution provided by you in one of the posts mentions the use of backend Table APIs or doing service order enrichment manually. Manual is not feasible as we are trying to automate Inflight Supplements for service attribute level changes but the service orders were never created via TMF 641 but only using TMF 622 through decomposition. Modifying backend tables is kind of a risky approach. Please suggest.

 

https://www.servicenow.com/community/telecom-forum/patching-a-domain-service-order-by-using-tmf622-a...

 

hodgy111
Tera Contributor

Users of this document please note. The sn_ind_tmt ones are deprecated now - the new ones are under sn_tmf_api by the look of it.

Version history
Last update:
‎09-11-2023 10:01 AM
Updated by:
Contributors