TMF622 payload example (Change)

bmedic
Tera Contributor

Hi,

 

Instance info:

Build name: Xanadu
Build date: 02-11-2025_1733

 

I am trying to create a payload for the MACD scenario, where I am trying to update/change the Product Inventory. the payload I have created is pretending to be sent from an external system, I am using the External IDs. With a similar one, I have successfully created the new provide, but when trying a "change" action, I am getting the following message:

{
  "code": 23,
  "reason": "Invalid body field",
  "message": "Invalid body field",
  "details": [
    {
      "message": "Invalid payload: Product Inventory does not exist",
      "datapath": "/productOrderItem[0]/product/"
    }
  ]
}

But in the instance, I can find both, the External Product Inventory and Product Inventory records, with correct External Id values.

I have tried using the Create Order (POST) and Patch Order (PATCH) methods, but the result is the same.

Additionally, what I discovered in the documentation, is the following:

"External id to map to the product inventory. Data type: String, Table/field updated: sn_ind_tmt_orm_order_line_item/external_inventory_id and sn_prd_invt_product_inventory/sn_prd_invt_external_id.

The sn_ind_tmt_orm_order_line_item/external_inventory_id does not exist on my instance.

I have attached the payload I am working with.

 

Can someone instruct me on how the payload should look, or why am I getting this "Product Inventory does not exist message"?

 

Thanks in advance for the help.

@SrdanMatijevic 

1 ACCEPTED SOLUTION

Ok, great. can you try to set the value of your productorderitem.product.id same value as your externalproductInventoryId

"externalProductInventory": [
{"externalProductInventoryId": "ProductInventorySIP"}
],
"product": {
"id": "ProductInventorySIP"

 

View solution in original post

6 REPLIES 6

AFAIK, the PI state should be "Active", for this to happen the state of the original order/order line items where the PI is created from should be Complete and Closed Complete.

 

Try to manually update them. The PI state will automatically set to "Active".



bmedic
Tera Contributor

I sorted this out. was missing 

"revisionOperation":""