Resolving "Invalid entitystatus reference key" Error When Syncing to NetSuite
Last updated: November 11, 2026
If a sync from HubSpot to NetSuite fails with error code INVALID_KEY_OR_REF and the message Invalid entitystatus reference key [number], the integration tried to give a NetSuite record a status that doesn't fit its record type, such as a Customer record with a Lead or Prospect status. NetSuite does not allow this.
Understanding the Error
The error returned by NetSuite looks like this:
Code:
INVALID_KEY_OR_REFMessage:
Invalid entitystatus reference key [number].
The number is the internal ID of the status the integration tried to set. The error can appear on a company sync, or on a deal sync when the integration creates the related customer in NetSuite. It happens when:
A company record doesn't exist in NetSuite yet, and the integration tries to create it as a Customer with a Lead or Prospect status
An existing Customer record would be updated to a Lead or Prospect status
In NetSuite, every entity status belongs to one of three stages: Lead, Prospect, or Customer. The progression is one way; once a record is a Customer, it cannot be given a Lead or Prospect status.
How to Fix This Issue
Check the status (entitystatus) field mapping on the company object in SmartHub. Records need a status that matches the record type they are created as:
To create new companies as Customers, map or default the status to a Customer status. You can set a fixed value for blank statuses with Default When Null; see How To Set A Default Value For Blank Fields.
To create new companies as Leads or Prospects, the status mapping also needs to change the record type when the record is created. Contact SyncSmart support to set this up.
Save after each field mapping change, then click Save changes, then Deploy to publish the change. Save alone only stores a draft.
What Happens After the Fix
When the integration processes these records again:
New records are created in NetSuite with a status that matches their record type
Company and deal syncs should work normally
If the error continues after the mapping change is deployed, contact SyncSmart support.