Item Fulfillment syncing

A custom flow is used to sync Item fulfillment from the Touchstone NetSuite account to the Warroad NetSuite account.

We have created 2 transaction searches in the Touchstone account. One to fetch the details of body fields of IF record and the other to fetch the item line fields of IF. The body field included search is fetched on the Export side and the item line field search is included on the Lookup. And also we provided a result mapping. On the Import side, we have provided a mapping.

screenshot of result mapping is 

The screenshot of Import mapping

After running the flow the error msg getting is 

Failed to create, update/transform record because You must have at least one valid line item for this transaction.
 
But in the import mapping if we give Warroad SO ID filed to Created From(InternaliD), IF will created in the destination account. But here need to consider the partial fulfillment too. So need to provide item line details in the mapping.
 
And also actually there are 2 items in the IF but in the preview of Import, it includes only 1 item.
 
0

Comments

11 comments
Date Votes
  • Rosemol Joe it looks like your lookup step is using the group by feature which then leaves you with an array within an array with you result mapping. In this case you could do a few things:

    • Not even use a lookup step and have everything exported on the first source step and use the group by feature there to group all the lines and header fields together. This would save you a lot of api calls to NetSuite and thus use less concurrency.
    • Keep what you have and put your result mapping to data.0 = lookupFields
    • Keep your result mapping as it is and just uncheck the group by function on the lookup step
    0
  • While running the flow now we are getting an error

    Failed to save record because Multi-location Inventory Error (MLI_LOCATION_REQUIRED): this transaction or its items must have locations.
     
    Mapping on the import side is:
     

    0
  • Rosemol Joe it looks like you don't have any mapping for location. You probably need to map location to header and/or lines.

    0
  • After providing the location, this error was solved.

    Now there is a new issue

    Here I have provided Replace all lines of packages as true.

    Actually under the package tab of Item fulfillment of the destination account. There should be only one 4.75 value in this. But an extra 4.75 is there. This value is populating automatically with all IBS values of all item fulfillment created

     

    0
  • Rosemol Joe do you have 2 items? Looks like you're using the same lookupField array for items as you are packages.

    0
  • No, now I am taking a Sales order with only 1 item of 5 quantity. The total package weight of these is 4.75. From this SO I am creating Item Fulfillment. During the creation OF IF, I consider only 3 items the package weight should be 2.85 and this is splited as 1.05 and 1.8 during the creation of IF in Touchstone. 

    After syncing in Warroad this becomes

    That total package weight of 5 quantity is displaying here

     

    Preview of Lookup is :

    {
      "page_of_records": [
        {
          "record": {
            "id": "16163440",
            "recordType": "itemfulfillment",
            "Item Name": "WR280 : WR280_NVY_XL",
            "Internal ID": "619723",
            "Quantity": "3",
            "eTail Order Line Id": "",
            "ShipHawk Shipping Cost": "",
            "Status": "Shipped",
            "Name": "WR280 : WR280_NVY_XL",
            "Weight Units": "lb",
            "Weight In Pounds": "1.05",
            "Tracking Number": "22",
            "dataURI": "https://4019420-sb1.app.netsuite.com/app/accounting/transactions/itemship.nl?id=16163440&compid=4019420_SB1"
          }
        },
        {
          "record": {
            "id": "16163440",
            "recordType": "itemfulfillment",
            "Item Name": "WR280 : WR280_NVY_XL",
            "Internal ID": "619723",
            "Quantity": "3",
            "eTail Order Line Id": "",
            "ShipHawk Shipping Cost": "",
            "Status": "Shipped",
            "Name": "WR280 : WR280_NVY_XL",
            "Weight Units": "lb",
            "Weight In Pounds": "1.8",
            "Tracking Number": "11",
            "dataURI": "https://4019420-sb1.app.netsuite.com/app/accounting/transactions/itemship.nl?id=16163440&compid=4019420_SB1"
          }
        }
      ]
    }

     

    Result mapping

     

     

    Import mapping provided

    0
  • Rosemol Joe I would debug the NetSuite connection and see what the request looks like when we are sending to NetSuite. If the request looks fine, maybe there is a workflow or script running in NetSuite to aggregate? If request is not fine and you do see a 3rd line going in the request, I would attempt to create a new IF import step in Celigo and switch it to use SuiteApp 1.0 prior to saving it. I'd like to see if it's a SS2.x issue.

    0
  • Actually, that extra added value is not in the log details.

    The log details:
    07/25/2023 12:00:45 pm    nlapi calls registered for $R    r = NRecord.transform({"fromType":"salesorder","fromId":5356,"toType":"itemfulfillment","defaultValues":{}});
    r.setValue({"fieldId":"memo","value":"JJ testQAJ11"});
    r.setValue({"fieldId":"trandate","value":"2023-07-25T07:00:00.000Z"});
    r.setValue({"fieldId":"custbody_programname","value":"Warroad"});
    r.setText({"fieldId":"shipstatus","text":"Shipped"});
    r.setText({"fieldId":"shipmethod","text":"UPS Mail Innovations"});
    r.setValue({"fieldId":"custbody_jj_if_from_touchstone","value":true});
    r.setValue({"fieldId":"custbody_3plshippingcost","value":"4"});
    r.setSublistValue({"sublistId":"item","fieldId":"itemreceive","line":0,"value":false});
    r.selectLineItem({"sublistId":"item","line":0});
    r.setSublistValue({"sublistId":"item","fieldId":"itemreceive","line":0,"value":true});
    r.setSublistValue({"sublistId":"item","fieldId":"itemname","line":0,"value":"WR280 : WR280_NVY_XL"});
    r.setSublistValue({"sublistId":"item","fieldId":"location","line":0,"value":"1"});
    r.setSublistValue({"sublistId":"item","fieldId":"quantity","line":0,"value":"4"});
    r.setSublistValue({"sublistId":"item","fieldId":"custcol_celigo_etail_order_line_id","line":0,"value":null});
    r.setSublistValue({"sublistId":"item","fieldId":"line","line":0,"value":"1"});
    r.insertLine({"sublistId":"package","line":0});
    r.setSublistValue({"sublistId":"package","fieldId":"packageweight","line":0,"value":"3.8"});
    r.setSublistValue({"sublistId":"package","fieldId":"packagetrackingnumber","line":0,"value":"8888"});
    r.save({"enableSourcing":false,"ignoreMandatoryFields":false});

    Here we are fetching only 3.8 as package weight by using search. And there is no 4.75 value. But after syncing 4.75 is displaying under LBS

     

    0
  • Rosemol Joe do you have any workflows or scripts running on the IF record within NetSuite? Can you test changing import to SS1?

    0
  • hi Tyler Lamparter

    There are no workflows or scripts on the IF record. 

    How we can change import to SS1? Could you provide the steps for doing that?

    I have added one extra field in the import mapping USE DYNAMIC MODE as True, to avoid that duplication problem of package weight and now we got an error:

    Failed to create, update/transform record because You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist. Tip: Please make sure that all the line items that you're trying to use exist on the record.

    0
  • Rosemol Joe make a new import step, under advanced change to SuiteApp 1.0 prior to saving it the first time, then remake the mappings and test it out.

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post