Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Change Order is not working through Patch API.

Gargichatterjee
Tera Contributor

Hi,

 

I am trying to do change order after completing the New order (Product Order). Following is the JSON I am using. In the response, it is showing 400 Bad Request. Can someone please throw some light, if I am doing something wrong here. We are using Yokohama Release version.

 

Below is the request and response for reference.

Request:

{

"orderCurrency": "USD",
"priority": 4,
"orderDate": "2025-09-25T23:52:08.000Z",
"channel": [
{
"id": "58ad5522c3702010df4773ce3640ddb2",
"name": "Agent assist"
}
],
"productOrderItem": [
{
"id": "4e0bf5dc2b983ed0dd5cf714f291bfdf",
"ponr": "true",
"quantity": 2,
"priority": 4,
"action": "change",
"itemPrice": [
{
"priceType": "recurring",
"recurringChargePeriod": "",
"price": {
"taxIncludedAmount": {
"unit": "USD",
"value": 0
}
}
},
{
"priceType": "nonRecurring",
"price": {
"taxIncludedAmount": {
"unit": "USD",
"value": 0
}
}
}
],
"product": {
"@type": "Product",
"productCharacteristic": [
{
"name": "Execute IP Plan",
"valueType": "choice",
"value": "Yes",
"previousValue": "No"
}
],
"productSpecification": {
"id": "54d6d6072b0876d0dd5cf714f291bfc9",
"name": "SD-WAN Service Package v5",
"version": "",
"internalVersion": "5",
"internalId": "54d6d6072b0876d0dd5cf714f291bfc9",
"@type": "ProductSpecificationRef"
}
},
"productOffering": {
"id": "0f3e4edb2b8cb6d0dd5cf714f291bf79",
"name": "SD-WAN Bronze Promotion v5",
"version": "",
"internalVersion": "5",
"internalId": "0f3e4edb2b8cb6d0dd5cf714f291bf79"
},
"productOrderItemRelationship": [
{
"id": "de0b39dc2b983ed0dd5cf714f291bfb5",
"relationshipType": "HasChild"
},
{
"id": "5e0b39dc2b983ed0dd5cf714f291bfb4",
"relationshipType": "HasChild"
},
{
"id": "860b39dc2b983ed0dd5cf714f291bfb3",
"relationshipType": "HasChild"
}
],
"state": "completed",
"version": "1",
"@type": "ProductOrderItem"
}
],
"relatedParty": [
{
"id": "86837a386f0331003b3c498f5d3ee4ca",
"name": "Boxeo",
"@type": "RelatedParty",
"@referredType": "Customer"
},
{
"id": "ddce70866f9331003b3c498f5d3ee417",
"name": "George Warren",
"@type": "RelatedParty",
"@referredType": "CustomerContact"
}
],
"state": "in_progress",
"version": "1",
"@type": "ProductOrder"
}

 

Response:

{
  "code": 1,
  "reason": "Invalid payload: Order creation failed",
  "message": "Invalid payload: Order creation failed",
  "details": [
    {
      "message": "PONR is reached for the order. Cannot accept anymore changes.",
      "datapath": ""
    }
  ]
}
Thanks,
Gargi Chatterjee

 

6 REPLIES 6

MACD --> Move, Add, Change, Disconnect

Kailash Bhange
Kilo Sage

@Gargichatterjee 
Please take a look at below now university course where you will find all use-case demo's. This has helped us as well in the past.

 

https://learning.servicenow.com/lxp/en/customer-service-management/sales-and-order-management-enable...