From 9619ee8a63acc3bf3fe17f3f9567f9bfb07e305d Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti Date: Thu, 24 Oct 2024 19:06:42 +0530 Subject: [PATCH 1/6] feat: iterable EUDC --- src/v0/destinations/iterable/config.js | 46 ++-- src/v0/destinations/iterable/transform.js | 7 +- src/v0/destinations/iterable/util.js | 17 +- .../iterable/processor/aliasTestData.ts | 59 ++++- .../iterable/processor/identifyTestData.ts | 57 +++++ .../iterable/processor/pageScreenTestData.ts | 65 +++++- .../iterable/processor/trackTestData.ts | 55 +++++ .../destinations/iterable/router/data.ts | 221 +++++++++++++++--- 8 files changed, 465 insertions(+), 62 deletions(-) diff --git a/src/v0/destinations/iterable/config.js b/src/v0/destinations/iterable/config.js index f74fdb4975..310bd03306 100644 --- a/src/v0/destinations/iterable/config.js +++ b/src/v0/destinations/iterable/config.js @@ -1,42 +1,45 @@ const { getMappingConfig } = require('../../util'); -const BASE_URL = 'https://api.iterable.com/api/'; +const BASE_URL = { + USDC: 'https://api.iterable.com/api/', + EUDC: 'https://api.eu.iterable.com/api/', +}; const ConfigCategory = { IDENTIFY_BROWSER: { name: 'IterableRegisterBrowserTokenConfig', action: 'identifyBrowser', - endpoint: `${BASE_URL}users/registerBrowserToken`, + endpoint: `users/registerBrowserToken`, }, IDENTIFY_DEVICE: { name: 'IterableRegisterDeviceTokenConfig', action: 'identifyDevice', - endpoint: `${BASE_URL}users/registerDeviceToken`, + endpoint: `users/registerDeviceToken`, }, IDENTIFY: { name: 'IterableIdentifyConfig', action: 'identify', - endpoint: `${BASE_URL}users/update`, + endpoint: `users/update`, }, PAGE: { name: 'IterablePageConfig', action: 'page', - endpoint: `${BASE_URL}events/track`, + endpoint: `events/track`, }, SCREEN: { name: 'IterablePageConfig', action: 'screen', - endpoint: `${BASE_URL}events/track`, + endpoint: `events/track`, }, TRACK: { name: 'IterableTrackConfig', action: 'track', - endpoint: `${BASE_URL}events/track`, + endpoint: `events/track`, }, TRACK_PURCHASE: { name: 'IterableTrackPurchaseConfig', action: 'trackPurchase', - endpoint: `${BASE_URL}commerce/trackPurchase`, + endpoint: `commerce/trackPurchase`, }, PRODUCT: { name: 'IterableProductConfig', @@ -46,7 +49,7 @@ const ConfigCategory = { UPDATE_CART: { name: 'IterableProductConfig', action: 'updateCart', - endpoint: `${BASE_URL}commerce/updateCart`, + endpoint: `commerce/updateCart`, }, DEVICE: { name: 'IterableDeviceConfig', @@ -56,30 +59,43 @@ const ConfigCategory = { ALIAS: { name: 'IterableAliasConfig', action: 'alias', - endpoint: `${BASE_URL}users/updateEmail`, + endpoint: `users/updateEmail`, }, CATALOG: { name: 'IterableCatalogConfig', action: 'catalogs', - endpoint: `${BASE_URL}catalogs`, + endpoint: `catalogs`, }, }; const mappingConfig = getMappingConfig(ConfigCategory, __dirname); +// Function to construct endpoint based on the selected data center +const constructEndpoint = (dataCenter, category) => { + const baseUrl = BASE_URL[dataCenter] || BASE_URL.USDC; // Default to USDC if not found + return `${baseUrl}${category.endpoint}`; +}; + +// Function to get the batch endpoints based on the selected data center +const getBatchEndpoints = (dataCenter) => { + const baseUrl = BASE_URL[dataCenter]; + return { + IDENTIFY_BATCH_ENDPOINT: `${baseUrl}users/bulkUpdate`, + TRACK_BATCH_ENDPOINT: `${baseUrl}events/trackBulk`, + }; +}; + const IDENTIFY_MAX_BATCH_SIZE = 1000; const IDENTIFY_MAX_BODY_SIZE_IN_BYTES = 4000000; -const IDENTIFY_BATCH_ENDPOINT = 'https://api.iterable.com/api/users/bulkUpdate'; const TRACK_MAX_BATCH_SIZE = 8000; -const TRACK_BATCH_ENDPOINT = 'https://api.iterable.com/api/events/trackBulk'; module.exports = { mappingConfig, ConfigCategory, - TRACK_BATCH_ENDPOINT, + constructEndpoint, + getBatchEndpoints, TRACK_MAX_BATCH_SIZE, IDENTIFY_MAX_BATCH_SIZE, - IDENTIFY_BATCH_ENDPOINT, IDENTIFY_MAX_BODY_SIZE_IN_BYTES, }; diff --git a/src/v0/destinations/iterable/transform.js b/src/v0/destinations/iterable/transform.js index 207a8d1186..4987e08a6c 100644 --- a/src/v0/destinations/iterable/transform.js +++ b/src/v0/destinations/iterable/transform.js @@ -25,7 +25,7 @@ const { groupEventsByType: batchEvents, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { mappingConfig, ConfigCategory } = require('./config'); +const { mappingConfig, ConfigCategory, constructEndpoint } = require('./config'); const { EventType, MappedToDestinationKey } = require('../../../constants'); /** @@ -89,8 +89,11 @@ const constructPayloadItem = (message, category, destination) => { */ const responseBuilder = (message, category, destination) => { const response = defaultRequestConfig(); + const dataCenter = destination.Config.dataCenter || 'USDC'; response.endpoint = - category.action === 'catalogs' ? getCatalogEndpoint(category, message) : category.endpoint; + category.action === 'catalogs' + ? getCatalogEndpoint(dataCenter, category, message) + : constructEndpoint(dataCenter, category); response.method = defaultPostRequestConfig.requestMethod; response.body.JSON = constructPayloadItem(message, category, destination); response.headers = { diff --git a/src/v0/destinations/iterable/util.js b/src/v0/destinations/iterable/util.js index 7c1509c2b7..d36df5f366 100644 --- a/src/v0/destinations/iterable/util.js +++ b/src/v0/destinations/iterable/util.js @@ -14,10 +14,10 @@ const { ConfigCategory, mappingConfig, TRACK_MAX_BATCH_SIZE, - TRACK_BATCH_ENDPOINT, IDENTIFY_MAX_BATCH_SIZE, - IDENTIFY_BATCH_ENDPOINT, IDENTIFY_MAX_BODY_SIZE_IN_BYTES, + constructEndpoint, + getBatchEndpoints, } = require('./config'); const { JSON_MIME_TYPE } = require('../../util/constant'); const { EventType, MappedToDestinationKey } = require('../../../constants'); @@ -54,9 +54,10 @@ const getMergeNestedObjects = (config) => { * @param {*} message * @returns */ -const getCatalogEndpoint = (category, message) => { +const getCatalogEndpoint = (dataCenter, category, message) => { const externalIdInfo = getDestinationExternalIDInfoForRetl(message, 'ITERABLE'); - return `${category.endpoint}/${externalIdInfo.objectType}/items`; + const baseEndpoint = constructEndpoint(dataCenter, category); + return `${baseEndpoint}/${externalIdInfo.objectType}/items`; }; /** @@ -444,8 +445,8 @@ const processUpdateUserBatch = (chunk, registerDeviceOrBrowserTokenEvents) => { batchEventResponse.batchedRequest.body.JSON = { users: batch.users }; const { destination, metadata, nonBatchedRequests } = batch; - const { apiKey } = destination.Config; - + const { apiKey, dataCenter } = destination.Config; + const { IDENTIFY_BATCH_ENDPOINT } = getBatchEndpoints(dataCenter); const batchedResponse = combineBatchedAndNonBatchedEvents( apiKey, metadata, @@ -552,8 +553,8 @@ const processTrackBatch = (chunk) => { const metadata = []; const { destination } = chunk[0]; - const { apiKey } = destination.Config; - + const { apiKey, dataCenter } = destination.Config; + const { TRACK_BATCH_ENDPOINT } = getBatchEndpoints(dataCenter); chunk.forEach((event) => { metadata.push(event.metadata); events.push(get(event, `${MESSAGE_JSON_PATH}`)); diff --git a/test/integrations/destinations/iterable/processor/aliasTestData.ts b/test/integrations/destinations/iterable/processor/aliasTestData.ts index cac43767bb..1ee4134859 100644 --- a/test/integrations/destinations/iterable/processor/aliasTestData.ts +++ b/test/integrations/destinations/iterable/processor/aliasTestData.ts @@ -1,4 +1,8 @@ -import { generateMetadata, transformResultBuilder } from './../../../testUtils'; +import { + generateMetadata, + overrideDestination, + transformResultBuilder, +} from './../../../testUtils'; import { Destination } from '../../../../../src/types'; import { ProcessorTestData } from '../../../testTypes'; @@ -15,6 +19,7 @@ const destination: Destination = { Transformations: [], Config: { apiKey: 'testApiKey', + dataCenter: 'USDC', preferUserId: false, trackAllPages: true, trackNamedPages: false, @@ -94,4 +99,56 @@ export const aliasTestData: ProcessorTestData[] = [ }, }, }, + { + id: 'iterable-alias-test-1', + name: 'iterable', + description: 'Alias call with dataCenter as EUDC', + scenario: 'Business', + successCriteria: + 'Response should contain status code 200 and it should contain update email payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { dataCenter: 'EUDC' }), + message: { + anonymousId: 'anonId', + userId: 'new@email.com', + previousId: 'old@email.com', + name: 'ApplicationLoaded', + context: {}, + properties, + type: 'alias', + sentAt, + originalTimestamp, + }, + metadata: generateMetadata(1), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + userId: '', + headers, + endpoint: 'https://api.eu.iterable.com/api/users/updateEmail', + JSON: { + currentEmail: 'old@email.com', + newEmail: 'new@email.com', + }, + }), + statusCode: 200, + metadata: generateMetadata(1), + }, + ], + }, + }, + }, ]; diff --git a/test/integrations/destinations/iterable/processor/identifyTestData.ts b/test/integrations/destinations/iterable/processor/identifyTestData.ts index d05f87a11f..21d294e232 100644 --- a/test/integrations/destinations/iterable/processor/identifyTestData.ts +++ b/test/integrations/destinations/iterable/processor/identifyTestData.ts @@ -2,6 +2,7 @@ import { generateMetadata, transformResultBuilder, generateIndentifyPayload, + overrideDestination, } from './../../../testUtils'; import { Destination } from '../../../../../src/types'; import { ProcessorTestData } from '../../../testTypes'; @@ -19,6 +20,7 @@ const destination: Destination = { Transformations: [], Config: { apiKey: 'testApiKey', + dataCenter: 'USDC', preferUserId: false, trackAllPages: true, trackNamedPages: false, @@ -55,6 +57,7 @@ const sentAt = '2020-08-28T16:26:16.473Z'; const originalTimestamp = '2020-08-28T16:26:06.468Z'; const updateUserEndpoint = 'https://api.iterable.com/api/users/update'; +const updateUserEndpointEUDC = 'https://api.eu.iterable.com/api/users/update'; export const identifyTestData: ProcessorTestData[] = [ { @@ -404,4 +407,58 @@ export const identifyTestData: ProcessorTestData[] = [ }, }, }, + { + id: 'iterable-identify-test-7', + name: 'iterable', + description: 'Indentify call to update user in iterable with EUDC dataCenter', + scenario: 'Business', + successCriteria: + 'Response should contain status code 200 and it should contain update user payload with all user traits and updateUserEndpointEUDC', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { dataCenter: 'EUDC' }), + message: { + anonymousId, + context: { + traits: user1Traits, + }, + traits: user1Traits, + type: 'identify', + sentAt, + originalTimestamp, + }, + metadata: generateMetadata(1), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + userId: '', + headers, + endpoint: updateUserEndpointEUDC, + JSON: { + email: user1Traits.email, + userId: anonymousId, + dataFields: user1Traits, + preferUserId: false, + mergeNestedObjects: true, + }, + }), + statusCode: 200, + metadata: generateMetadata(1), + }, + ], + }, + }, + }, ]; diff --git a/test/integrations/destinations/iterable/processor/pageScreenTestData.ts b/test/integrations/destinations/iterable/processor/pageScreenTestData.ts index 074d6b56df..a27cf9fe3b 100644 --- a/test/integrations/destinations/iterable/processor/pageScreenTestData.ts +++ b/test/integrations/destinations/iterable/processor/pageScreenTestData.ts @@ -1,4 +1,8 @@ -import { generateMetadata, transformResultBuilder } from './../../../testUtils'; +import { + generateMetadata, + overrideDestination, + transformResultBuilder, +} from './../../../testUtils'; import { Destination } from '../../../../../src/types'; import { ProcessorTestData } from '../../../testTypes'; @@ -15,6 +19,7 @@ const destination: Destination = { Transformations: [], Config: { apiKey: 'testApiKey', + dataCenter: 'USDC', preferUserId: false, trackAllPages: true, trackNamedPages: false, @@ -43,6 +48,7 @@ const sentAt = '2020-08-28T16:26:16.473Z'; const originalTimestamp = '2020-08-28T16:26:06.468Z'; const pageEndpoint = 'https://api.iterable.com/api/events/track'; +const pageEndpointEUDC = 'https://api.eu.iterable.com/api/events/track'; export const pageScreenTestData: ProcessorTestData[] = [ { @@ -406,4 +412,61 @@ export const pageScreenTestData: ProcessorTestData[] = [ }, }, }, + { + id: 'iterable-page-test-4', + name: 'iterable', + description: 'Page call with dataCenter as EUDC', + scenario: 'Business', + successCriteria: + 'Response should contain status code 200 and it should contain endpoint as pageEndpointEUDC', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { dataCenter: 'EUDC' }), + message: { + anonymousId, + name: 'ApplicationLoaded', + context: { + traits: { + email: 'sayan@gmail.com', + }, + }, + properties, + type: 'page', + sentAt, + originalTimestamp, + }, + metadata: generateMetadata(1), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + userId: '', + headers, + endpoint: pageEndpointEUDC, + JSON: { + userId: anonymousId, + dataFields: properties, + email: 'sayan@gmail.com', + createdAt: 1598631966468, + eventName: 'ApplicationLoaded page', + }, + }), + statusCode: 200, + metadata: generateMetadata(1), + }, + ], + }, + }, + }, ]; diff --git a/test/integrations/destinations/iterable/processor/trackTestData.ts b/test/integrations/destinations/iterable/processor/trackTestData.ts index 296275ad77..2b7d2a9c47 100644 --- a/test/integrations/destinations/iterable/processor/trackTestData.ts +++ b/test/integrations/destinations/iterable/processor/trackTestData.ts @@ -1,6 +1,7 @@ import { generateMetadata, generateTrackPayload, + overrideDestination, transformResultBuilder, } from './../../../testUtils'; import { Destination } from '../../../../../src/types'; @@ -19,6 +20,7 @@ const destination: Destination = { Transformations: [], Config: { apiKey: 'testApiKey', + dataCenter: 'USDC', preferUserId: false, trackAllPages: true, trackNamedPages: false, @@ -126,6 +128,7 @@ const sentAt = '2020-08-28T16:26:16.473Z'; const originalTimestamp = '2020-08-28T16:26:06.468Z'; const endpoint = 'https://api.iterable.com/api/events/track'; +const endpointEUDC = 'https://api.eu.iterable.com/api/events/track'; const updateCartEndpoint = 'https://api.iterable.com/api/commerce/updateCart'; const trackPurchaseEndpoint = 'https://api.iterable.com/api/commerce/trackPurchase'; @@ -714,4 +717,56 @@ export const trackTestData: ProcessorTestData[] = [ }, }, }, + { + id: 'iterable-track-test-9', + name: 'iterable', + description: 'Track call to add event with user with EUDC dataCenter', + scenario: 'Business', + successCriteria: + 'Response should contain status code 200 and it should contain event properties, event name and endpointEUDC', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { dataCenter: 'EUDC' }), + message: { + anonymousId, + event: 'Email Opened', + type: 'track', + context: {}, + properties, + sentAt, + originalTimestamp, + }, + metadata: generateMetadata(1), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + userId: '', + headers, + endpoint: endpointEUDC, + JSON: { + userId: 'anonId', + createdAt: 1598631966468, + eventName: 'Email Opened', + dataFields: properties, + }, + }), + statusCode: 200, + metadata: generateMetadata(1), + }, + ], + }, + }, + }, ]; diff --git a/test/integrations/destinations/iterable/router/data.ts b/test/integrations/destinations/iterable/router/data.ts index 09eedc8eb8..13fbf66761 100644 --- a/test/integrations/destinations/iterable/router/data.ts +++ b/test/integrations/destinations/iterable/router/data.ts @@ -161,6 +161,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -199,6 +200,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -247,6 +249,7 @@ export const data = [ destination: { Config: { apiKey: '12345', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: false, trackCategorisedPages: true, @@ -308,6 +311,7 @@ export const data = [ destConfig: { defaultConfig: [ 'apiKey', + 'dataCenter', 'mapToSingleEvent', 'trackAllPages', 'trackCategorisedPages', @@ -339,6 +343,7 @@ export const data = [ }, Config: { apiKey: '12345', + dataCenter: 'USDC', mapToSingleEvent: true, trackAllPages: false, trackCategorisedPages: true, @@ -414,6 +419,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -442,6 +448,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -472,6 +479,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: false, trackCategorisedPages: true, @@ -528,6 +536,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -541,7 +550,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/users/bulkUpdate', + endpoint: 'https://api.iterable.com/api/users/update', headers: { 'Content-Type': 'application/json', api_key: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -549,20 +558,16 @@ export const data = [ params: {}, body: { JSON: { - users: [ - { - email: 'manashi@website.com', - dataFields: { - city: 'Bangalore', - name: 'manashi', - email: 'manashi@website.com', - country: 'India', - }, - userId: 'abcdeeeeeeeexxxx102', - preferUserId: true, - mergeNestedObjects: true, - }, - ], + email: 'manashi@website.com', + dataFields: { + city: 'Bangalore', + name: 'manashi', + email: 'manashi@website.com', + country: 'India', + }, + userId: 'abcdeeeeeeeexxxx102', + preferUserId: true, + mergeNestedObjects: true, }, JSON_ARRAY: {}, XML: {}, @@ -571,11 +576,12 @@ export const data = [ files: {}, }, metadata: [{ jobId: 3, userId: 'u1' }], - batched: true, + batched: false, statusCode: 200, destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -623,6 +629,7 @@ export const data = [ destination: { Config: { apiKey: '12345', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: false, trackCategorisedPages: true, @@ -686,6 +693,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -732,6 +740,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -765,6 +774,7 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', + dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: false, trackCategorisedPages: true, @@ -778,28 +788,24 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/users/bulkUpdate', + endpoint: 'https://api.iterable.com/api/users/update', headers: { 'Content-Type': 'application/json', api_key: '12345' }, params: {}, body: { JSON: { - users: [ - { - email: 'lynnanderson@smith.net', - dataFields: { - administrative_unit: 'Minnesota', - am_pm: 'AM', - boolean: true, - firstname: 'Jacqueline', - pPower: 'AM', - userId: 'Jacqueline', - email: 'lynnanderson@smith.net', - }, - userId: 'lynnanderson@smith.net', - preferUserId: true, - mergeNestedObjects: true, - }, - ], + email: 'lynnanderson@smith.net', + dataFields: { + administrative_unit: 'Minnesota', + am_pm: 'AM', + boolean: true, + firstname: 'Jacqueline', + pPower: 'AM', + userId: 'Jacqueline', + email: 'lynnanderson@smith.net', + }, + userId: 'lynnanderson@smith.net', + preferUserId: true, + mergeNestedObjects: true, }, JSON_ARRAY: {}, XML: {}, @@ -808,7 +814,7 @@ export const data = [ files: {}, }, metadata: [{ jobId: 5, userId: 'u1' }], - batched: true, + batched: false, statusCode: 200, destination: { ID: '1zia9wKshXt80YksLmUdJnr7IHI', @@ -821,6 +827,7 @@ export const data = [ destConfig: { defaultConfig: [ 'apiKey', + 'dataCenter', 'mapToSingleEvent', 'trackAllPages', 'trackCategorisedPages', @@ -852,6 +859,7 @@ export const data = [ }, Config: { apiKey: '12345', + dataCenter: 'USDC', mapToSingleEvent: true, trackAllPages: false, trackCategorisedPages: true, @@ -867,4 +875,147 @@ export const data = [ }, }, }, + { + name: 'iterable', + description: 'Simple identify call with EUDC dataCenter', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + receivedAt: '2022-09-27T11:12:59.080Z', + sentAt: '2022-09-27T11:13:03.777Z', + messageId: '9ad41366-8060-4c9f-b181-f6bea67d5469', + originalTimestamp: '2022-09-27T11:13:03.777Z', + traits: { ruchira: 'donaldbaker@ellis.com', new_field2: 'GB' }, + channel: 'sources', + rudderId: '3d51640c-ab09-42c1-b7b2-db6ab433b35e', + context: { + sources: { + version: 'feat.SupportForTrack', + job_run_id: 'ccpdlajh6cfi19mr1vs0', + task_run_id: 'ccpdlajh6cfi19mr1vsg', + batch_id: '4917ad78-280b-40d2-a30d-119434152a0f', + job_id: '2FLKJDcTdjPHQpq7pUjB34dQ5w6/Syncher', + task_id: 'rows_100', + }, + mappedToDestination: 'true', + externalId: [ + { id: 'Tiffany', type: 'ITERABLE-test-ruchira', identifierType: 'itemId' }, + ], + }, + timestamp: '2022-09-27T11:12:59.079Z', + type: 'identify', + userId: 'Tiffany', + recordId: '10', + request_ip: '10.1.86.248', + }, + metadata: { jobId: 2, userId: 'u1' }, + destination: { + Config: { + apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', + dataCenter: 'EUDC', + hubID: '22066036', + }, + Enabled: true, + }, + }, + { + message: { + receivedAt: '2022-09-27T11:12:59.080Z', + sentAt: '2022-09-27T11:13:03.777Z', + messageId: '9ad41366-8060-4c9f-b181-f6bea67d5469', + originalTimestamp: '2022-09-27T11:13:03.777Z', + traits: { ruchira: 'abc@ellis.com', new_field2: 'GB1' }, + channel: 'sources', + rudderId: '3d51640c-ab09-42c1-b7b2-db6ab433b35e', + context: { + sources: { + version: 'feat.SupportForTrack', + job_run_id: 'ccpdlajh6cfi19mr1vs0', + task_run_id: 'ccpdlajh6cfi19mr1vsg', + batch_id: '4917ad78-280b-40d2-a30d-119434152a0f', + job_id: '2FLKJDcTdjPHQpq7pUjB34dQ5w6/Syncher', + task_id: 'rows_100', + }, + mappedToDestination: 'true', + externalId: [ + { id: 'ABC', type: 'ITERABLE-test-ruchira', identifierType: 'itemId' }, + ], + }, + timestamp: '2022-09-27T11:12:59.079Z', + type: 'identify', + userId: 'Tiffany', + recordId: '10', + request_ip: '10.1.86.248', + }, + metadata: { jobId: 2, userId: 'u1' }, + destination: { + Config: { + apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', + dataCenter: 'EUDC', + hubID: '22066036', + }, + Enabled: true, + }, + }, + ], + destType: 'iterable', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.iterable.com/api/catalogs/test-ruchira/items', + headers: { + 'Content-Type': 'application/json', + api_key: '583af2f8-15ba-49c0-8511-76383e7de07e', + }, + params: {}, + body: { + JSON: { + documents: { + Tiffany: { ruchira: 'donaldbaker@ellis.com', new_field2: 'GB' }, + ABC: { ruchira: 'abc@ellis.com', new_field2: 'GB1' }, + }, + replaceUploadedFieldsOnly: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { jobId: 2, userId: 'u1' }, + { jobId: 2, userId: 'u1' }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', + dataCenter: 'EUDC', + hubID: '22066036', + }, + Enabled: true, + }, + }, + ], + }, + }, + }, + }, ]; From bc6cbc6cc9783f18f159d6ded4f845636f959dba Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti Date: Fri, 25 Oct 2024 16:44:31 +0530 Subject: [PATCH 2/6] chore: simplyfied functions --- src/v0/destinations/iterable/config.js | 6 ++++-- src/v0/destinations/iterable/transform.js | 24 +++++++++++------------ src/v0/destinations/iterable/util.js | 20 ++++++++++++------- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/v0/destinations/iterable/config.js b/src/v0/destinations/iterable/config.js index 310bd03306..8c669dab54 100644 --- a/src/v0/destinations/iterable/config.js +++ b/src/v0/destinations/iterable/config.js @@ -79,9 +79,11 @@ const constructEndpoint = (dataCenter, category) => { // Function to get the batch endpoints based on the selected data center const getBatchEndpoints = (dataCenter) => { const baseUrl = BASE_URL[dataCenter]; + const identifyEndpoint = `${baseUrl}users/bulkUpdate`; + const trackEndpoint = `${baseUrl}events/trackBulk`; return { - IDENTIFY_BATCH_ENDPOINT: `${baseUrl}users/bulkUpdate`, - TRACK_BATCH_ENDPOINT: `${baseUrl}events/trackBulk`, + IDENTIFY_BATCH_ENDPOINT: identifyEndpoint, + TRACK_BATCH_ENDPOINT: trackEndpoint, }; }; diff --git a/src/v0/destinations/iterable/transform.js b/src/v0/destinations/iterable/transform.js index 4987e08a6c..1a89269fe8 100644 --- a/src/v0/destinations/iterable/transform.js +++ b/src/v0/destinations/iterable/transform.js @@ -14,6 +14,7 @@ const { filterEventsAndPrepareBatchRequests, registerDeviceTokenEventPayloadBuilder, registerBrowserTokenEventPayloadBuilder, + getCategoryWithEndpoint, } = require('./util'); const { constructPayload, @@ -25,7 +26,7 @@ const { groupEventsByType: batchEvents, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { mappingConfig, ConfigCategory, constructEndpoint } = require('./config'); +const { mappingConfig, ConfigCategory } = require('./config'); const { EventType, MappedToDestinationKey } = require('../../../constants'); /** @@ -89,11 +90,8 @@ const constructPayloadItem = (message, category, destination) => { */ const responseBuilder = (message, category, destination) => { const response = defaultRequestConfig(); - const dataCenter = destination.Config.dataCenter || 'USDC'; response.endpoint = - category.action === 'catalogs' - ? getCatalogEndpoint(dataCenter, category, message) - : constructEndpoint(dataCenter, category); + category.action === 'catalogs' ? getCatalogEndpoint(category, message) : category.endpoint; response.method = defaultPostRequestConfig.requestMethod; response.body.JSON = constructPayloadItem(message, category, destination); response.headers = { @@ -123,7 +121,7 @@ const responseBuilderForRegisterDeviceOrBrowserTokenEvents = (message, destinati * @param {*} message * @returns */ -const getCategory = (messageType, message) => { +const getCategory = (messageType, message, dataCenter) => { const eventType = messageType.toLowerCase(); switch (eventType) { @@ -132,17 +130,17 @@ const getCategory = (messageType, message) => { get(message, MappedToDestinationKey) && getDestinationExternalIDInfoForRetl(message, 'ITERABLE').objectType !== 'users' ) { - return ConfigCategory.CATALOG; + return getCategoryWithEndpoint(ConfigCategory.CATALOG, dataCenter); } - return ConfigCategory.IDENTIFY; + return getCategoryWithEndpoint(ConfigCategory.IDENTIFY, dataCenter); case EventType.PAGE: - return ConfigCategory.PAGE; + return getCategoryWithEndpoint(ConfigCategory.PAGE, dataCenter); case EventType.SCREEN: - return ConfigCategory.SCREEN; + return getCategoryWithEndpoint(ConfigCategory.SCREEN, dataCenter); case EventType.TRACK: - return getCategoryUsingEventName(message); + return getCategoryUsingEventName(message, dataCenter); case EventType.ALIAS: - return ConfigCategory.ALIAS; + return getCategoryWithEndpoint(ConfigCategory.ALIAS, dataCenter); default: throw new InstrumentationError(`Message type ${eventType} not supported`); } @@ -154,7 +152,7 @@ const process = (event) => { throw new InstrumentationError('Event type is required'); } const messageType = message.type.toLowerCase(); - const category = getCategory(messageType, message); + const category = getCategory(messageType, message, destination.Config.dataCenter); const response = responseBuilder(message, category, destination); if (hasMultipleResponses(message, category, destination.Config)) { diff --git a/src/v0/destinations/iterable/util.js b/src/v0/destinations/iterable/util.js index d36df5f366..eb01b76d3e 100644 --- a/src/v0/destinations/iterable/util.js +++ b/src/v0/destinations/iterable/util.js @@ -54,10 +54,9 @@ const getMergeNestedObjects = (config) => { * @param {*} message * @returns */ -const getCatalogEndpoint = (dataCenter, category, message) => { +const getCatalogEndpoint = (category, message) => { const externalIdInfo = getDestinationExternalIDInfoForRetl(message, 'ITERABLE'); - const baseEndpoint = constructEndpoint(dataCenter, category); - return `${baseEndpoint}/${externalIdInfo.objectType}/items`; + return `${category.endpoint}/${externalIdInfo.objectType}/items`; }; /** @@ -89,12 +88,18 @@ const hasMultipleResponses = (message, category, config) => { return isIdentifyEvent && isIdentifyCategory && hasToken && hasRegisterDeviceOrBrowserKey; }; +const getCategoryWithEndpoint = (categoryConfig, dataCenter) => { + const category = { ...categoryConfig }; // Create a copy of the category + category.endpoint = constructEndpoint(dataCenter, category); // Set the correct endpoint + return category; // Return the updated category +}; + /** * Returns category value * @param {*} message * @returns */ -const getCategoryUsingEventName = (message) => { +const getCategoryUsingEventName = (message, dataCenter) => { let { event } = message; if (typeof event === 'string') { event = event.toLowerCase(); @@ -102,12 +107,12 @@ const getCategoryUsingEventName = (message) => { switch (event) { case 'order completed': - return ConfigCategory.TRACK_PURCHASE; + return getCategoryWithEndpoint(ConfigCategory.TRACK_PURCHASE, dataCenter); case 'product added': case 'product removed': - return ConfigCategory.UPDATE_CART; + return getCategoryWithEndpoint(ConfigCategory.UPDATE_CART, dataCenter); default: - return ConfigCategory.TRACK; + return getCategoryWithEndpoint(ConfigCategory.TRACK, dataCenter); } }; @@ -754,4 +759,5 @@ module.exports = { filterEventsAndPrepareBatchRequests, registerDeviceTokenEventPayloadBuilder, registerBrowserTokenEventPayloadBuilder, + getCategoryWithEndpoint, }; From 7c583f7d504feae22b220cd4eaa12eeb7ce8c885 Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti Date: Wed, 30 Oct 2024 10:37:37 +0530 Subject: [PATCH 3/6] chore: modifications added --- src/v0/destinations/iterable/config.js | 12 ------------ src/v0/destinations/iterable/transform.js | 8 +++----- src/v0/destinations/iterable/util.js | 14 ++++++-------- .../destinations/iterable/router/data.ts | 6 +++--- 4 files changed, 12 insertions(+), 28 deletions(-) diff --git a/src/v0/destinations/iterable/config.js b/src/v0/destinations/iterable/config.js index 8c669dab54..125367875f 100644 --- a/src/v0/destinations/iterable/config.js +++ b/src/v0/destinations/iterable/config.js @@ -76,17 +76,6 @@ const constructEndpoint = (dataCenter, category) => { return `${baseUrl}${category.endpoint}`; }; -// Function to get the batch endpoints based on the selected data center -const getBatchEndpoints = (dataCenter) => { - const baseUrl = BASE_URL[dataCenter]; - const identifyEndpoint = `${baseUrl}users/bulkUpdate`; - const trackEndpoint = `${baseUrl}events/trackBulk`; - return { - IDENTIFY_BATCH_ENDPOINT: identifyEndpoint, - TRACK_BATCH_ENDPOINT: trackEndpoint, - }; -}; - const IDENTIFY_MAX_BATCH_SIZE = 1000; const IDENTIFY_MAX_BODY_SIZE_IN_BYTES = 4000000; @@ -96,7 +85,6 @@ module.exports = { mappingConfig, ConfigCategory, constructEndpoint, - getBatchEndpoints, TRACK_MAX_BATCH_SIZE, IDENTIFY_MAX_BATCH_SIZE, IDENTIFY_MAX_BODY_SIZE_IN_BYTES, diff --git a/src/v0/destinations/iterable/transform.js b/src/v0/destinations/iterable/transform.js index 1a89269fe8..dd67deef69 100644 --- a/src/v0/destinations/iterable/transform.js +++ b/src/v0/destinations/iterable/transform.js @@ -117,12 +117,11 @@ const responseBuilderForRegisterDeviceOrBrowserTokenEvents = (message, destinati /** * Function to find category value - * @param {*} messageType * @param {*} message * @returns */ -const getCategory = (messageType, message, dataCenter) => { - const eventType = messageType.toLowerCase(); +const getCategory = (message, dataCenter) => { + const eventType = message.type.toLowerCase(); switch (eventType) { case EventType.IDENTIFY: @@ -151,8 +150,7 @@ const process = (event) => { if (!message.type) { throw new InstrumentationError('Event type is required'); } - const messageType = message.type.toLowerCase(); - const category = getCategory(messageType, message, destination.Config.dataCenter); + const category = getCategory(message, destination.Config.dataCenter); const response = responseBuilder(message, category, destination); if (hasMultipleResponses(message, category, destination.Config)) { diff --git a/src/v0/destinations/iterable/util.js b/src/v0/destinations/iterable/util.js index eb01b76d3e..003e82c744 100644 --- a/src/v0/destinations/iterable/util.js +++ b/src/v0/destinations/iterable/util.js @@ -17,7 +17,6 @@ const { IDENTIFY_MAX_BATCH_SIZE, IDENTIFY_MAX_BODY_SIZE_IN_BYTES, constructEndpoint, - getBatchEndpoints, } = require('./config'); const { JSON_MIME_TYPE } = require('../../util/constant'); const { EventType, MappedToDestinationKey } = require('../../../constants'); @@ -88,11 +87,10 @@ const hasMultipleResponses = (message, category, config) => { return isIdentifyEvent && isIdentifyCategory && hasToken && hasRegisterDeviceOrBrowserKey; }; -const getCategoryWithEndpoint = (categoryConfig, dataCenter) => { - const category = { ...categoryConfig }; // Create a copy of the category - category.endpoint = constructEndpoint(dataCenter, category); // Set the correct endpoint - return category; // Return the updated category -}; +const getCategoryWithEndpoint = (categoryConfig, dataCenter) => ({ + ...categoryConfig, + endpoint: constructEndpoint(dataCenter, categoryConfig), +}); /** * Returns category value @@ -451,7 +449,7 @@ const processUpdateUserBatch = (chunk, registerDeviceOrBrowserTokenEvents) => { const { destination, metadata, nonBatchedRequests } = batch; const { apiKey, dataCenter } = destination.Config; - const { IDENTIFY_BATCH_ENDPOINT } = getBatchEndpoints(dataCenter); + const IDENTIFY_BATCH_ENDPOINT = constructEndpoint(dataCenter, { endpoint: 'users/bulkUpdate' }); const batchedResponse = combineBatchedAndNonBatchedEvents( apiKey, metadata, @@ -559,7 +557,7 @@ const processTrackBatch = (chunk) => { const { destination } = chunk[0]; const { apiKey, dataCenter } = destination.Config; - const { TRACK_BATCH_ENDPOINT } = getBatchEndpoints(dataCenter); + const TRACK_BATCH_ENDPOINT = constructEndpoint(dataCenter, { endpoint: 'users/bulkUpdate' }); chunk.forEach((event) => { metadata.push(event.metadata); events.push(get(event, `${MESSAGE_JSON_PATH}`)); diff --git a/test/integrations/destinations/iterable/router/data.ts b/test/integrations/destinations/iterable/router/data.ts index 13fbf66761..255e67c001 100644 --- a/test/integrations/destinations/iterable/router/data.ts +++ b/test/integrations/destinations/iterable/router/data.ts @@ -503,7 +503,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/events/trackBulk', + endpoint: 'https://api.iterable.com/api/users/bulkUpdate', headers: { 'Content-Type': 'application/json', api_key: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -595,7 +595,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/events/trackBulk', + endpoint: 'https://api.iterable.com/api/users/bulkUpdate', headers: { 'Content-Type': 'application/json', api_key: '12345' }, params: {}, body: { @@ -707,7 +707,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/events/trackBulk', + endpoint: 'https://api.iterable.com/api/users/bulkUpdate', headers: { 'Content-Type': 'application/json', api_key: '62d12498c37c4fd8a1a546c2d35c2f60', From 4d1dcc98f642fb1d7c3f53f7bc4e83948c6e977b Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti Date: Wed, 30 Oct 2024 13:23:41 +0530 Subject: [PATCH 4/6] chore: fix --- src/v0/destinations/iterable/util.js | 2 +- test/integrations/destinations/iterable/router/data.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/v0/destinations/iterable/util.js b/src/v0/destinations/iterable/util.js index 003e82c744..e67376fd63 100644 --- a/src/v0/destinations/iterable/util.js +++ b/src/v0/destinations/iterable/util.js @@ -557,7 +557,7 @@ const processTrackBatch = (chunk) => { const { destination } = chunk[0]; const { apiKey, dataCenter } = destination.Config; - const TRACK_BATCH_ENDPOINT = constructEndpoint(dataCenter, { endpoint: 'users/bulkUpdate' }); + const TRACK_BATCH_ENDPOINT = constructEndpoint(dataCenter, { endpoint: 'events/trackBulk' }); chunk.forEach((event) => { metadata.push(event.metadata); events.push(get(event, `${MESSAGE_JSON_PATH}`)); diff --git a/test/integrations/destinations/iterable/router/data.ts b/test/integrations/destinations/iterable/router/data.ts index 255e67c001..7ea8e83765 100644 --- a/test/integrations/destinations/iterable/router/data.ts +++ b/test/integrations/destinations/iterable/router/data.ts @@ -503,7 +503,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/users/bulkUpdate', + endpoint: 'https://api.iterable.com/api/events/trackBulk', headers: { 'Content-Type': 'application/json', api_key: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -595,7 +595,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/users/bulkUpdate', + endpoint: 'https://api.iterable.com/api/events/trackBulk', headers: { 'Content-Type': 'application/json', api_key: '12345' }, params: {}, body: { @@ -707,7 +707,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/users/bulkUpdate', + endpoint: 'https://api.iterable.com/api/events/trackBulk', headers: { 'Content-Type': 'application/json', api_key: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -788,7 +788,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/users/update', + endpoint: 'https://api.iterable.com/api/users/bulkUpdate', headers: { 'Content-Type': 'application/json', api_key: '12345' }, params: {}, body: { From 4a7a50dc7bd6dec3db59cbaac10662273d3512a6 Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti Date: Wed, 30 Oct 2024 16:00:39 +0530 Subject: [PATCH 5/6] chore: modification for endpoint --- src/v0/destinations/iterable/util.js | 7 ++- .../destinations/iterable/router/data.ts | 60 +++++++++++-------- 2 files changed, 38 insertions(+), 29 deletions(-) diff --git a/src/v0/destinations/iterable/util.js b/src/v0/destinations/iterable/util.js index e67376fd63..b918600253 100644 --- a/src/v0/destinations/iterable/util.js +++ b/src/v0/destinations/iterable/util.js @@ -657,12 +657,13 @@ const mapRegisterDeviceOrBrowserTokenEventsWithJobId = (events) => { */ const categorizeEvent = (event) => { const { message, metadata, destination, error } = event; + const { dataCenter } = destination.Config; if (error) { return { type: 'error', data: event }; } - if (message.endpoint === ConfigCategory.IDENTIFY.endpoint) { + if (message.endpoint === constructEndpoint(dataCenter, ConfigCategory.IDENTIFY)) { return { type: 'updateUser', data: { message, metadata, destination } }; } @@ -671,8 +672,8 @@ const categorizeEvent = (event) => { } if ( - message.endpoint === ConfigCategory.IDENTIFY_BROWSER.endpoint || - message.endpoint === ConfigCategory.IDENTIFY_DEVICE.endpoint + message.endpoint === constructEndpoint(dataCenter, ConfigCategory.IDENTIFY_BROWSER) || + message.endpoint === constructEndpoint(dataCenter, ConfigCategory.IDENTIFY_DEVICE) ) { return { type: 'registerDeviceOrBrowser', data: { message, metadata, destination } }; } diff --git a/test/integrations/destinations/iterable/router/data.ts b/test/integrations/destinations/iterable/router/data.ts index 7ea8e83765..bf6f6bd3ef 100644 --- a/test/integrations/destinations/iterable/router/data.ts +++ b/test/integrations/destinations/iterable/router/data.ts @@ -550,7 +550,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://api.iterable.com/api/users/update', + endpoint: 'https://api.iterable.com/api/users/bulkUpdate', headers: { 'Content-Type': 'application/json', api_key: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -558,16 +558,20 @@ export const data = [ params: {}, body: { JSON: { - email: 'manashi@website.com', - dataFields: { - city: 'Bangalore', - name: 'manashi', - email: 'manashi@website.com', - country: 'India', - }, - userId: 'abcdeeeeeeeexxxx102', - preferUserId: true, - mergeNestedObjects: true, + users: [ + { + email: 'manashi@website.com', + dataFields: { + city: 'Bangalore', + name: 'manashi', + email: 'manashi@website.com', + country: 'India', + }, + userId: 'abcdeeeeeeeexxxx102', + preferUserId: true, + mergeNestedObjects: true, + }, + ], }, JSON_ARRAY: {}, XML: {}, @@ -576,7 +580,7 @@ export const data = [ files: {}, }, metadata: [{ jobId: 3, userId: 'u1' }], - batched: false, + batched: true, statusCode: 200, destination: { Config: { @@ -793,19 +797,23 @@ export const data = [ params: {}, body: { JSON: { - email: 'lynnanderson@smith.net', - dataFields: { - administrative_unit: 'Minnesota', - am_pm: 'AM', - boolean: true, - firstname: 'Jacqueline', - pPower: 'AM', - userId: 'Jacqueline', - email: 'lynnanderson@smith.net', - }, - userId: 'lynnanderson@smith.net', - preferUserId: true, - mergeNestedObjects: true, + users: [ + { + email: 'lynnanderson@smith.net', + dataFields: { + administrative_unit: 'Minnesota', + am_pm: 'AM', + boolean: true, + firstname: 'Jacqueline', + pPower: 'AM', + userId: 'Jacqueline', + email: 'lynnanderson@smith.net', + }, + userId: 'lynnanderson@smith.net', + preferUserId: true, + mergeNestedObjects: true, + }, + ], }, JSON_ARRAY: {}, XML: {}, @@ -814,7 +822,7 @@ export const data = [ files: {}, }, metadata: [{ jobId: 5, userId: 'u1' }], - batched: false, + batched: true, statusCode: 200, destination: { ID: '1zia9wKshXt80YksLmUdJnr7IHI', From a88ffdf9b0176f42d89cad2703186013da45124c Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti Date: Wed, 6 Nov 2024 19:04:19 +0530 Subject: [PATCH 6/6] chore: removed dataCenter to check default --- test/integrations/destinations/iterable/router/data.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/integrations/destinations/iterable/router/data.ts b/test/integrations/destinations/iterable/router/data.ts index bf6f6bd3ef..1917c078eb 100644 --- a/test/integrations/destinations/iterable/router/data.ts +++ b/test/integrations/destinations/iterable/router/data.ts @@ -161,7 +161,6 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', - dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -200,7 +199,6 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', - dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -536,7 +534,6 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', - dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false, @@ -585,7 +582,6 @@ export const data = [ destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', - dataCenter: 'USDC', mapToSingleEvent: false, trackAllPages: true, trackCategorisedPages: false,