New OLI PATCH operation to existing customer order throws error message "Catalog not found"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2023 12:04 PM
Hi ,
In UTAH release i am trying to patch a new OLI to existing customer order but it gives error
{
"code": 23,
"reason": "Missing body field",
"message": "Missing body field",
"details": [
{
"message": "Catalog not found",
"datapath": "/productOrderItem[0]/product/productSpecification/"
}
]
}
Same patch operation works in sandiego version.
Tried to debug TMFValidationUtilOOB but could not find anything
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2023 07:05 AM
Here's the rectified json -
{
"productOrderItem": [
{
"id": "16497",
"quantity": 1,
"action": "add",
"product": {
"isBundle": false,
"@type": "Product",
"Productstate": "Active",
"productCharacteristic": [
{
"name": "billing_method",
"value": ""
},
{
"name": "default_gateway_IPv4_address",
"value": ""
},
{
"name": "input_bandwidth",
"value": ""
},
{
"name": "InterfaceName",
"value": ""
},
{
"name": "interface_name",
"value": ""
},
{
"name": "IPv4_address",
"value": ""
},
{
"name": "IPv4_addressing_mode",
"value": ""
},
{
"name": "IPv4_prefix",
"value": ""
},
{
"name": "IPv6_addressing_mode",
"value": ""
},
{
"name": "MTU",
"value": ""
},
{
"name": "output_bandwidth",
"value": ""
},
{
"name": "purpose",
"value": ""
},
{
"name": "UNI_ID",
"value": ""
},
{
"name": "VLAN_ID",
"value": ""
},
{
"name": "WAN_link_role",
"value": ""
},
{
"name": "WAN_link_type",
"value": ""
}
],
"productSpecification": {
"id": "562eeb1df7d2c1105ef541b84851e022",
"name": "WAN_UNI",
"version": "",
"@type": "ProductSpecificationRef"
}
},
"productOffering": {
"id": "75b3a322f73741905ef541b84851e0e3",
"name": "wan management"
},
"productOrderItemRelationship": [
{
"id": "00000013",
"relationshipType": "HasParent"
}
],
"@type": "ProductOrderItem"
}
],
"relatedParty": [
{
"id": "dc7dd926f7553d54a2ffeeb74851e091",
"name": "Musterfirma 49483_05-09-2022_10-03",
"@type": "RelatedParty",
"@referredType": "Customer"
}
]
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 02:19 AM
You have missed the comma '", " between version and type
"WAN_UNI","version","@type":"ProductSpecificationRef"}}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 09:25 AM - edited 10-03-2023 09:27 AM
Thanks for the payload
It worked in restAPIExplorer but gives 400 code error in script
example code below gives error
requestBody = '{"productOrderItem":[{"id":"16497","quantity":1,"action":"add","product":{"isBundle":false,"@type":"Product","Productstate":"Active","productCharacteristic":[{"name":"billing_method","value":""},{"name":"default_gateway_IPv4_address","value":""},{"name":"input_bandwidth","value":""},{"name":"InterfaceName","value":""},{"name":"interface_name","value":""},{"name":"IPv4_address","value":""},{"name":"IPv4_addressing_mode","value":""},{"name":"IPv4_prefix","value":""},{"name":"IPv6_addressing_mode","value":""},{"name":"MTU","value":""},{"name":"output_bandwidth","value":""},{"name":"purpose","value":""},{"name":"UNI_ID","value":""},{"name":"VLAN_ID","value":""},{"name":"WAN_link_role","value":""},{"name":"WAN_link_type","value":""}],"productSpecification":{"id":"562eeb1df7d2c1105ef541b84851e022","name":"WAN_UNI","version":"","@type":"ProductSpecificationRef"}},"productOffering":{"id":"75b3a322f73741905ef541b84851e0e3","name":"wan management"},"productOrderItemRelationship":[{"id":"00000013","relationshipType":"HasParent"}],"@type":"ProductOrderItem"}],"relatedParty":[{"id":"dc7dd926f7553d54a2ffeeb74851e091","name":"Musterfirma 49483_05-09-2022_10-03","@type":"RelatedParty","@referredType":"Customer"}]}';
var tmfProductOrderAPIUtil = new sn_ind_tmt_orm.TMFProductOrderAPIUtil();
var apiResponse = tmfProductOrderAPIUtil.processPatchOrder('b17d1d26f7553d54a2ffeeb74851e0a5',requestBody);
gs.info(apiResponse.status);
gs.info(JSON.stringify(apiResponse));
Error
x_tsm_extend (TSMEX_TsmExtenderFactory): TSMEX initialize: tsm_processor -> null
x_tsm_extend (TSMEX_TsmExtenderFactory): TSMEX _instantiate: ProductOrderExtensionOOB
Slow ACL baa8256753323010ec84ddeeff7b127e for the path record/sn_csm_om_order.*/read, time was: 65
x_tsm_pm_tc: 400 (sys.scripts extended logging)
x_tsm_pm_tc: {"status":"400","details":{"code":1,"reason":"Invalid payload: Order creation failed","message":"Invalid payload: Order creation failed","details":[{"message":"Cannot update the order in state: Revision in progress","datapath":""}]}} (sys.scripts extended logging)
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 09:31 AM - edited 10-03-2023 09:32 AM
Hi @Anshu_Anand_ ,
The error mentions -
Cannot update the order in state: Revision in progress
As such, it seems the order you are trying to PATCH already has an Inflight order submitted, but not yet Approved/Submitted.
You might want to navigate to the Order, Approve the Order, ensure the Order moves to 'In Progress' state and then try again.
Regards
Shashank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 10:21 AM
After approving the order ran the same script
got error
x_tsm_extend (TSMEX_TsmExtenderFactory): TSMEX initialize: tsm_processor -> null
x_tsm_extend (TSMEX_TsmExtenderFactory): TSMEX _instantiate: ProductOrderExtensionOOB
Slow ACL baa8256753323010ec84ddeeff7b127e for the path record/sn_csm_om_order.*/read, time was: 82
x_tsm_pm_rel (TSM_PM_REL_SiblingRelUtils): DEBUGstring from TSM_PM_REL_SiblingRelUtils.validatePostRequest : checking if relations are allowed (sys.scripts extended logging)
*** Script: 400
*** Script: {"status":"400","details":{"code":1,"reason":"Invalid payload: Order creation failed","message":"Invalid payload: Order creation failed","details":[{"message":"Invalid payload: Order creation failed","datapath":""}]}}
Anshu