Hello, i’m trying to transform a sales order to it...
# suitetalkapi
r
Hello, i’m trying to transform a sales order to item fulfillment through the
salesOrder/{salesOrderId}/!transform/itemFulfillment
endpoint. And i’m getting this error : “*you must have at least one valid line item for this transaction”.* I’m passing the correct location, orderLine and the item, which has available quantity. Any ideas of what could be the problem. I will the append the json im using in the replies to this message.
Copy code
{
  "tranDate": "2023-07-03",
  "memo": "item fulfillment test",
  "shippingCost": 2000,
  "orderType": "string",
  "createdDate": "2023-07-03T21:46:48.812Z",
  "shipOverride": false,
  "shipStatus": {
    "id": "C"
  },
  "status": {
    "id": "Enviado"
  },
  "exchangeRate": 1,
  "shipCountry": {
    "id": "CL"
  },
  "item": {
    "items": [
      {
        "itemReceive": true,
        "custcol_sk_sku": "7500435113465",
        "itemUnitPrice": 1000,
        "lineEntity": 1,
        "line": 1,
        "amount": 3000,
        "quantity": 3,
        "orderLine": 1,
        "item": {
          "externalId": "7500435113465"
        },
        "location": {
          "id": "113"
        },
        "inventoryLocation": {
          "id": "113"
        },
        "inventoryDetail": {
          "quantity": 3,
          "item": {
            "externalId": "7500435113465"
          },
          "location": {
            "id": "113"
          },
          "inventoryLocation": {
            "id": "113"
          },
          "inventoryAssignment": {
            "items": [
              {
                "quantity": 3,
                "inventoryStatus": {
                  "id": "1"
                }
              }
            ]
          }
        }
      }
    ]
  },
  "entity": {
    "id": "1534"
  },
  "location": {
    "id": "113"
  },
  "inventoryLocation": {
    "id": "113"
  },
  "shipMethod": {
    "id": "5764"
  },
  "subsidiary": {
    "id": "5"
  }
}
e
Try it on the UI first to see if it will try to fulfill the SO.
r
it does, i can fulfill it from the ui
b
it looks like you have line level inventory location
you can double check by fulfilling in the ui and checking the query parameters of the url
r
ok, thanks. this is the url
Copy code
<http://app.netsuite.com/app/accounting/transactions/itemship.nl?id=141139&e=T&transform=salesord&memdoc=0&whence=&inventorylocation=113|app.netsuite.com/app/accounting/transactions/itemship.nl?id=141139&e=T&transform=salesord&memdoc=0&whence=&inventorylocation=113>
b
you can try using the same inventorylocation query parameter in your rest request, though last time i checked it wasnt supported
r
yes its seems like it’s not supported, i tried it, but didn’t work. it doesnt appear in the docs either