“Ignore existing records” still blocks re-import after deletion?

Hello,

I’m running into an issue with a flow where I find a NetSuite Item receipt to delete and then import a new item receipt using the same record data.

Problem:
Even after I successfully delete the record, the subsequent reimport is skipped because I believe Celigo thinks the record still exists?

This is due to my “how can we find existing records” logic which is setup as so :

This lookup looks for a custom header field on NS item receipts that is always a unique value.

I’ve also tested with the operator set to “is” instead of “equal to”, but I see the same behavior — the record is still considered to exist and gets ignored, even though we just deleted the record with that unique value that we’re considering on it. (I have seen this same behavior both on test runs and real flow executions)

My response mapping for the Import has the follow test run results even when there is a previous successful deletion (finds the ns internal id of the IR w 47811 as the biorxinventoryid, even though we should have just deleted)

Things I’ve considered:

  • Possible NetSuite behavior where “delete” isn’t a true hard delete (maybe it’s soft-deleted/inactive but still indexed).

  • A timing/indexing delay between delete and re-insert.

  • Potential data type mismatch: custbody_biorx_inventoryid might be text vs. numeric, and my BioRxInventoryID variable may not be matching cleanly. However, i’ve seen this behavior when changing the comparison to both “equal to” and “is.”

Sample Output after the delete step :

{
"record": {
"PurchaseOrderNumber": "PHC000237",
"NSItemReceiptID": 1072776,
"BioRxInventoryID": 47811,
"Items": [
{
"itemid": 18995,
"linelocation": null,
"quantity": 18,
"receiveddate": "2025-09-01T00:00:00.000Z",
"receiptid": 12
}
],
"ItemIdComparison": "20024",
"DeletedNsIRId": "1234567890",
"DeletionNSImportError":
}
}

I should be using this output to create a new updated version of this Item Receipt with slightly modified data (in this case its a new item), but can’t as it gets ignored.

Any advice on how to make sure my new record gets re-imported right after delete would be really appreciated.

Thanks!

I know "is" should be used when the NetSuite field is a text type. You can verify what it should be by making a saved search in NetSuite and seeing what option you get.

As for troubleshooting, you should enable connection debug logs and see what record is returning from the lookup criteria to see what's going on.

Hey Tyler,

Thanks for the troubleshooting suggestion.

After running a few debug tests I can see that NetSuite is still finding the “deleted” record even after my delete step. Potentially there is some type of “soft-delete” going on where because the reimport is immediately after the deletion, Celigo may not realize it’s deleted yet.

I tried adding a custom checkbox and updating it on the record I’m deleting (to true), and then added criteria to my import filter for that checkbox to be false

This unfortunately also did not stop Celigo from finding and ignoring the record that now should have been updated and deleted.

So you added an import step before delete step to update the field to be marked for deletion and then tried to reference that flag in the downstream criteria? Seems like that should work. Should the is be to 'F' instead of 'false'?

Yeah that was my thinking, I tried is ‘F’ & ‘false’, but running into the same issue with both options.

I’ve therefore opened a ticket with support.

Can you join office hours next week and we can check it out?

If you turn on debugging on the NetSuite connection you can verify on which records the delete and the Create/Ignore steps are matching on.

It will log a line like this for both steps to show which record it is deleting, and which record it found as part of the ‘ignore existing records‘ lookup

12/09/2025 09:35:18 a5x2fe1x30394097bebx425xb925x82a import 6xcxcxe0bb4xf0db55xd9x16
12/09/2025 09:35:18	importing record 0	{"nlobjRecordType":"inventoryitem","nlobjFieldIds":{"internalid":22},"nlobjSublistIds":{}}

If both imports find the same internalid something fishy is going on, if they have different ids the filter criteria aren’t working.

For sure, going to keep troubleshooting but I’ll be sure to join if the issue is still persisting by then.

Hi Bas,

Yes I believe it is finding the same internal id unfortunately :

Log from delete step :

"operation":"delete","internalIdLookup":{"expression":"["internalid","is","{{{NSItemReceiptID}}}"]"},"mapping":{"fields":[{"generate":"internalid","lookupName":"idLookup-update-id-1757692915751"}],"lists":,"lookups":[{"name":"idLookup-update-id-1757692915751","recordType":"itemreceipt","resultField":"internalid","allowFailures":false,"expression":"["internalid","is","{{{NSItemReceiptID}}}"]","_isOperationalMapping":true,"_importOperation":"delete"}]},"lookups":[{"name":"idLookup-update-id-1757692915751","recordType":"itemreceipt","resultField":"internalid","allowFailures":false,"expression":"["internalid","is","{{{NSItemReceiptID}}}"]","_isOperationalMapping":true,"_importOperation":"delete"}],"ignoreExisting":false,"ignoreMissing":false},"captureReqAndResData":true,"testRun":true,"data":[{"internalid":1072778}],

Ignore log :

09/12/2025 9:02:10 AM ignoring current record as ignoreExistingRecordsOnAdd is true Found a record with id 1072778

I don’t know if this will work for you like it did for me, but I used BRANCHING. I needed a way to write to an individual record in one case, but for every record in another case. I was having a similar issue with “ignore duplicates”. My solution was to branch off the condition of the individual record, and on that branch, duplicates were not at issue. I expected a duplicate. I wanted the records updated, no matter what.