diff --git a/src/v0/destinations/hs/HSTransform-v2.js b/src/v0/destinations/hs/HSTransform-v2.js index 3699e1c789..d2b26f1ab8 100644 --- a/src/v0/destinations/hs/HSTransform-v2.js +++ b/src/v0/destinations/hs/HSTransform-v2.js @@ -110,11 +110,11 @@ const processIdentify = async (message, destination, propertyMap) => { GENERIC_TRUE_VALUES.includes(mappedToDestination.toString()) && operation ) { - addExternalIdToHSTraits(message); if (!objectType) { throw new InstrumentationError('objectType not found'); } if (operation === 'createObject') { + addExternalIdToHSTraits(message); endpoint = CRM_CREATE_UPDATE_ALL_OBJECTS.replace(':objectType', objectType); } else if (operation === 'updateObject' && getHsSearchId(message)) { const { hsSearchId } = getHsSearchId(message); diff --git a/test/integrations/destinations/hs/processor/data.ts b/test/integrations/destinations/hs/processor/data.ts index 0867f2cb54..f503ae92ac 100644 --- a/test/integrations/destinations/hs/processor/data.ts +++ b/test/integrations/destinations/hs/processor/data.ts @@ -1534,7 +1534,6 @@ export const data = [ firstname: 'Test Hubspot', anonymousId: '12345', country: 'India', - email: 'testhubspot2@email.com', }, }, XML: {}, diff --git a/test/integrations/destinations/hs/router/data.ts b/test/integrations/destinations/hs/router/data.ts index e1c3e04356..ab3ca8cba8 100644 --- a/test/integrations/destinations/hs/router/data.ts +++ b/test/integrations/destinations/hs/router/data.ts @@ -1033,7 +1033,6 @@ export const data = [ firstname: 'Test Hubspot', anonymousId: '12345', country: 'India', - email: 'testhubspot2@email.com', }, id: '103605', },