Error: Sales order not created for customer with NS ID - ____ [Code=INVALID_KEY_OR_REF] Invalid class reference key

Error: Sales order not created for customer with NS ID - ____ [Code=INVALID_KEY_OR_REF] Invalid class reference key

The reason why this or similar orders got rejected by NetSuite

It seems that the customer with this NetSuite "______" internal ID is not mapped with the correct class ID, as a result, our app couldn't sync this order to NetSuite.

Example:

Error: Sales order not created for customer with NS ID - 246429 [Code=INVALID_KEY_OR_REF] Invalid class reference key 32.

In the above example, this 246429 NetSuite internal ID customer is not mapped with the correct class ID, as a result, this order got rejected by NetSuite.

How to fix this error:

Step 1:

  1. Open NetSuite and from the top-navigation pane click on the Setup > Company > Classes
  2. If this class already exists, then you have to search for it, else you need to create it from the New Class button

Step 2:

  1. Open Robust NetSuite Integrator app, and go to the Fields Mapping Page, and click on the Add Standard field button, under the Transaction Standard Field
  2. From the drop-down menu of Standard Field choose Class, and in the Market Field, enter the correct NetSuite class ID from step 1 and hit Submit

Step 3:

  1. Go to the Order Log page
  2. In the Order ID field, enter the Order ID of this rejected order, and hit the Search button
  3. In the action tab, click on the Re-submit button
  4. Upon, successful re-submission, you will see the status of this order changed to Accepted by NetSuite
In case, you have any questions OR suggestions, feel free to reach out to us at help@webbeeglobal.com.