TMF 622 Product Order API: Issue with storying of External ID

Aneesh-D
Tera Guru
Tera Guru

Noticed an issue in storying the external order identifier for customer order.

 

Tried both below ways in the request body:

 

1) "externalId": "123465",
 
2) 
  "externalId": [
    {
      "owner": "TMF",
      "externalIdentifierType": "POnumber",
      "@type": "ExternalIdentifier",
      "id": "123456"
    }
  ],
 
In both case, the order creation is successful, however a subsequent get call based on the table API for customer order shows the external_id as 
 
"org.mozilla.javascript.NativeArray@e3a8e"
AneeshD_0-1719508727538.png

 

 
4 REPLIES 4

aizawaken
Tera Guru

HI @Aneesh-D ,
I have just tried to call TMF OpenAPI 622 (Create Order) existing in Servicenow as attached screen capture.
I just call from PostMan, and target Servicenow instance is my PDI.

"PO-456" is set as "externalId" in my requestBody, and I could see the same string in the responseBody after succeeded to create a customer order.
This way is same as your (1), am I correct?

I still don't know the reasons why you got a string : "org.mozilla.javascript.NativeArray@e3a8e" in your responseBody, but just FYI, it seems that I got a correct response,,,

Hope this would be helpful for your question,,,

Aneesh-D
Tera Guru
Tera Guru

Hello @aizawaken - you are just almost there!!

When you do a post method, the response basically comes back with whatever payload you submitted + the id (sys id of the record that got generated). 
eg: request payload:

 

AneeshD_1-1721335928089.png

response to post request:

AneeshD_0-1721335843639.png

but the issue here is: What gets persisted in the system against the created order.

 

So if you try a get call on this resource instance, it should come back if persisted. which do not happen in this case!.

 

So I tried on the table API, to see if its getting stored in the table. That's when we get this error mentioned in the initial post.

 

 

Hi @Aneesh-D ,
Oh, I got your point, and I also tried to call TMF Open API 622 by GET method, and I got the product order information without "external_id" as below. yes, you are right.

aizawaken_1-1721652979713.png

 

Then, I checked the exact information of Customer Order as below, and I confirmed that the external_id was stored correctly,,, very strange...

 

aizawaken_0-1721652883871.png

 

But, I found that there is no external_id field in Product Order table as below!

aizawaken_2-1721653318932.png

 

There exists an "external_id" field in Customer Order table (sn_ind_tmt_orm_order).

There is no "external_id" field in Product Order table(sn_ind_tmt_orm_product_order).

When we post the "TMF OpenAPI 622", and new order is created with ExternalId, the value would be stored into CustomerOrder.ExternalId field, I think.
So, when we get the "TMF OpenAPI 622" and check the responce body, it is not possible for us to get the value of External Id , because External Id is not exist in ProductOrder table,,,

What do you think of this thought??

 

Thank you! 

Let me add one point:


In the response body of TMF OpenAPI 622 - POST, we found the external_id. It is because the response is generated from the CustomerOrder not from the ProductOrder,,, I just imagine,,,