TMF 622 Product Order Patch API Validation

Aneesh-D
Tera Guru
Tera Guru

Use case:

step 1: Create a product order using TMF622 product order API. Order created successfully with status in "New"
step 2: Customer Order Approval validation failed due to specification miss match (product offering version and product specification version were not matching to the configuration).

step 3: attempted a modification on the order using 622 Patch API. This operation got failed with below error message.

 

What is the logic of failing a patch request when an order is in NEW status? 

 

Response

400 Bad Request
 
Response Body
{
  "code": 1,
  "reason": "Invalid payload: Order creation failed",
  "message": "Invalid payload: Order creation failed",
  "details": [
    {
      "message": "Cannot update the order in state: New",
      "datapath": ""
    }
  ]
}
14 REPLIES 14

Hi @Aneesh-D ,
oh, okey, but I just read the page that I mentioned and I just thought that changing order(patching order)  seems only allowed in "Revision in Progress" stage...

Hi everyone,
But I don't have confidence for my thought,,, does anyone have any ideas about this topic?

Tom Schnarr
ServiceNow Employee
ServiceNow Employee

This is a perfectly valid request.  Thank you for the suggestion - i have had it added to the Sales and Order Management feature backlog.  

Aneesh-D
Tera Guru
Tera Guru

@Tom Schaller - When is this likely to come? If Customer order approval fails there is no way to patch it from through API from upstream, rather forcing the upstream to send a corrected Create/Post method. 
Seems like something fundamental is missing. Please suggest if there is any way to work around this?

 

Thanks,

Aneesh D

Abhi53
Tera Contributor

Can anyone share a sample payload for the patch operation for prod order ?

Aneesh-D
Tera Guru
Tera Guru

@Abhi53 - Patch payload schema is same as that of create order itself. Only difference is instead of POST method you will use PATCH method.

So if you wanted to change the value of a characteristic, then you can supply that new value through PATCH method.

Are you looking for payload for any specific  use case?