Match NetSuite SO# and INV# to Shopify Order #

What started this is that I am getting duplicate INV number in NetSuite when several transactions are imported at the same time. The setting in NetSuite can be set to ‘Warn and Block’ when there are duplicate transactions numbers but that seems like it’s going to cause a cascade of issues.

Instead is there some reason that we cannot take the order number from Shopify and add an ‘SO’ prefix for sales orders and ‘INV’ for invoices? This would give each transaction a tie back to Shopify that the user can readily identify and prevent the duplication upon import with multiple transactions.
Sometimes there’s a reason behind the scenes and before I spend a bunch of time modding the flows in sandbox to test, I’d like to know if I’m just spinning my wheels here.

Is this for the integration app?

Yes. I’m hesitant to modify the flows that were provided by Celigo since that can affect future updates.

Hi John would you please help in sharing more details like the flow name that ended up creating duplicate INV number. We have duplicate check in place so will need to understand the scenario better here.

The only flow I am aware of that creates invoices is this one:

In NetSuite I can see this:

It’s not every single time, however it is consistent. When there are several invoices at the same time (even though the sales orders are different) they will get the same INV number. In the example above this is also not customer dependent, as the first invoice is for a different customer. We can see this regularly because we have the batch time set to the lowest, 15 minutes, between runs when the flow doesn’t have a hook.

Invoice numbers are assigned by NetSuite during transaction processing. When Auto Generated Numbers are not enforced, duplicate invoice numbers can occur, especially when multiple transactions are created or processed simultaneously.
Please confirm whether you are using Auto Generated Numbers and that “Allow Override” under: Setup > Company > Auto Generated Numbers > Invoice is disabled.

If following this the issue is not addressed you may need to create a support ticket to analyze further. Thanks.

Nilesh, we import transactions from other systems and want to be able to override the invoice number with the number from the original system.

I reviewed the mapping and saw that we had already modified the default query and map at the time of implementation, so I went ahead and added the logic for it.

By testing to be sure that the Shopify Order Number was recorded and isn’t null, we can use the autonumbering or assign the value to the externalid which will force the INV # in NetSuite to match Shopify.

The mapping for sales orders could also be updated with this logic so that the SO# would match Shopify. The only time this doesn’t work on the Sales Order side is when the SO starts in NetSuite instead of Shopify. At that point, the SO has to be an autonumber even though the Shopify Order Number will be updated when synchronized.

Sorry I left off that the mapping needs to go to ‘Invoice #’ too.