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

aizawaken
Tera Guru

Hi Aneesh-D,

I just take a look at the page related to customer order state , and it is described : "New : Customer order capture process is complete and the entire order is awaiting approval by the fulfillment manager."
I just imagine that new state is still waiting for the approval of fulfillment manager and that's the reasons why updating order information is not allowed in this status...
"In Progress" or "Revision in progress" state might be allowed?? 

What do you think of this?
Thanks!

 

 

That’s precisely the point. It’s still waiting for approval and should have allowed for modification. If it was approved and progressed beyond PONR, then should not be allowed to cancel the order. 
Not able to think of a business reason for failing the patch request.

aizawaken
Tera Guru

OrderNotAcknowledged.jpg

I got you point, thank for your explanation.
Honestly, I don't know the business reasons why patch request is not allowed in New state...


Before the order is acknowledged, what you can do is only "Reject" in the status definition in both ServiceNow and TM Forum, i guess. So, you should "Reject an order" in step 2 (you mentioned in your first message) instead of patching an order. 
What do you think of this idea?

Aneesh-D
Tera Guru
Tera Guru

Hello @aizawaken - the reason for patch is not necessarily to move the order stage from new to next one. Rather update/correct data value on the order. So, I am still not convinced on this error.