I'm encountering a frustrating problem. To give a bit of context, we are in a OneWorld environment and one of our subsidiaries has been running Netsuite for 2 years. We recently migrated our HQ (located in Switzerland, and shipping from Switzerland, France and Ex-Factory) to Netsuite.
The tax configuration is as follows. When we enter Sales Orders for Switzerland, then it uses the Swiss VAT. When we ship to the EU, then it uses French VAT (as our warehouse is located in France).
All the nexuses and Tax Items are correctly configured, and have been looked through multiple times by our consultants.
The issue we encounter is when we import our Sales Orders from our B2B sales platform, using SOAP Web Services. We never set the tax code in the import mechanic as we always use the customer's default tax code. One week ago, we made a change in our import script (using the Ruby netsuite gem) to use multi-location sales orders. We never changed anything in the tax configuration during that update, and suddenly the SO are not imported anymore and always return the following error message: Invalid taxcode reference key XXXXX for subsidiary X.
I'd like to have some insights on that error, as it completely blocks our business.
<env:Envelope xmlns:actSched="urn:scheduling_2018_2.activities.webservices.netsuite.com" xmlns:tranEmp="urn:employees_2018_2.transactions.webservices.netsuite.com" xmlns:tranCust="urn:customers_2018_2.transactions.webservices.netsuite.com" xmlns:platformCore="urn:core_2018_2.platform.webservices.netsuite.com" xmlns:listMkt="urn:marketing_2018_2.lists.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:commGeneral="urn:communication_2018_2.general.webservices.netsuite.com" xmlns:listAcct="urn:accounting_2018_2.lists.webservices.netsuite.com" xmlns:listRel="urn:relationships_2018_2.lists.webservices.netsuite.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:platformCommon="urn:common_2018_2.platform.webservices.netsuite.com" xmlns:listSupport="urn:support_2018_2.lists.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tranPurch="urn:purchases_2018_2.transactions.webservices.netsuite.com" xmlns:tranGeneral="urn:general_2018_2.transactions.webservices.netsuite.com" xmlns:tranInvt="urn:inventory_2018_2.transactions.webservices.netsuite.com" xmlns:listWebsite="urn:website_2018_2.lists.webservices.netsuite.com" xmlns:fileCabinet="urn:filecabinet_2018_2.documents.webservices.netsuite.com" xmlns:platformMsgs="urn:messages_2018_2.platform.webservices.netsuite.com" xmlns:setupCustom="urn:customization_2018_2.setup.webservices.netsuite.com" xmlns:tranBank="urn:bank_2018_2.transactions.webservices.netsuite.com" xmlns:tranSales="urn:sales_2018_2.transactions.webservices.netsuite.com" xmlns:listEmp="urn:employees_2018_2.lists.webservices.netsuite.com"> <env:Header>
<platformMsgs:tokenPassport>
<platformCore:account>4817474</platformCore:account>
<platformCore:consumerKey>****************************************************************</platformCore:consumerKey>
<platformCore:token>****************************************************************</platformCore:token>
<platformCore:nonce>niYw7CyeIT9ZEQzojTdn</platformCore:nonce>
<platformCore:timestamp>1589192435</platformCore:timestamp>
<platformCore:signature algorithm="HMAC-SHA256">*********************************************</platformCore:signature>
</platformMsgs:tokenPassport>
</env:Header>
<env:Body>
<platformMsgs:add>
<platformMsgs:record xsi:type="tranSales:SalesOrder">
<tranSales:customForm internalId="158"/>
<tranSales:entity type="customer" externalId="ABCUS210276" internalId="739611"/>
<tranSales:shippingAddress>
<platformCommon:country>REDACTED</platformCommon:country>
<platformCommon:addressee>REDACTED</platformCommon:addressee>
<platformCommon:addr1>REDACTED</platformCommon:addr1>
<platformCommon:city>REDACTED</platformCommon:city>
<platformCommon:zip>REDACTED</platformCommon:zip>
<platformCommon:override>false</platformCommon:override>
</tranSales:shippingAddress>
<tranSales:memo xsi:nil="true"/>
<tranSales:otherRefNum xsi:nil="true"/>
<tranSales:tranDate>2020-05-07T00:00:00+00:00</tranSales:tranDate>
<tranSales:subsidiary internalId="5"/>
<tranSales:department type="department" internalId="3"/>
<tranSales:shipDate>2020-05-07T00:00:00+00:00</tranSales:shipDate>
<tranSales:shipMethod internalId="16817"/>
<tranSales:currency internalId="5"/>
<tranSales:terms internalId="2"/>
<tranSales:toBeEmailed>false</tranSales:toBeEmailed>
<tranSales:email>REDACTED</tranSales:email>
<tranSales:customFieldList>
<platformCore:customField scriptId="custbody_ndk_external_order_number" xsi:type="platformCore:StringCustomFieldRef">
<platformCore:value>BIFUBADAKE</platformCore:value>
</platformCore:customField>
<platformCore:customField scriptId="custbody_ndk_us_order_types" xsi:type="platformCore:StringCustomFieldRef">
<platformCore:value>2</platformCore:value>
</platformCore:customField>
<platformCore:customField scriptId="custbody_document_date" xsi:type="platformCore:DateCustomFieldRef">
<platformCore:value>2020-05-11T00:00:00+00:00</platformCore:value>
</platformCore:customField>
<platformCore:customField scriptId="cseg_saleschannel" xsi:type="platformCore:StringCustomFieldRef">
<platformCore:value>2</platformCore:value>
</platformCore:customField>
<platformCore:customField scriptId="cseg_season" xsi:type="platformCore:StringCustomFieldRef">
<platformCore:value>6</platformCore:value>
</platformCore:customField>
</tranSales:customFieldList>
<tranSales:itemList>
<tranSales:item>
<tranSales:item type="inventoryItem" externalId="19264" internalId="4794"/>
<tranSales:location type="location" externalId="ABEX" internalId="39"/>
<tranSales:quantity>1</tranSales:quantity>
<tranSales:price internalId="17"/>
<tranSales:customFieldList>
<platformCore:customField scriptId="cseg_season" xsi:type="platformCore:StringCustomFieldRef">
<platformCore:value>5</platformCore:value>
</platformCore:customField>
<platformCore:customField scriptId="cseg_prodcat" xsi:type="platformCore:StringCustomFieldRef">
<platformCore:value>12</platformCore:value>
</platformCore:customField>
</tranSales:customFieldList>
</tranSales:item>
</tranSales:itemList>
<tranSales:promotionsList>
<tranSales:promotions>
<tranSales:promoCode type="promotionCode" internalId="45"/>
</tranSales:promotions>
</tranSales:promotionsList>
</platformMsgs:record>
</platformMsgs:add>
</env:Body>
</env:Envelope>