diff --git a/src/v0/destinations/fb_custom_audience/recordTransform.js b/src/v0/destinations/fb_custom_audience/recordTransform.js index b771f2d7a2..48d5e665f7 100644 --- a/src/v0/destinations/fb_custom_audience/recordTransform.js +++ b/src/v0/destinations/fb_custom_audience/recordTransform.js @@ -102,9 +102,9 @@ const processRecordEventArray = ( async function processRecordInputs(groupedRecordInputs) { const { destination, connection } = groupedRecordInputs[0]; const { message } = groupedRecordInputs[0]; - const { isHashRequired, accessToken, disableFormat, type, subType, isRaw, maxUserCount } = - destination.Config; + const { accessToken, disableFormat, type, subType, isRaw, maxUserCount } = destination.Config; const audienceId = get(connection, 'config.destination.audienceId'); + const isHashRequired = get(connection, 'config.destination.isHashRequired'); const prepareParams = { access_token: accessToken, }; diff --git a/test/integrations/destinations/fb_custom_audience/router/batchingRecord.ts b/test/integrations/destinations/fb_custom_audience/router/batchingRecord.ts index 0ceff5260e..e716e36d12 100644 --- a/test/integrations/destinations/fb_custom_audience/router/batchingRecord.ts +++ b/test/integrations/destinations/fb_custom_audience/router/batchingRecord.ts @@ -32,6 +32,13 @@ const destination: Destination = { export const rETLBatchingRouterRequest: RouterTransformationRequest = { input: [ { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'insert', @@ -62,6 +69,13 @@ export const rETLBatchingRouterRequest: RouterTransformationRequest = { metadata: generateMetadata(1), }, { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'insert', @@ -92,6 +106,13 @@ export const rETLBatchingRouterRequest: RouterTransformationRequest = { metadata: generateMetadata(2), }, { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'insert', diff --git a/test/integrations/destinations/fb_custom_audience/router/record.ts b/test/integrations/destinations/fb_custom_audience/router/record.ts index 534c1c40c2..f6dcf37a74 100644 --- a/test/integrations/destinations/fb_custom_audience/router/record.ts +++ b/test/integrations/destinations/fb_custom_audience/router/record.ts @@ -32,6 +32,13 @@ const destination: Destination = { export const rETLRecordRouterRequest: RouterTransformationRequest = { input: [ { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'insert', @@ -62,6 +69,13 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { metadata: generateMetadata(3), }, { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'update', @@ -92,6 +106,13 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { metadata: generateMetadata(4), }, { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'delete', @@ -122,6 +143,13 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { metadata: generateMetadata(1), }, { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'delete', @@ -152,6 +180,13 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { metadata: generateMetadata(2), }, { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'update', @@ -182,6 +217,13 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { metadata: generateMetadata(5), }, { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'update', @@ -212,6 +254,13 @@ export const rETLRecordRouterRequest: RouterTransformationRequest = { metadata: generateMetadata(6), }, { + connection: { + config: { + destination: { + isHashRequired: true, + }, + }, + }, destination: destination, message: { action: 'lol',