TMF Customer order creation payload is throwing the error

SNowMExplorer
Mega Contributor
I am trying to create the customer order record from postman by sending the payload. But it is throwing the error like below. I want to know how to fix this issue. 
{
    "code"21,
    "reason""Invalid payload: Request body missing",
    "message""Invalid payload: Request body missing",
    "details": [
        {
            "message""A mandatory child product offering is missing for the parent product offering.",
            "datapath""/productOrderItem[0]/productOffering/"
        }
    ]
}
6 REPLIES 6

Sure here is the payload.

{
"id": "-1",
"orderCurrency": "USD",
"priority": 4,
"orderDate": "2025-06-02T05:21:04.000Z",
"channel": [
{
"id": "58ad5522c3702010df4773ce3640ddb2",
"name": "Agent assist"
}
],
"productOrderItem": [
{
"id": "-1",
"ponr": "false",
"quantity": 1,
"priority": 4,
"action": "add",
"itemPrice": [
{
"priceType": "recurring",
"recurringChargePeriod": "",
"price": {
"taxIncludedAmount": {
"unit": "USD",
"value": 0
}
}
},
{
"priceType": "nonRecurring",
"price": {
"taxIncludedAmount": {
"unit": "USD",
"value": 0
}
}
}
],
"product": {
"@type": "Product",
"productCharacteristic": [
{
"name": "Pack",
"valueType": "choice",
"value": "",
"previousValue": ""
}
],
"productSpecification": {
"id": "3d7ba1d21bbc2610f783dd32b24bcb57",
"name": "Fiber",
"version": "",
"internalVersion": "1",
"internalId": "3d7ba1d21bbc2610f783dd32b24bcb57",
"@type": "ProductSpecificationRef"
}
},
"productOffering": {
"id": "527c61561bbc2610f783dd32b24bcb8f",
"name": "Fibre 900 VoIP (FTTP-CF)",
"version": "",
"internalVersion": "1",
"internalId": "527c61561bbc2610f783dd32b24bcb8f"
},
"state": "in_progress",
"version": "1",
"@type": "ProductOrderItem"
}
],
"relatedParty": [
{
"id": "ffc68911c35420105252716b7d40dd55",
"name": "Funco Intl",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"state": "in_progress",
"version": "1",
"@type": "ProductOrder"
}

David R_
Tera Contributor

As a workaround while waiting for a fix, it looks like the issue starts on line 695 of the ProductOrderExtensionOOB script include:

DavidR__0-1749833080416.png

 

mandatoryChildIds is an array, so gs.nil() is returning false even though the array may be empty.
 
Changing lines 695 and 698 to check the array lengths would be the fix, but since this file is readonly, overriding the getMandatoryChildIds() method in the ProductOrderProcessor script include to return null if the array length is zero fixed the issue for me:
 
DavidR__1-1749833365999.png