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

Abhi53
Tera Contributor

Thanks for your kind response. I am looking out for order cancellation updates  as well as characteristics values update & new order line items additions via Patch operation , please suggest?

If you want to cancel the entire product order:
use the "Cancel Product Order" API with below payload. please replace the id with the sys_id/external_id of your Customer order 

AneeshD_0-1752165800191.png

 

{
  "cancellationReason": "Duplicate order",
  "requestedCancellationDate": "2019-04-30T12:56:21.931Z",
  "productOrder": {
    "id": "a22975c4c3afd6104005633599013102", 
       "@referredType": "ProductOrder"
  },
  "@type": "CancelProductorder"
}

 
For charac change: you can use the same payload as that of create (please note that you cannot change all fields of order, so be careful with the fields)
eg: I am giving only the snippet of product characteristic here. please use the complete schema as that of create order. 

AneeshD_1-1752166938621.png

 

"product": {
    "@type": "Product",
    "productCharacteristic": [
    {
        "name": "Bandwidth",
        "value": "New value"
    }
]

  
If you want to remove/cancel one specific OrderLineItem and Add a new on as part of amend the use 
revisionOperation = cancel for the item you want to cancel.

 

AneeshD_3-1752168273167.png

 

 

Abhi53
Tera Contributor

Thanks for the detailed response with resolution.

Having another query if you could assist  - 

How can we store the below shown payload data for Service Subscription , Customer Facing Service  & Resource Facing Service details in OTB tables for the inventory details corresponding the the product orders  - 



[
{
"@type": "ServiceSubscription",
"accessContractID": "xxxxx",
"preferredFaultClearence": "false",
"customerNumber": "xxxx",
"serviceLevel": "Standard(24h)",
"subscriptionID": "000000000",
"toNumber": "0000000",
"id": "838a",
"href": "838a",
"@baseType": "Service",
"category": "Subscription",
"name": "Play",
"serviceType": "Play",
"startDate": "2021-02-17",
"state": "active",
"serviceCharacteristic": [
{
"name": "subscriberID",
"valueType": "string",
"value": "186bd65862a9"
},
{
"name": "subscriber.name",
"valueType": "string",
"value": "GigaSubscriber"
},
{
"name": "subscriber.state",
"valueType": "string",
"value": "active"
},
{
"name": "subscriber.subscriberID",
"valueType": "string",
"value": "4246-86b4-186bd65862a9"
},
{
"name": "subscriber.type",
"valueType": "string",
"value": "Subscriber"
},
{
"name": "subscription.ID",
"valueType": "string",
"value": "478d-a451-cc34ef8c838a"
},
{
"name": "subscription.type",
"valueType": "string",
"value": "Subscription"
}
],
"serviceRelationship": [
{
"relationshipType": "isChildOf",
"service": {
"id": "3bbe",
"href": "47b0-bf74-3e8b85c53bbe",
"name": "Giga",
"@type": "ServiceCFS",
"@baseType": "Service"
}
},
{
"relationshipType": "isChildOf",
"service": {
"id": "3751aec9",
"href": "5103751aec9",
"name": "IP_Access",
"@type": "ServiceCFS",
"@baseType": "Service"
}
}
]
}
]

{
"@type": "ServiceCFS",
"id": "38b1efd315",
"@baseType": "Service",
"category": "CFS",
"name": "Giga",
"serviceType": "Ansch",
"state": "active",
"serviceCharacteristic": [
{
"name": "Code",
"valueType": "string",
"value": "DTAG"
},
{
"name": "ID",
"valueType": "string",
"value": "S1J"
},
{
"name": "Bandwidth",
"valueType": "number",
"value": "00000"
},
{
"name": "lineID",
"valueType": "string",
"value": "000000"
},
{
"name": "variante",
"valueType": "string",
"value": "DTAG"
},
{
"name": "Bandwidth",
"valueType": "number",
"value": "0000"
},
{
"name": "technology",
"valueType": "string",
"value": "TEST"
}
],
"serviceRelationship": [
{
"relationshipType": "isParentOf",
"service": {
"id": "810001300166",
"href": "10001300166",
"name": "PlayWS",
"@type": "ServiceSubscription",
"@baseType": "Service"
}
}
],
"supportingResource": [
{
"id": "/2342",
"href": "2342",
"name": "RFSAccessLine",
"@type": "ResourceAccessLine",
"@baseType": "Resource"
}
],
"supportingService": [
{
"id": "342",
"href": "342",
"name": "RFSAccessLine",
"@type": "ServiceRFS",
"@baseType": "Service"
}
]
}


------------------------------------

{
"@type": "ServiceCFS",
"id": "751aec9",
"href": "103751aec9",
"@baseType": "Service",
"category": "CFS",
"name": "Access",
"serviceType": "IP_Access",
"state": "active",
"serviceCharacteristic": [
{
"name": "IPAccess",
"valueType": "string",
"value": "800"
},
{
"name": "IPAccess.dnsProfile",
"valueType": "string",
"value": "DNSEP"
},
{
"name": "IPAccess",
"valueType": "boolean",
"value": "false"
},
{
"name": "IPAccess",
"valueType": "boolean",
"value": "false"
},
{
"name": "IPAccess",
"valueType": "integer",
"value": "3"
},
{
"name": "IPAccess.maxDownspeed",
"valueType": "string",
"value": "550000"
},
{
"name": "IPAccess",
"valueType": "string",
"value": "0"
},
{
"name": "IPAccess.maxUpspeed",
"valueType": "string",
"value": "120000"
},
{
"name": "IPAccess",
"valueType": "integer",
"value": "1"
},
{
"name": "IPAcce",
"valueType": "number",
"value": "450000"
},
{
"name": "pstreamBandwidth",
"valueType": "number",
"value": "100000"
},
{
"name": "IPAccess.rechtAufFesteIPAdresse",
"valueType": "boolean",
"value": "false"
},
{
"name": "IPAccess.subscriberNumber",
"valueType": "string",
"value": "37890"
},
{
"name": "IPAccess.voipIsPresent",
"valueType": "boolean",
"value": "true"
}
],
"serviceRelationship": [
{
"relationshipType": "isParentOf",
"service": {
"id": "c838a",
"href": "838a",
"name": "Giga",
"@type": "ServiceSubscription",
"@baseType": "Service"
}
}
]
}


-----------------------------------

{
"@type": "ServiceRFS",
"id": "2342",
"href": "2342",
"@baseType": "Service",
"category": "RFS",
"name": "AccessLine",
"state": "ASSIGNED",
"serviceCharacteristic": [
{
"name": "AccessLine.homeID",
"valueType": "string",
"value": "05JV"
},
{
"name": "AccessLine.lineID",
"valueType": "string",
"value": "000000"
},
{
"name": "AccessLine.productionPlatform",
"valueType": "string",
"value": "OLT"
},
{
"name": "AccessLine.technology",
"valueType": "string",
"value": "GPON"
}
]
}

Abhi53
Tera Contributor

Any expert advice on it ?

@Abhi53 - Not really sure on what you are trying to achieve.  But from the pyaload, it looks like you to model  Subscription service "Play"- has child CFS service "Giga" which need a CFS Access and then Accessline RFS & Resource. [not sure if am fully correct]

Now to answer you, you cannot just load such payload into platform.  CFS / RFS Services and Resource records are created as part of Order Decomposition and not via Payload processing through Order APIs.
You have to create your Service Specification in such way that follows your service hierarchy.
something similar like below:
 

AneeshD_0-1753196365728.png