diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index b20c022f64..20a122135a 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -43,7 +43,8 @@ jobs: source_branch_name=${GITHUB_REF##*/} release_type=release grep -q "hotfix/" <<< "${GITHUB_REF}" && release_type=hotfix-release - git fetch origin main --depth=1 + git fetch origin main + git fetch --tags origin git merge origin/main current_version=$(jq -r .version package.json) diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index 9b2ce52376..da2895076c 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -55,6 +55,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.PAT }} CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.PAT }} run: | + git fetch --tags origin git tag -a v${{ steps.extract-version.outputs.release_version }} -m "chore: release v${{ steps.extract-version.outputs.release_version }}" git push origin refs/tags/v${{ steps.extract-version.outputs.release_version }} npm run release:github diff --git a/CHANGELOG.md b/CHANGELOG.md index 5589709300..75758b0cff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,988 +2,83 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -## [1.21.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.20.2...v1.21.0) (2023-04-04) - - -### Bug Fixes - -* add canonicals for adobe analytics ([#2033](https://github.com/rudderlabs/rudder-transformer/issues/2033)) ([a5ce9f4](https://github.com/rudderlabs/rudder-transformer/commit/a5ce9f4564c4635420d9027f2229c4c098a3d6ca)) -* **customerio:** group call filter logic ([#2027](https://github.com/rudderlabs/rudder-transformer/issues/2027)) ([196e501](https://github.com/rudderlabs/rudder-transformer/commit/196e501006a93fa164f7207253a1b20ffce2342e)) -* removed console ([#2034](https://github.com/rudderlabs/rudder-transformer/issues/2034)) ([a03f5cd](https://github.com/rudderlabs/rudder-transformer/commit/a03f5cd2d54d2e04634733911f31d9fecfd4dd69)) - -### [1.20.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.20.0...v1.20.1) (2023-04-01) - - -### Features - -* add audience id for retl sources from context ([#2025](https://github.com/rudderlabs/rudder-transformer/issues/2025)) ([40481a8](https://github.com/rudderlabs/rudder-transformer/commit/40481a83100ac40316fb5b3eb999464c5b927b4d)) -* add fb to transformer proxy ([#1900](https://github.com/rudderlabs/rudder-transformer/issues/1900)) ([7e6341f](https://github.com/rudderlabs/rudder-transformer/commit/7e6341f3d065aecefe3abe634cd3720cf426583a)) - - -### Bug Fixes - -* **customerio:** added validations to convert integer to string ([#2017](https://github.com/rudderlabs/rudder-transformer/issues/2017)) ([f50b128](https://github.com/rudderlabs/rudder-transformer/commit/f50b12845008fb6b7bfdc410cf9b43a246dc4ca3)) -* **customerio:** update logic of getting event name ([#2028](https://github.com/rudderlabs/rudder-transformer/issues/2028)) ([18e4a83](https://github.com/rudderlabs/rudder-transformer/commit/18e4a83a8d2da1146dc1b1f78cf710a200c30b92)) - -## [1.20.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.19.0...v1.20.0) (2023-03-28) - - -### Bug Fixes - -* **gainsignt_px:** undefined attributes issue ([#2010](https://github.com/rudderlabs/rudder-transformer/issues/2010)) ([bf56359](https://github.com/rudderlabs/rudder-transformer/commit/bf5635942a88a3afc25506ba6591bf6b844624f3)) -* **monday:** axios call empty response issue ([#2001](https://github.com/rudderlabs/rudder-transformer/issues/2001)) ([196294f](https://github.com/rudderlabs/rudder-transformer/commit/196294f70bc967efea70aef084268db9c567417a)) -* **rockerbox:** make email as non-required field ([#1995](https://github.com/rudderlabs/rudder-transformer/issues/1995)) ([2f7ebff](https://github.com/rudderlabs/rudder-transformer/commit/2f7ebff62c8934165c1271a7c019c2b0b5b2a4b3)) -* **snapchat_conversion:** price calculation ([#1988](https://github.com/rudderlabs/rudder-transformer/issues/1988)) ([8240224](https://github.com/rudderlabs/rudder-transformer/commit/82402242a1ffe9ccc75671023cff1ebbbcb390e6)) -* **test-cases:** fix test cases to use template like secret keys ([#1973](https://github.com/rudderlabs/rudder-transformer/issues/1973)) ([f709d1f](https://github.com/rudderlabs/rudder-transformer/commit/f709d1fb9d1d22e306fc600872dd2b702436f961)) -* undefined columnToPropertyMapping config issue ([#1998](https://github.com/rudderlabs/rudder-transformer/issues/1998)) ([ef7a351](https://github.com/rudderlabs/rudder-transformer/commit/ef7a3511e26e652caa54fb600db01ebe6bd0cc3d)) - -## [1.19.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.18.0...v1.19.0) (2023-03-23) - - -### Bug Fixes - -* file names in helm charts update job ([#1992](https://github.com/rudderlabs/rudder-transformer/issues/1992)) ([c694b49](https://github.com/rudderlabs/rudder-transformer/commit/c694b49cfae270e10bdad1d2e990f287b679649d)) -* **GA4:** revert context.traits support for user_properties ([#1991](https://github.com/rudderlabs/rudder-transformer/issues/1991)) ([ae001dc](https://github.com/rudderlabs/rudder-transformer/commit/ae001dc7aafe8b33be696acac9fad3416b51f8e8)) -* revert context.traits support for user_properties ([4f51403](https://github.com/rudderlabs/rudder-transformer/commit/4f51403facdadfc2928f13159918bede3a5c073c)) - -## [1.18.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.17.0...v1.18.0) (2023-03-23) - - -### Features - -* **indicative:** parse user agent info ([#1971](https://github.com/rudderlabs/rudder-transformer/issues/1971)) ([1328b5a](https://github.com/rudderlabs/rudder-transformer/commit/1328b5ac38f9d21def89bacbbca4891dbd6e4450)) - - -### Bug Fixes - -* changelog ([d8d81a2](https://github.com/rudderlabs/rudder-transformer/commit/d8d81a2d4ad428be2936932f22e63fd9007d9799)) -* ga4 user_properties structure ([#1982](https://github.com/rudderlabs/rudder-transformer/issues/1982)) ([3d81202](https://github.com/rudderlabs/rudder-transformer/commit/3d81202fcd88b8033504e9f5aa5d095e6863dc76)) -* tik-tok ads offline events email array issue ([#1979](https://github.com/rudderlabs/rudder-transformer/issues/1979)) ([3c7f4ac](https://github.com/rudderlabs/rudder-transformer/commit/3c7f4ac60ec564198f0bf0524a0780dfc581140a)) - -## [1.17.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.16.2...v1.17.0) (2023-03-21) - - -### Features - -* add default action source ([#1957](https://github.com/rudderlabs/rudder-transformer/issues/1957)) ([043cae2](https://github.com/rudderlabs/rudder-transformer/commit/043cae2802c81e7a1d25d266eaeca06a3000aeaa)) -* **braze:** refactor code custom attribute operations ([#1943](https://github.com/rudderlabs/rudder-transformer/issues/1943)) ([9c91bfc](https://github.com/rudderlabs/rudder-transformer/commit/9c91bfc4f7eeeaa1e97174a2c96c1902c6817c6a)) -* **mix-panel:** add support for multiple group key value ([#1773](https://github.com/rudderlabs/rudder-transformer/issues/1773)) ([e7a8d48](https://github.com/rudderlabs/rudder-transformer/commit/e7a8d489cb3fda2718e106730d69506e6f56c9f3)) - - -### Bug Fixes - -* added products array check for iterable destination ([#1949](https://github.com/rudderlabs/rudder-transformer/issues/1949)) ([87db73e](https://github.com/rudderlabs/rudder-transformer/commit/87db73e062dcac54fdb1906659a90d2df0f13648)) -* **fb pixel:** ecomm ([#1932](https://github.com/rudderlabs/rudder-transformer/issues/1932)) ([8d5e07a](https://github.com/rudderlabs/rudder-transformer/commit/8d5e07a2862ee757ecd3523b36e150f29a134b0f)), closes [#1964](https://github.com/rudderlabs/rudder-transformer/issues/1964) -* **firehose:** handle undefined message type ([#1942](https://github.com/rudderlabs/rudder-transformer/issues/1942)) ([d3ea664](https://github.com/rudderlabs/rudder-transformer/commit/d3ea664c182cc1702ab0298cf79ecad2aae7ce6b)) -* **integration:** pinterest content_id field dropped when having null value to match with cdkv2 ([#1950](https://github.com/rudderlabs/rudder-transformer/issues/1950)) ([09995e9](https://github.com/rudderlabs/rudder-transformer/commit/09995e9cc9931827d8be5b1ede59be9ce77c0cd4)) - -### [1.16.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.16.1...v1.16.2) (2023-03-16) - - -### Bug Fixes - -* add optional chaining for phone in tiktok_ads_offline_events ([37dc013](https://github.com/rudderlabs/rudder-transformer/commit/37dc0139a28fab113eac4b337f3475ac2ea29262)) - -### [1.16.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.16.0...v1.16.1) (2023-03-15) - - -### Bug Fixes - -* **fb pixel:** add default action source ([#1946](https://github.com/rudderlabs/rudder-transformer/issues/1946)) ([2e03f4d](https://github.com/rudderlabs/rudder-transformer/commit/2e03f4dcfbfb1c6d35aecf950e0f1e3828ceaaef)) - -## [1.16.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.15.1...v1.16.0) (2023-03-14) - - -### Features - -* **facebook_app_events:** update api version ([#1921](https://github.com/rudderlabs/rudder-transformer/issues/1921)) ([793ebfb](https://github.com/rudderlabs/rudder-transformer/commit/793ebfb39e8667882cd40ff4add2ea6b5dfb9564)) - - -### Bug Fixes - -* changelog ([ef13dd8](https://github.com/rudderlabs/rudder-transformer/commit/ef13dd8bef572c80ddb8511abb7d5be23cc5dd81)) -* create pull-request jobs in workflows ([36b2677](https://github.com/rudderlabs/rudder-transformer/commit/36b2677209b9b34a33375381dd74a74988e11dd2)) -* syntax issue in workflow ([09d7659](https://github.com/rudderlabs/rudder-transformer/commit/09d765912ef07552729c1193e28c1bd149f68401)) -* syntax issue in workflow ([c84ef6e](https://github.com/rudderlabs/rudder-transformer/commit/c84ef6e1d1b4feefb208e10c316c4f5bd647efa3)) -* **util:** getDestinationExternalIDObjectForRetl funciton ([#1919](https://github.com/rudderlabs/rudder-transformer/issues/1919)) ([235243d](https://github.com/rudderlabs/rudder-transformer/commit/235243de9afb1b52b56b7db9170e5eb3345b1de6)) - -### [1.15.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.15.0...v1.15.1) (2023-03-13) - - -### Features - -* mautic: support self hosted instance ([#1909](https://github.com/rudderlabs/rudder-transformer/issues/1909)) ([7c0a724](https://github.com/rudderlabs/rudder-transformer/commit/7c0a7240d9fcef45e4066a4a7dee8234c7e782d3)) -* moenagae alias call support ([#1930](https://github.com/rudderlabs/rudder-transformer/issues/1930)) ([194bf8e](https://github.com/rudderlabs/rudder-transformer/commit/194bf8e3e2f47ca63ee273c9255468b41bc6ffcf)) -* transformation secrets ([#1912](https://github.com/rudderlabs/rudder-transformer/issues/1912)) ([a0b488a](https://github.com/rudderlabs/rudder-transformer/commit/a0b488a4514c9c868f39d000a4ae40aa3f7b5de6)) - - -### Bug Fixes - -* client_id mapping for ga4 ([#1904](https://github.com/rudderlabs/rudder-transformer/issues/1904)) ([9aaf908](https://github.com/rudderlabs/rudder-transformer/commit/9aaf90864bd489fb463a56f62a673ead2bb83fe5)) -* **destination:** add channel as platform ([#1906](https://github.com/rudderlabs/rudder-transformer/issues/1906)) ([4cfbbd0](https://github.com/rudderlabs/rudder-transformer/commit/4cfbbd02530d1cc02b1b04ab5c721f1b642d41bc)) -* remove ga4 identify call support for cloud mode and treat identify call event as track events (login, sign_up and generate_lead) ([#1903](https://github.com/rudderlabs/rudder-transformer/issues/1903)) ([fa8fd74](https://github.com/rudderlabs/rudder-transformer/commit/fa8fd74f14d0ac6707f83ed81897a541ae6191e6)) -* **slack:** handlebars error handling ([#1910](https://github.com/rudderlabs/rudder-transformer/issues/1910)) ([0c6bc2e](https://github.com/rudderlabs/rudder-transformer/commit/0c6bc2edb17986a1d99365a4468a67bd65e09e47)) - -## [1.15.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.14.0...v1.15.0) (2023-03-07) - - -### Features - -* log process memory errors ([#1920](https://github.com/rudderlabs/rudder-transformer/issues/1920)) ([076d7b5](https://github.com/rudderlabs/rudder-transformer/commit/076d7b58831b035102a0544985d9a1ff67ef1791)) -* revamp github actions for release management ([#1898](https://github.com/rudderlabs/rudder-transformer/issues/1898)) ([8847f58](https://github.com/rudderlabs/rudder-transformer/commit/8847f589dc2248d4210c82326022d9f459b2f888)) -* suppress errors from unwanted modules to bugsnag ([#1907](https://github.com/rudderlabs/rudder-transformer/issues/1907)) ([9e6a1c0](https://github.com/rudderlabs/rudder-transformer/commit/9e6a1c0bd3dfa79e2a470eefad7d4c9b34c842cb)) - - -### Bug Fixes - -* correcting method name for prepareProxy ([#1923](https://github.com/rudderlabs/rudder-transformer/issues/1923)) ([cfed522](https://github.com/rudderlabs/rudder-transformer/commit/cfed5228be21bd8d7f5a2ea8bc4b97c973a112be)) -* **fb pixel:** zp mapping and external_id ([#1908](https://github.com/rudderlabs/rudder-transformer/issues/1908)) ([c8665d4](https://github.com/rudderlabs/rudder-transformer/commit/c8665d4475fe06d45d3b4fdd26b46247be0188f6)) -* **ga4:** product array issue ([#1845](https://github.com/rudderlabs/rudder-transformer/issues/1845)) ([3d24e93](https://github.com/rudderlabs/rudder-transformer/commit/3d24e93a6c00c3d2bd425012e4b315997b5e05b6)) -* updated batching logic for pinterest_tag ([#1878](https://github.com/rudderlabs/rudder-transformer/issues/1878)) ([e38d772](https://github.com/rudderlabs/rudder-transformer/commit/e38d7721451d4c43d8c1fe67d28566302dced440)) - -## [1.14.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.13.0...v1.14.0) (2023-02-28) - - -### Features - -* added customerio group call support ([#1869](https://github.com/rudderlabs/rudder-transformer/issues/1869)) ([5e692ea](https://github.com/rudderlabs/rudder-transformer/commit/5e692ead3c43819edd47f8cf244a3f78ce510359)) -* added new destination vitally ([#1892](https://github.com/rudderlabs/rudder-transformer/issues/1892)) ([8638ee7](https://github.com/rudderlabs/rudder-transformer/commit/8638ee7765b4e3ecf215ec90056d03cffb42f5f6)) -* include latest image of transformer ([#1879](https://github.com/rudderlabs/rudder-transformer/issues/1879)) ([b179fef](https://github.com/rudderlabs/rudder-transformer/commit/b179fef031fe06aa8d4e3b258c4740b45f4387bb)) -* onboard courier destination ([#1844](https://github.com/rudderlabs/rudder-transformer/issues/1844)) ([#1883](https://github.com/rudderlabs/rudder-transformer/issues/1883)) ([18bcdf8](https://github.com/rudderlabs/rudder-transformer/commit/18bcdf8b4b1f0b63cbe3f839df38f4b6b6875e98)) -* python libraries ([#1855](https://github.com/rudderlabs/rudder-transformer/issues/1855)) ([01f3df5](https://github.com/rudderlabs/rudder-transformer/commit/01f3df5ad5868a3604715c26f7ea9d8dea82860b)) -* **transformation:** adding rudder libraries support ([#1817](https://github.com/rudderlabs/rudder-transformer/issues/1817)) ([1c91d22](https://github.com/rudderlabs/rudder-transformer/commit/1c91d22795b142a90011e35cf85d1a4ac8eaa545)) - - -### Bug Fixes - -* **active-campaign:** add check before iterating stored event array ([#1902](https://github.com/rudderlabs/rudder-transformer/issues/1902)) ([9666e85](https://github.com/rudderlabs/rudder-transformer/commit/9666e851751101efc99f1d48018a9ae1ed6a9b8e)) -* **integration:** Algolia in CDK v2 now errors out for non string event names ([#1867](https://github.com/rudderlabs/rudder-transformer/issues/1867)) ([5be8891](https://github.com/rudderlabs/rudder-transformer/commit/5be88917270a9fb1c28fdd7f547e9a017aacf56d)) -* logger import ([#1874](https://github.com/rudderlabs/rudder-transformer/issues/1874)) ([7ff1b4a](https://github.com/rudderlabs/rudder-transformer/commit/7ff1b4a11fe530de45dacce1da7bf0d58d4b38fd)) -* package.json & package-lock.json to reduce vulnerabilities ([#1885](https://github.com/rudderlabs/rudder-transformer/issues/1885)) ([11b4a4b](https://github.com/rudderlabs/rudder-transformer/commit/11b4a4b523b00dffb0c9d0017a6ed3279fc596d2)) - -## [1.13.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.12.0...v1.13.0) (2023-02-15) - - -### Features - -* **destination:** onboard criteo audience ([#1792](https://github.com/rudderlabs/rudder-transformer/issues/1792)) ([5904c75](https://github.com/rudderlabs/rudder-transformer/commit/5904c75042c7cb34320fc43bcd3b54bfe5ce97fc)) -* **integration:** rockerbox - add support for custom properties mapping ([#1815](https://github.com/rudderlabs/rudder-transformer/issues/1815)) ([8ba50d2](https://github.com/rudderlabs/rudder-transformer/commit/8ba50d2249d5bd5db84ff9c37323e618b5942ec5)) -* **integration:** rockerbox - allow all properties to be passed over to rockerbox ([#1838](https://github.com/rudderlabs/rudder-transformer/issues/1838)) ([fb64039](https://github.com/rudderlabs/rudder-transformer/commit/fb6403992c76077398a9f8b5ac4cbe9fb28fd073)) -* **integrations:** onboarding webhook to CDK v2 ([#1783](https://github.com/rudderlabs/rudder-transformer/issues/1783)) ([22d583a](https://github.com/rudderlabs/rudder-transformer/commit/22d583ae2c239f532629a0d0db055658e2eda65d)) -* **mailchimp:** add support for track call ([#1814](https://github.com/rudderlabs/rudder-transformer/issues/1814)) ([94c10ba](https://github.com/rudderlabs/rudder-transformer/commit/94c10ba971a54f5f9894c0107a96a121068994cf)) -* moengage source ([#1846](https://github.com/rudderlabs/rudder-transformer/issues/1846)) ([123a2d9](https://github.com/rudderlabs/rudder-transformer/commit/123a2d9f57fd4f0c76f939b8d56edbbbc995ab00)) -* **new integration:** onboard optimizely fullstack cloud mode ([#1805](https://github.com/rudderlabs/rudder-transformer/issues/1805)) ([5373185](https://github.com/rudderlabs/rudder-transformer/commit/537318589110672ad6f453510a19e7fde3bfd2bb)) -* shopify - add cart token, order token and checkout token in the Context object ([#1847](https://github.com/rudderlabs/rudder-transformer/issues/1847)) ([88e8fe0](https://github.com/rudderlabs/rudder-transformer/commit/88e8fe0a14766532739aaf800cebb61b0ef6175d)) -* **source:** initial commit for identity stitching in shopify ([#1810](https://github.com/rudderlabs/rudder-transformer/issues/1810)) ([7b662df](https://github.com/rudderlabs/rudder-transformer/commit/7b662dfbf192f08f7bd2baf8dbd9dc5f12a8f23e)) -* **transformation:** libraries import extractor ([#1851](https://github.com/rudderlabs/rudder-transformer/issues/1851)) ([462bba9](https://github.com/rudderlabs/rudder-transformer/commit/462bba9e9ed49f0a76a8bb0e4d0b444e324f208c)) -* userId to be converted to string for Router ([#1822](https://github.com/rudderlabs/rudder-transformer/issues/1822)) ([7ec03c6](https://github.com/rudderlabs/rudder-transformer/commit/7ec03c66632513da4a311c3e19abcb3accf3437e)) - - -### Bug Fixes - -* **active_campaign:** handle bad url string while formatting with domainUrlV2 ([#1816](https://github.com/rudderlabs/rudder-transformer/issues/1816)) ([7fd15be](https://github.com/rudderlabs/rudder-transformer/commit/7fd15be8633c9cc6fcb4448f73042d641f81356c)) -* amplitude check for actionKey before accessing it ([#1833](https://github.com/rudderlabs/rudder-transformer/issues/1833)) ([5071582](https://github.com/rudderlabs/rudder-transformer/commit/50715827981e70e814c427cfa0359de16fb3c554)) -* bugsnag errors ([#1863](https://github.com/rudderlabs/rudder-transformer/issues/1863)) ([ae627d3](https://github.com/rudderlabs/rudder-transformer/commit/ae627d3adc48aa5ab390461693005d8957757430)) -* **CDK v2:** editing CDK v2 for pinterest tag for num_items field ([#1840](https://github.com/rudderlabs/rudder-transformer/issues/1840)) ([b1265c0](https://github.com/rudderlabs/rudder-transformer/commit/b1265c0949f8352881dfb13d5d31ba712e26363b)) -* codebuild issue ([16eab14](https://github.com/rudderlabs/rudder-transformer/commit/16eab14e627184d04b1a7dbb1fdd3388ff065c85)) -* criteo_audience: stringification of destination error ([#1839](https://github.com/rudderlabs/rudder-transformer/issues/1839)) ([fe17453](https://github.com/rudderlabs/rudder-transformer/commit/fe17453db7bef03916feb271bae1c25b613829da)) -* ga4 userId issue ([#1857](https://github.com/rudderlabs/rudder-transformer/issues/1857)) ([cd30c47](https://github.com/rudderlabs/rudder-transformer/commit/cd30c47f292db71a8961bef6b38a3478316e00b9)) -* **integration:** Pinterest conversion in CDK v2 returns correct num_items for single product array ([#1861](https://github.com/rudderlabs/rudder-transformer/issues/1861)) ([8c8c316](https://github.com/rudderlabs/rudder-transformer/commit/8c8c316b9ba795111f716c314cedb189e968260e)) -* **integrations:** salesforce update error message and error response handler ([#1799](https://github.com/rudderlabs/rudder-transformer/issues/1799)) ([b473c23](https://github.com/rudderlabs/rudder-transformer/commit/b473c2389909e1f06d8d79b279e66b86b414c908)) -* **klaviyo:** skip profile lookup call for rETL events ([#1856](https://github.com/rudderlabs/rudder-transformer/issues/1856)) ([9e6b5e4](https://github.com/rudderlabs/rudder-transformer/commit/9e6b5e4c145d64341e043014baed4e344fecc74c)) -* order_token updated in shopify ([#1865](https://github.com/rudderlabs/rudder-transformer/issues/1865)) ([7fc608e](https://github.com/rudderlabs/rudder-transformer/commit/7fc608e0f1c264c4494b987e0102ff48aa51e4fe)) -* package.json & package-lock.json to reduce vulnerabilities ([#1824](https://github.com/rudderlabs/rudder-transformer/issues/1824)) ([779edb2](https://github.com/rudderlabs/rudder-transformer/commit/779edb290b04694b126739708a30be024a53fe33)) -* refactor subscribe user flow to stop subscribing user without consent ([#1841](https://github.com/rudderlabs/rudder-transformer/issues/1841)) ([fe231c2](https://github.com/rudderlabs/rudder-transformer/commit/fe231c280a1250413f4b665820e4da303e05259a)) -* set context as metadata in bugsnag error notification ([#1778](https://github.com/rudderlabs/rudder-transformer/issues/1778)) ([55c3097](https://github.com/rudderlabs/rudder-transformer/commit/55c309716877b303943c18537352347b83d72c2f)) -* **singular:** undefined properties object for track ([#1808](https://github.com/rudderlabs/rudder-transformer/issues/1808)) ([f53bec1](https://github.com/rudderlabs/rudder-transformer/commit/f53bec192825aedfcf320197c386a449f9677816)) -* **transformation:** release isolate in case of error while creating ([#1850](https://github.com/rudderlabs/rudder-transformer/issues/1850)) ([ea51e24](https://github.com/rudderlabs/rudder-transformer/commit/ea51e24a893daa18e9b30463e9300ce029230a00)) -* typecast userId, anonymousId to string ([2150033](https://github.com/rudderlabs/rudder-transformer/commit/215003381557c583bd8889cef121ebbba56785c2)) -* undefined check added for isHybridModeEnabled function ([#1812](https://github.com/rudderlabs/rudder-transformer/issues/1812)) ([a49be9e](https://github.com/rudderlabs/rudder-transformer/commit/a49be9e77b6ba6bc1ef5087208ddc1a135e4301e)) -* update check for props value ([343e946](https://github.com/rudderlabs/rudder-transformer/commit/343e946ed4adc89ad8c17d945b69c2f3f3be7506)) - -## [1.12.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.11.0...v1.12.0) (2023-01-19) - - -### Features - -* **BQStream:** add batch support ([#1377](https://github.com/rudderlabs/rudder-transformer/issues/1377)) ([14c7531](https://github.com/rudderlabs/rudder-transformer/commit/14c7531635b5348ef518dcad483f25d4adeddddd)) -* **destination:** onboard lemnisk integration ([#1787](https://github.com/rudderlabs/rudder-transformer/issues/1787)) ([3c6b9e1](https://github.com/rudderlabs/rudder-transformer/commit/3c6b9e148dff559357fb61de49602f9d1689d699)), closes [#1728](https://github.com/rudderlabs/rudder-transformer/issues/1728) -* ga4 page calls are discarded if hybrid mode is enabled ([#1794](https://github.com/rudderlabs/rudder-transformer/issues/1794)) ([ca12d07](https://github.com/rudderlabs/rudder-transformer/commit/ca12d078e3f936c4c0fd4449259d1a55ba0a4424)) -* sessionId consistency across destinations ([#1789](https://github.com/rudderlabs/rudder-transformer/issues/1789)) ([ff68a44](https://github.com/rudderlabs/rudder-transformer/commit/ff68a4488e50f4a44c950395d0f9e5dc514db1df)) - - -### Bug Fixes - -* add missing implementation stat tag for router transformation ([#1779](https://github.com/rudderlabs/rudder-transformer/issues/1779)) ([5ebde56](https://github.com/rudderlabs/rudder-transformer/commit/5ebde56ea644f81d1a17fa4d85697821879fa191)) -* add sources as valid channel to cdkv1 ([bd74ef7](https://github.com/rudderlabs/rudder-transformer/commit/bd74ef7eff712d4db75856a205ddaa473d80ddd9)) -* add sources as valid channel to cdkv1 ([#1803](https://github.com/rudderlabs/rudder-transformer/issues/1803)) ([e3057db](https://github.com/rudderlabs/rudder-transformer/commit/e3057dbff9d8daa1f64b5cd6de6b57ab97c016ee)) -* add validation for event name as string ([#1768](https://github.com/rudderlabs/rudder-transformer/issues/1768)) ([c48ec5e](https://github.com/rudderlabs/rudder-transformer/commit/c48ec5e3cd6590e5c766bc3afac9eb5c368b85f0)) -* array type check for externalIdArray ([#1785](https://github.com/rudderlabs/rudder-transformer/issues/1785)) ([dec3bb6](https://github.com/rudderlabs/rudder-transformer/commit/dec3bb6661b6737203964b2c4b5e3d2bd7421433)) -* bugsnag error fixes for salesforce, garl, gaoc ([#1776](https://github.com/rudderlabs/rudder-transformer/issues/1776)) ([553c5de](https://github.com/rudderlabs/rudder-transformer/commit/553c5defc098e01e74d98606cf59baa9008b814d)) -* change destination configuration errors to abortable ([#1790](https://github.com/rudderlabs/rudder-transformer/issues/1790)) ([fb1281d](https://github.com/rudderlabs/rudder-transformer/commit/fb1281d2bc090bda34c7420c10946504e83756ef)) -* destination transformation change from processor to router ([#1754](https://github.com/rudderlabs/rudder-transformer/issues/1754)) ([674d476](https://github.com/rudderlabs/rudder-transformer/commit/674d476bd1e55194456798c7a83bd27a62b868e3)) -* **integration:** GAOC - fix timestamp format, allow calls without custom variables ([#1796](https://github.com/rudderlabs/rudder-transformer/issues/1796)) ([7c450ee](https://github.com/rudderlabs/rudder-transformer/commit/7c450ee78db2052bbb70866cbc6bd98cfd9c32b4)) -* iterable alias call is separated from identify batching ([#1777](https://github.com/rudderlabs/rudder-transformer/issues/1777)) ([3676c45](https://github.com/rudderlabs/rudder-transformer/commit/3676c4591e8b241ad6a7873954bc8f07e7a69584)) -* products array mapping and rename impact_radius to impact ([#1797](https://github.com/rudderlabs/rudder-transformer/issues/1797)) ([f812f0d](https://github.com/rudderlabs/rudder-transformer/commit/f812f0d3fbff6d6bfdd3670c59cf8ea01744f80f)) -* proper error throw in gaec ([#1767](https://github.com/rudderlabs/rudder-transformer/issues/1767)) ([a2ed19d](https://github.com/rudderlabs/rudder-transformer/commit/a2ed19dc0b5eb6bbaec7dd88b25762553b1aae79)) -* remove regex validation for phone_number ([#1771](https://github.com/rudderlabs/rudder-transformer/issues/1771)) ([6c01642](https://github.com/rudderlabs/rudder-transformer/commit/6c016428b496cea7e3771d3cf5ab4dfbbd7e382b)) -* revert salesforce fix for undefined access_token ([#1780](https://github.com/rudderlabs/rudder-transformer/issues/1780)) ([d917b2e](https://github.com/rudderlabs/rudder-transformer/commit/d917b2e61afbdfb697e5d6066aa6e34fd9f71427)) -* send dest info for failed events ([#1770](https://github.com/rudderlabs/rudder-transformer/issues/1770)) ([9f108c0](https://github.com/rudderlabs/rudder-transformer/commit/9f108c0b6a0978b7ca71d1b1bbeaafbba8dce2ee)) - -## [1.11.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.10.0...v1.11.0) (2023-01-10) - - -### Features - -* [impact radius] onboard impact radius cloud mode destination ([#1730](https://github.com/rudderlabs/rudder-transformer/issues/1730)) ([8d55c24](https://github.com/rudderlabs/rudder-transformer/commit/8d55c24930e45ddb0a38d1e2ca935b11d8fac665)), closes [#1764](https://github.com/rudderlabs/rudder-transformer/issues/1764) -* appcenter updated to support test events ([#1741](https://github.com/rudderlabs/rudder-transformer/issues/1741)) ([00648da](https://github.com/rudderlabs/rudder-transformer/commit/00648da21286cf4170e395e601dcd4b7d199957f)) -* **braze:** nested array ops ([#1753](https://github.com/rudderlabs/rudder-transformer/issues/1753)) ([0658a5f](https://github.com/rudderlabs/rudder-transformer/commit/0658a5f323a7b076a88fcb987f2ac25ea803552f)) -* clientId support added for ga4 hybrid mode ([#1759](https://github.com/rudderlabs/rudder-transformer/issues/1759)) ([04638cb](https://github.com/rudderlabs/rudder-transformer/commit/04638cb1550c05435a12d8ed481fd55c13e667da)) -* **destination:** onboard discord ([#1725](https://github.com/rudderlabs/rudder-transformer/issues/1725)) ([4f6323b](https://github.com/rudderlabs/rudder-transformer/commit/4f6323bcb5e13fb70fd0fd879c64917d46120a34)), closes [#1647](https://github.com/rudderlabs/rudder-transformer/issues/1647) [#1644](https://github.com/rudderlabs/rudder-transformer/issues/1644) [#1656](https://github.com/rudderlabs/rudder-transformer/issues/1656) [#1658](https://github.com/rudderlabs/rudder-transformer/issues/1658) [#1665](https://github.com/rudderlabs/rudder-transformer/issues/1665) [#1649](https://github.com/rudderlabs/rudder-transformer/issues/1649) [#1652](https://github.com/rudderlabs/rudder-transformer/issues/1652) [#1651](https://github.com/rudderlabs/rudder-transformer/issues/1651) [#1669](https://github.com/rudderlabs/rudder-transformer/issues/1669) [#1673](https://github.com/rudderlabs/rudder-transformer/issues/1673) [#1638](https://github.com/rudderlabs/rudder-transformer/issues/1638) [#1641](https://github.com/rudderlabs/rudder-transformer/issues/1641) [#1653](https://github.com/rudderlabs/rudder-transformer/issues/1653) [#1661](https://github.com/rudderlabs/rudder-transformer/issues/1661) [#1666](https://github.com/rudderlabs/rudder-transformer/issues/1666) [#1667](https://github.com/rudderlabs/rudder-transformer/issues/1667) [#1671](https://github.com/rudderlabs/rudder-transformer/issues/1671) [#1659](https://github.com/rudderlabs/rudder-transformer/issues/1659) [#1654](https://github.com/rudderlabs/rudder-transformer/issues/1654) [#1655](https://github.com/rudderlabs/rudder-transformer/issues/1655) [#1670](https://github.com/rudderlabs/rudder-transformer/issues/1670) [#1657](https://github.com/rudderlabs/rudder-transformer/issues/1657) [#1672](https://github.com/rudderlabs/rudder-transformer/issues/1672) [#1642](https://github.com/rudderlabs/rudder-transformer/issues/1642) [#1645](https://github.com/rudderlabs/rudder-transformer/issues/1645) [#1650](https://github.com/rudderlabs/rudder-transformer/issues/1650) [#1639](https://github.com/rudderlabs/rudder-transformer/issues/1639) [#1674](https://github.com/rudderlabs/rudder-transformer/issues/1674) [#1660](https://github.com/rudderlabs/rudder-transformer/issues/1660) [#1648](https://github.com/rudderlabs/rudder-transformer/issues/1648) [#1675](https://github.com/rudderlabs/rudder-transformer/issues/1675) [#1677](https://github.com/rudderlabs/rudder-transformer/issues/1677) [#1678](https://github.com/rudderlabs/rudder-transformer/issues/1678) [#1676](https://github.com/rudderlabs/rudder-transformer/issues/1676) [#1680](https://github.com/rudderlabs/rudder-transformer/issues/1680) [#1682](https://github.com/rudderlabs/rudder-transformer/issues/1682) [#1681](https://github.com/rudderlabs/rudder-transformer/issues/1681) [#1684](https://github.com/rudderlabs/rudder-transformer/issues/1684) [#1685](https://github.com/rudderlabs/rudder-transformer/issues/1685) [#1686](https://github.com/rudderlabs/rudder-transformer/issues/1686) [#1687](https://github.com/rudderlabs/rudder-transformer/issues/1687) [#1688](https://github.com/rudderlabs/rudder-transformer/issues/1688) [#1689](https://github.com/rudderlabs/rudder-transformer/issues/1689) [#1690](https://github.com/rudderlabs/rudder-transformer/issues/1690) [#1691](https://github.com/rudderlabs/rudder-transformer/issues/1691) [#1692](https://github.com/rudderlabs/rudder-transformer/issues/1692) [#1697](https://github.com/rudderlabs/rudder-transformer/issues/1697) [#1699](https://github.com/rudderlabs/rudder-transformer/issues/1699) [#1700](https://github.com/rudderlabs/rudder-transformer/issues/1700) [#1698](https://github.com/rudderlabs/rudder-transformer/issues/1698) [#1704](https://github.com/rudderlabs/rudder-transformer/issues/1704) [#1705](https://github.com/rudderlabs/rudder-transformer/issues/1705) -* **destination:** onboard pipedream ([#1703](https://github.com/rudderlabs/rudder-transformer/issues/1703)) ([f03e86a](https://github.com/rudderlabs/rudder-transformer/commit/f03e86a89c1123310b5d9507c5e4d82ea3d4bbf8)) -* **destination:** onboard TikTok_Ads_Offline_Events ([#1749](https://github.com/rudderlabs/rudder-transformer/issues/1749)) ([67a3a4e](https://github.com/rudderlabs/rudder-transformer/commit/67a3a4ef6f9caa3a87afce09d502a702c584ce33)) -* ga4 hybrid mode support ([#1709](https://github.com/rudderlabs/rudder-transformer/issues/1709)) ([08779d4](https://github.com/rudderlabs/rudder-transformer/commit/08779d4b8ff94bd21d9ef3600736503193da1620)) -* **integration:** adobe_analytics-fix typo, add missing mapping ([#1763](https://github.com/rudderlabs/rudder-transformer/issues/1763)) ([32f65dc](https://github.com/rudderlabs/rudder-transformer/commit/32f65dcdd3d807be1eb9a409a7b5b1d0892b067a)) -* **new integration:** onboarding sendinblue cloud mode destination ([#1662](https://github.com/rudderlabs/rudder-transformer/issues/1662)) ([e265e66](https://github.com/rudderlabs/rudder-transformer/commit/e265e66a900671f537198769b8ee0c61694bdbf2)) -* onboard pagerduty destination ([#1736](https://github.com/rudderlabs/rudder-transformer/issues/1736)) ([a947b10](https://github.com/rudderlabs/rudder-transformer/commit/a947b10c5d642463d1a03061906520ebbfdc9b05)) -* onboard pagerduty source ([#1721](https://github.com/rudderlabs/rudder-transformer/issues/1721)) ([927fa95](https://github.com/rudderlabs/rudder-transformer/commit/927fa951c35cfe098dfdb3e5499fdffcc47cb18d)) -* **pinterest:** add ldp support ([#1731](https://github.com/rudderlabs/rudder-transformer/issues/1731)) ([a54d074](https://github.com/rudderlabs/rudder-transformer/commit/a54d074f547e5e1d291bf6fa830afc013c2c7146)) -* **transformation:** faas integration for python transformations ([#1664](https://github.com/rudderlabs/rudder-transformer/issues/1664)) ([5ac8ac5](https://github.com/rudderlabs/rudder-transformer/commit/5ac8ac54b2e10ff600ab7c08b8a9ce3e6a345bee)) - - -### Bug Fixes - -* **amplitude:** added an error validation at processor ([#1717](https://github.com/rudderlabs/rudder-transformer/issues/1717)) ([424bce9](https://github.com/rudderlabs/rudder-transformer/commit/424bce9cc72a2196a955efd08e643d04e337317a)) -* **destination:** credentials exposure on live events for aws lambda ([#1726](https://github.com/rudderlabs/rudder-transformer/issues/1726)) ([589fc40](https://github.com/rudderlabs/rudder-transformer/commit/589fc407d2c4449628fa7915289ae9a1c97d20d4)) -* encode email with encodeUriComponent before searching ([#1729](https://github.com/rudderlabs/rudder-transformer/issues/1729)) ([21b624f](https://github.com/rudderlabs/rudder-transformer/commit/21b624f59c098a0459a16347e1845d7a661377fd)) -* **facebook pixel:** error code mapping for transformer proxy ([#1738](https://github.com/rudderlabs/rudder-transformer/issues/1738)) ([4e98299](https://github.com/rudderlabs/rudder-transformer/commit/4e98299298f10dc5ae39d5a3994746515622c729)) -* fixed flattenJson method ([#1718](https://github.com/rudderlabs/rudder-transformer/issues/1718)) ([9edb44e](https://github.com/rudderlabs/rudder-transformer/commit/9edb44e11b9b7ae059e9f4cfa88633e3fa4cd902)) -* hotfix for zendesk global variable ([a5d4424](https://github.com/rudderlabs/rudder-transformer/commit/a5d442405b3b55cc3bafd1389a771904d31da7c6)) -* set content_type product by default ([#1761](https://github.com/rudderlabs/rudder-transformer/issues/1761)) ([6f9cda1](https://github.com/rudderlabs/rudder-transformer/commit/6f9cda143cb8ab6b215f4b3684c5375a76d160fd)) -* user deletion handlers implementation across destinations ([#1748](https://github.com/rudderlabs/rudder-transformer/issues/1748)) ([786cfe0](https://github.com/rudderlabs/rudder-transformer/commit/786cfe0d0849d68a511c920d6c292ef3f73aee7f)), closes [#1720](https://github.com/rudderlabs/rudder-transformer/issues/1720) [#1719](https://github.com/rudderlabs/rudder-transformer/issues/1719) [#1723](https://github.com/rudderlabs/rudder-transformer/issues/1723) [#1751](https://github.com/rudderlabs/rudder-transformer/issues/1751) [#1750](https://github.com/rudderlabs/rudder-transformer/issues/1750) [#1735](https://github.com/rudderlabs/rudder-transformer/issues/1735) -* **zendesk:** remove endpoint global variable ([#1746](https://github.com/rudderlabs/rudder-transformer/issues/1746)) ([836c37e](https://github.com/rudderlabs/rudder-transformer/commit/836c37eb069ee88d24806e692ec70e0d0b045ae1)) - -## [1.10.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.9.1...v1.10.0) (2022-12-20) - - -### Features - -* introduce new tags and error classes ([#1631](https://github.com/rudderlabs/rudder-transformer/issues/1631)) ([0615a31](https://github.com/rudderlabs/rudder-transformer/commit/0615a3196d4203f6f648a4e04ca84e7ede405895)), closes [#1647](https://github.com/rudderlabs/rudder-transformer/issues/1647) [#1644](https://github.com/rudderlabs/rudder-transformer/issues/1644) [#1656](https://github.com/rudderlabs/rudder-transformer/issues/1656) [#1658](https://github.com/rudderlabs/rudder-transformer/issues/1658) [#1665](https://github.com/rudderlabs/rudder-transformer/issues/1665) [#1649](https://github.com/rudderlabs/rudder-transformer/issues/1649) [#1652](https://github.com/rudderlabs/rudder-transformer/issues/1652) [#1651](https://github.com/rudderlabs/rudder-transformer/issues/1651) [#1669](https://github.com/rudderlabs/rudder-transformer/issues/1669) [#1673](https://github.com/rudderlabs/rudder-transformer/issues/1673) [#1638](https://github.com/rudderlabs/rudder-transformer/issues/1638) [#1641](https://github.com/rudderlabs/rudder-transformer/issues/1641) [#1653](https://github.com/rudderlabs/rudder-transformer/issues/1653) [#1661](https://github.com/rudderlabs/rudder-transformer/issues/1661) [#1666](https://github.com/rudderlabs/rudder-transformer/issues/1666) [#1667](https://github.com/rudderlabs/rudder-transformer/issues/1667) [#1671](https://github.com/rudderlabs/rudder-transformer/issues/1671) [#1659](https://github.com/rudderlabs/rudder-transformer/issues/1659) [#1654](https://github.com/rudderlabs/rudder-transformer/issues/1654) [#1655](https://github.com/rudderlabs/rudder-transformer/issues/1655) [#1670](https://github.com/rudderlabs/rudder-transformer/issues/1670) [#1657](https://github.com/rudderlabs/rudder-transformer/issues/1657) [#1672](https://github.com/rudderlabs/rudder-transformer/issues/1672) [#1642](https://github.com/rudderlabs/rudder-transformer/issues/1642) [#1645](https://github.com/rudderlabs/rudder-transformer/issues/1645) [#1650](https://github.com/rudderlabs/rudder-transformer/issues/1650) [#1639](https://github.com/rudderlabs/rudder-transformer/issues/1639) [#1674](https://github.com/rudderlabs/rudder-transformer/issues/1674) [#1660](https://github.com/rudderlabs/rudder-transformer/issues/1660) [#1648](https://github.com/rudderlabs/rudder-transformer/issues/1648) [#1675](https://github.com/rudderlabs/rudder-transformer/issues/1675) [#1677](https://github.com/rudderlabs/rudder-transformer/issues/1677) [#1678](https://github.com/rudderlabs/rudder-transformer/issues/1678) [#1676](https://github.com/rudderlabs/rudder-transformer/issues/1676) [#1680](https://github.com/rudderlabs/rudder-transformer/issues/1680) [#1682](https://github.com/rudderlabs/rudder-transformer/issues/1682) [#1681](https://github.com/rudderlabs/rudder-transformer/issues/1681) [#1684](https://github.com/rudderlabs/rudder-transformer/issues/1684) [#1685](https://github.com/rudderlabs/rudder-transformer/issues/1685) [#1686](https://github.com/rudderlabs/rudder-transformer/issues/1686) [#1687](https://github.com/rudderlabs/rudder-transformer/issues/1687) [#1688](https://github.com/rudderlabs/rudder-transformer/issues/1688) [#1689](https://github.com/rudderlabs/rudder-transformer/issues/1689) [#1690](https://github.com/rudderlabs/rudder-transformer/issues/1690) [#1691](https://github.com/rudderlabs/rudder-transformer/issues/1691) [#1692](https://github.com/rudderlabs/rudder-transformer/issues/1692) [#1697](https://github.com/rudderlabs/rudder-transformer/issues/1697) [#1699](https://github.com/rudderlabs/rudder-transformer/issues/1699) [#1700](https://github.com/rudderlabs/rudder-transformer/issues/1700) [#1698](https://github.com/rudderlabs/rudder-transformer/issues/1698) [#1704](https://github.com/rudderlabs/rudder-transformer/issues/1704) [#1705](https://github.com/rudderlabs/rudder-transformer/issues/1705) - - -### Bug Fixes - -* minor issues ([#1711](https://github.com/rudderlabs/rudder-transformer/issues/1711)) ([fdea0bd](https://github.com/rudderlabs/rudder-transformer/commit/fdea0bd74529d7f4625885a594eea9fa20a0f20a)) - -### [1.9.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.9.0...v1.9.1) (2022-12-16) - - -### Bug Fixes - -* **trackingplan:** error message population ([#1706](https://github.com/rudderlabs/rudder-transformer/issues/1706)) ([72079a7](https://github.com/rudderlabs/rudder-transformer/commit/72079a7a71f52d44b057df6a910f0b0b54108f72)) - -## [1.9.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.8.0...v1.9.0) (2022-12-16) - - -### Features - -* **destination:** onboard pipedream as event stream source ([#1634](https://github.com/rudderlabs/rudder-transformer/issues/1634)) ([477e2f7](https://github.com/rudderlabs/rudder-transformer/commit/477e2f79704576c5611a9a7e97faf066db10dd87)) -* map the usertraits for all event in Posthog ([#1636](https://github.com/rudderlabs/rudder-transformer/issues/1636)) ([3a12f79](https://github.com/rudderlabs/rudder-transformer/commit/3a12f793073ab360ef5f235aac77b3c587c16006)) -* onboard ga4 hybrid mode ([#1617](https://github.com/rudderlabs/rudder-transformer/issues/1617)) ([0986b76](https://github.com/rudderlabs/rudder-transformer/commit/0986b769d2e2d84314724a16c322cd05d9fa8bd4)) -* onboard pinterest and algolia to json template engine ([#1640](https://github.com/rudderlabs/rudder-transformer/issues/1640)) ([f0f4717](https://github.com/rudderlabs/rudder-transformer/commit/f0f471762dae0ccc8f3449c50f1602bf03a54ec5)) - - -### Bug Fixes - -* **destination:** follow ecommerce spec in tiktok_ads ([#1629](https://github.com/rudderlabs/rudder-transformer/issues/1629)) ([a258bfb](https://github.com/rudderlabs/rudder-transformer/commit/a258bfb4b746aa48c12435792adb477a2957334e)) -* upgrade base node image in dockerfiles ([#1702](https://github.com/rudderlabs/rudder-transformer/issues/1702)) ([a26b20e](https://github.com/rudderlabs/rudder-transformer/commit/a26b20e43915cb8020e46e16c1997b38663f1899)) - -## [1.8.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.7.0...v1.8.0) (2022-12-07) - - -### Features - -* added subscription group in braze ([#1597](https://github.com/rudderlabs/rudder-transformer/issues/1597)) ([f321f4e](https://github.com/rudderlabs/rudder-transformer/commit/f321f4e525c077c06c853530d8c8c23da35baee1)) -* **clevertap:** onboarding clevertap transformer proxy ([#1596](https://github.com/rudderlabs/rudder-transformer/issues/1596)) ([5479aa6](https://github.com/rudderlabs/rudder-transformer/commit/5479aa6afde2171bfd767602c55a36590ed7059b)) -* **destination:** add groupId support as groupKey in mixpanel ([#1590](https://github.com/rudderlabs/rudder-transformer/issues/1590)) ([a33adc6](https://github.com/rudderlabs/rudder-transformer/commit/a33adc6c12a4f7cd6b62955bc29d58206034b3c4)) -* **destination:** cache eviction in salesforce ([#1598](https://github.com/rudderlabs/rudder-transformer/issues/1598)) ([9af5552](https://github.com/rudderlabs/rudder-transformer/commit/9af55520f3199b4ad0027edac4650b81193ff9c5)) -* **destination:** onboard awin integration ([#1589](https://github.com/rudderlabs/rudder-transformer/issues/1589)) ([f015518](https://github.com/rudderlabs/rudder-transformer/commit/f0155185d3a9b9dfa3681a9b52c64fe5e24d6d6d)) -* **destination:** onboard marketo static list ([#1558](https://github.com/rudderlabs/rudder-transformer/issues/1558)) ([db73de9](https://github.com/rudderlabs/rudder-transformer/commit/db73de99dd538eb1c820d3bd2d42689163993cfe)) -* **destination:** onboard persistIq ([#1612](https://github.com/rudderlabs/rudder-transformer/issues/1612)) ([103ad00](https://github.com/rudderlabs/rudder-transformer/commit/103ad00df7d28d3368382cf7b0099c901bb853e4)) -* **destination:** singular- add support for other apple os ([#1611](https://github.com/rudderlabs/rudder-transformer/issues/1611)) ([63f23d8](https://github.com/rudderlabs/rudder-transformer/commit/63f23d8dc8bcf80b84b0976903dfb360785bec86)) -* ga user delete support ([#1531](https://github.com/rudderlabs/rudder-transformer/issues/1531)) ([eb198dd](https://github.com/rudderlabs/rudder-transformer/commit/eb198dd085d16d9c9069352cec8bfb6f33247654)), closes [#1551](https://github.com/rudderlabs/rudder-transformer/issues/1551) -* ga4 hybrid mode suport ([#1607](https://github.com/rudderlabs/rudder-transformer/issues/1607)) ([3edaa10](https://github.com/rudderlabs/rudder-transformer/commit/3edaa10741b2527bb05e13b129f233cba781d1e3)) -* **integration:** shopify- Add topic support in context for debugging ([#1602](https://github.com/rudderlabs/rudder-transformer/issues/1602)) ([ff3fab2](https://github.com/rudderlabs/rudder-transformer/commit/ff3fab2ec13e012aad1920c6b86b6b3e78062690)) -* **integrations:** update primary email for zendesk ([#1604](https://github.com/rudderlabs/rudder-transformer/issues/1604)) ([157f91e](https://github.com/rudderlabs/rudder-transformer/commit/157f91ef5654fddda90e8eb3e1f5899cee681854)) -* onboard olark source ([#1614](https://github.com/rudderlabs/rudder-transformer/issues/1614)) ([64db0ec](https://github.com/rudderlabs/rudder-transformer/commit/64db0ec3a77a58a61d456ac66d91bcc1ee172c64)) -* **source:** onboard satismeter as an event-stream ([#1594](https://github.com/rudderlabs/rudder-transformer/issues/1594)) ([53b9d6f](https://github.com/rudderlabs/rudder-transformer/commit/53b9d6ffaf0db1daa3eda8f8c89a0034cb50164e)) - - -### Bug Fixes - -* bugsnag bug fixes for several destinations and sources ([#1585](https://github.com/rudderlabs/rudder-transformer/issues/1585)) ([c222dc6](https://github.com/rudderlabs/rudder-transformer/commit/c222dc6cbc489d23ad9b38137c449e76084b458e)) -* **destination:** empty params fix in awin ([#1628](https://github.com/rudderlabs/rudder-transformer/issues/1628)) ([e36ab45](https://github.com/rudderlabs/rudder-transformer/commit/e36ab455ce33a308c58aed84c51fef7f9b80ea26)) -* email not required for update call ([#1626](https://github.com/rudderlabs/rudder-transformer/issues/1626)) ([51dcbd9](https://github.com/rudderlabs/rudder-transformer/commit/51dcbd9a0efee2cdc3342bdcc96c67783a5aa118)) -* fixed encryption info and quantity mandatory in CM360 ([#1618](https://github.com/rudderlabs/rudder-transformer/issues/1618)) ([bbe0a26](https://github.com/rudderlabs/rudder-transformer/commit/bbe0a2689930ed783abfd1cf6ea66d50cf1cf826)) -* remove disable destination category for OAuth destinations ([#1601](https://github.com/rudderlabs/rudder-transformer/issues/1601)) ([06f9ee7](https://github.com/rudderlabs/rudder-transformer/commit/06f9ee749d692ec781d53aa229fd58964d0420dd)) -* saas -> master ([#1603](https://github.com/rudderlabs/rudder-transformer/issues/1603)) ([b154e1d](https://github.com/rudderlabs/rudder-transformer/commit/b154e1d61bd894e27f62ecc737d1dd0f1b16d28a)), closes [#1601](https://github.com/rudderlabs/rudder-transformer/issues/1601) [#1606](https://github.com/rudderlabs/rudder-transformer/issues/1606) - -## [1.7.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.6.0...v1.7.0) (2022-11-17) - - -### Features - -* add support for topic parsing ([#1574](https://github.com/rudderlabs/rudder-transformer/issues/1574)) ([da64878](https://github.com/rudderlabs/rudder-transformer/commit/da648788ab0460bd231cf9147fb9852747551ef8)) -* **destination:** add partner_name for tiktok ads ([#1583](https://github.com/rudderlabs/rudder-transformer/issues/1583)) ([12265a9](https://github.com/rudderlabs/rudder-transformer/commit/12265a952a171627ac05d7eab8899d97ceade13c)) -* **destination:** onboard campaign manager ([#1580](https://github.com/rudderlabs/rudder-transformer/issues/1580)) ([b823a53](https://github.com/rudderlabs/rudder-transformer/commit/b823a538ca4d4f38faa4762ae986375e0eb8ae05)) -* sendgrid idetify and user deletion support ([#1571](https://github.com/rudderlabs/rudder-transformer/issues/1571)) ([caee969](https://github.com/rudderlabs/rudder-transformer/commit/caee969c79ce9673096d0fc4d08be3ba942ce9f5)) - - -### Bug Fixes - -* (marketo) logger import ([#1576](https://github.com/rudderlabs/rudder-transformer/issues/1576)) ([c83f046](https://github.com/rudderlabs/rudder-transformer/commit/c83f046ee8baed0e61e8c4d2ac78fec74d74b794)) -* add test coverage for processMetadata function ([#1567](https://github.com/rudderlabs/rudder-transformer/issues/1567)) ([b438daa](https://github.com/rudderlabs/rudder-transformer/commit/b438daad9bf0c845d867e0261ff69e77fc3ee0cd)) -* **destination:** fix the flattening issue solve for ga4 ([#1581](https://github.com/rudderlabs/rudder-transformer/issues/1581)) ([bea730d](https://github.com/rudderlabs/rudder-transformer/commit/bea730da510c016bd3a71cb519316375b44ea6d3)) -* **destination:** revamp group call in Gainsight_PX to reduce API calls ([#1578](https://github.com/rudderlabs/rudder-transformer/issues/1578)) ([f641cc0](https://github.com/rudderlabs/rudder-transformer/commit/f641cc0d3b64fcb736bbd4d5208819958bacb393)) -* **destination:** update formating of user traits in facebook pixel ([#1579](https://github.com/rudderlabs/rudder-transformer/issues/1579)) ([b7772e4](https://github.com/rudderlabs/rudder-transformer/commit/b7772e41530f1d4e88263408d4ff3532c187eaf5)) -* **integration:** Shopify - correct typo in customer_disabled, add to track_maps ([#1573](https://github.com/rudderlabs/rudder-transformer/issues/1573)) ([cfb5c56](https://github.com/rudderlabs/rudder-transformer/commit/cfb5c56bdc70e52dc996fdfc9c26743a6728d875)) -* **transformation:** convert slash to dot to get valid docker image name ([#1564](https://github.com/rudderlabs/rudder-transformer/issues/1564)) ([f1b6b94](https://github.com/rudderlabs/rudder-transformer/commit/f1b6b946e1a6eb519560b675f3fce10d1e833950)) -* typo in topic mapping for shopify source ([#1566](https://github.com/rudderlabs/rudder-transformer/issues/1566)) ([0ecf278](https://github.com/rudderlabs/rudder-transformer/commit/0ecf278be9a2435ed67fee299350a34c4b13bb9a)) - -## [1.6.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.5.0...v1.6.0) (2022-11-10) - - -### Features - -* **destination:** skip unix timestamp conversion if already being sent from source ([#1560](https://github.com/rudderlabs/rudder-transformer/issues/1560)) ([a52cbd7](https://github.com/rudderlabs/rudder-transformer/commit/a52cbd797fa8a0ccec6589ff78b966da26040fbc)) -* **destination:** stringify the object and array for Clevertap ([#1554](https://github.com/rudderlabs/rudder-transformer/issues/1554)) ([1c7b459](https://github.com/rudderlabs/rudder-transformer/commit/1c7b459d74ae0b17360d0e49e9bc11557e6f4233)) -* **destination:** support custom mapping with client_id for ga4 destination ([#1553](https://github.com/rudderlabs/rudder-transformer/issues/1553)) ([e9f056b](https://github.com/rudderlabs/rudder-transformer/commit/e9f056bacad84d7e59e58904626c6eb7edcc4686)) -* **destination:** update identify call to set primary email for Zendesk([#1539](https://github.com/rudderlabs/rudder-transformer/issues/1539)) ([ed307a3](https://github.com/rudderlabs/rudder-transformer/commit/ed307a31ff46575f3a606a0894eeeaaec0b40c00)) -* **marketo:** add dynamic ttl & cache eviction support ([#1519](https://github.com/rudderlabs/rudder-transformer/issues/1519)) ([19f1081](https://github.com/rudderlabs/rudder-transformer/commit/19f1081cc32ba9798876dcb9d46d9d094c171e1d)) -* support custom webhooks in auth0 source transformer ([#1527](https://github.com/rudderlabs/rudder-transformer/issues/1527)) ([ebc005f](https://github.com/rudderlabs/rudder-transformer/commit/ebc005f84d3af4a7a32f362cc7ece842c8f269a1)) - - -### Bug Fixes - -* (marketo)- remove duplicate responseHandler from util and refactor ([#1557](https://github.com/rudderlabs/rudder-transformer/issues/1557)) ([144793e](https://github.com/rudderlabs/rudder-transformer/commit/144793eef2c83b9bc43b989b061c7c7a7c4f07fe)) -* **destination:** do not update event properties to lowercase in hubspot ([#1559](https://github.com/rudderlabs/rudder-transformer/issues/1559)) ([e41b37f](https://github.com/rudderlabs/rudder-transformer/commit/e41b37f38f1f9de87fa452ea30c6587d87a95a5d)) -* ecom events properties mapping correction ([#1549](https://github.com/rudderlabs/rudder-transformer/issues/1549)) ([0e9c816](https://github.com/rudderlabs/rudder-transformer/commit/0e9c816092c5fc777f2d472e13ec3aa94def2160)) -* incorrect lodash cloneDeep import ([#1545](https://github.com/rudderlabs/rudder-transformer/issues/1545)) ([5e70dca](https://github.com/rudderlabs/rudder-transformer/commit/5e70dcae665f3610ea6e65bb2d6303b9a547036e)) -* suppress cdk error types ([#1555](https://github.com/rudderlabs/rudder-transformer/issues/1555)) ([9215a7c](https://github.com/rudderlabs/rudder-transformer/commit/9215a7ca272122199202d26301f9515a1a3bd6b0)) - -## [1.5.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.4.0...v1.5.0) (2022-11-03) - - -### Features - -* added multitopic support for kafka ([#1488](https://github.com/rudderlabs/rudder-transformer/issues/1488)) ([bd1298b](https://github.com/rudderlabs/rudder-transformer/commit/bd1298b57358cf62a2ef7f74fe06ba0200bda488)) -* **new integration:** onboarding snapchat custom audience ([#1443](https://github.com/rudderlabs/rudder-transformer/issues/1443)) ([1e00248](https://github.com/rudderlabs/rudder-transformer/commit/1e0024824074e4b66a67f38302ec02d611e7a8c7)) - - -### Bug Fixes - -* fixing errors caught by bugsnag ([#1536](https://github.com/rudderlabs/rudder-transformer/issues/1536)) ([9c43896](https://github.com/rudderlabs/rudder-transformer/commit/9c43896f27be87d8c024a61b4cb4a09124918f23)) -* suppress errors thrown from the transformers in bugsnag notifier ([#1534](https://github.com/rudderlabs/rudder-transformer/issues/1534)) ([1ca8e9f](https://github.com/rudderlabs/rudder-transformer/commit/1ca8e9f704eb03699c198c91cf1691ccdfa42772)) - -## [1.4.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.3.0...v1.4.0) (2022-11-01) - - -### Features - -* **integration:** onboarding gainsight px source ([#1500](https://github.com/rudderlabs/rudder-transformer/issues/1500)) ([0d0cce5](https://github.com/rudderlabs/rudder-transformer/commit/0d0cce5299b0cad9c616cb7b0bbee92f6f414732)) -* onboard algolia destination to cdk 2.0 ([#1474](https://github.com/rudderlabs/rudder-transformer/issues/1474)) ([e716d84](https://github.com/rudderlabs/rudder-transformer/commit/e716d8458d636854f59a555cafc2a7b00a0b1b50)) - - -### Bug Fixes - -* **amplitude:** send error response instead of discarding the event during batch processing ([#1521](https://github.com/rudderlabs/rudder-transformer/issues/1521)) ([fece19f](https://github.com/rudderlabs/rudder-transformer/commit/fece19fccff44a31d1d96c43bd138ce6f2cce10d)) -* cdk based live compare test results ([#1483](https://github.com/rudderlabs/rudder-transformer/issues/1483)) ([d8f32c3](https://github.com/rudderlabs/rudder-transformer/commit/d8f32c3d522a6e3b33023828e1bd8b870046861f)) -* error stat issue for algolia ([#1528](https://github.com/rudderlabs/rudder-transformer/issues/1528)) ([3a7482c](https://github.com/rudderlabs/rudder-transformer/commit/3a7482cf4f6d37785e9ef595bd7e4a9d54aebedb)) -* upgrade ajv from 8.6.1 to 8.11.0 ([#1372](https://github.com/rudderlabs/rudder-transformer/issues/1372)) ([f3b54c0](https://github.com/rudderlabs/rudder-transformer/commit/f3b54c0876bb7be79244e02e31517db13260c610)) -* upgrade axios from 0.26.1 to 0.27.2 ([#1403](https://github.com/rudderlabs/rudder-transformer/issues/1403)) ([1186518](https://github.com/rudderlabs/rudder-transformer/commit/1186518cf89ad4de3ad16ae0a0fcb09e148bdfe5)) - -## [1.3.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.2.0...v1.3.0) (2022-10-25) - - -### Features - -* **error reporting:** integrate bugsnag ([#1469](https://github.com/rudderlabs/rudder-transformer/issues/1469)) ([39b5fa2](https://github.com/rudderlabs/rudder-transformer/commit/39b5fa22ddb8e79d540242c66732cdcb31760ba9)) -* **integrations:** added support for catalogs iterable with vdm rETL source ([#1439](https://github.com/rudderlabs/rudder-transformer/issues/1439)) ([586f771](https://github.com/rudderlabs/rudder-transformer/commit/586f771f8e0733ac2f79ea4741bb155eb24910ca)) -* **new integration:** factorsAi ([#1490](https://github.com/rudderlabs/rudder-transformer/issues/1490)) ([1000ca8](https://github.com/rudderlabs/rudder-transformer/commit/1000ca8853b48f65bf1e8db0e2999f1d4b47387b)) - - -### Bug Fixes - -* bugsnag error notify handler ([#1512](https://github.com/rudderlabs/rudder-transformer/issues/1512)) ([d947c0e](https://github.com/rudderlabs/rudder-transformer/commit/d947c0ec23998ce54553839cf4b2e337c379713e)) -* **mixpanel:** stripped off last 36 characters of insert_id ([#1503](https://github.com/rudderlabs/rudder-transformer/issues/1503)) ([550faec](https://github.com/rudderlabs/rudder-transformer/commit/550faecae92d48364b0fdebb8e50c057c0dfffe2)) -* posthog group update ([#1496](https://github.com/rudderlabs/rudder-transformer/issues/1496)) ([154f656](https://github.com/rudderlabs/rudder-transformer/commit/154f656e2d437c1c54a6ef85c1b37f65fe154f14)) -* skip adding Id field to salesforce payload for retl ([#1501](https://github.com/rudderlabs/rudder-transformer/issues/1501)) ([d2808f4](https://github.com/rudderlabs/rudder-transformer/commit/d2808f42ae3d3281468dbec1fc13e1511a45ebcd)) -* upgrade @aws-sdk/client-s3 from 3.56.0 to 3.180.0 ([#1505](https://github.com/rudderlabs/rudder-transformer/issues/1505)) ([58c0179](https://github.com/rudderlabs/rudder-transformer/commit/58c01795f2c5b767e614c0d1777d7173eb741d17)) -* upgrade @aws-sdk/lib-storage from 3.56.0 to 3.142.0 ([#1370](https://github.com/rudderlabs/rudder-transformer/issues/1370)) ([94faae5](https://github.com/rudderlabs/rudder-transformer/commit/94faae5fe34ef559b82975d4c53f4bd54b6dbaf1)) - -## [1.2.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.1.0...v1.2.0) (2022-10-18) - - -* release 1.2.0 ([1ce4963](https://github.com/rudderlabs/rudder-transformer/commit/1ce4963a959d38077d5eece1795d7af5b6379314)) - -## [1.1.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.0.0...v1.1.0) (2022-10-17) - - -### Features - -* **integration:** Marketo- attribute to attributes, apiName to name,… ([#1481](https://github.com/rudderlabs/rudder-transformer/issues/1481)) ([e7187d6](https://github.com/rudderlabs/rudder-transformer/commit/e7187d64ef20dd788826eed91a9bd234b778c93a)) - -## [1.0.0](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.5-rc.0...v1.0.0) (2022-10-13) - - -### Features - -* add commit id and version in health endpoint ([#1445](https://github.com/rudderlabs/rudder-transformer/issues/1445)) ([e21dca7](https://github.com/rudderlabs/rudder-transformer/commit/e21dca7106afae7b6150fa8ab85520de321a2ea4)) -* Add library key support ([4aa31af](https://github.com/rudderlabs/rudder-transformer/commit/4aa31afc9828a20132a5b9142279f6d06179039a)) -* Add support for all Apple family OSes ([#925](https://github.com/rudderlabs/rudder-transformer/issues/925)) ([0962527](https://github.com/rudderlabs/rudder-transformer/commit/0962527bbe11927a53dd0c3973d5d39da0b961ce)) -* add Variance as a destination ([c5f84c6](https://github.com/rudderlabs/rudder-transformer/commit/c5f84c6f58b27ee45728f190869e21145a522a62)) -* Added library key support for Amplitude ([5af62c0](https://github.com/rudderlabs/rudder-transformer/commit/5af62c09668eff2ee321dc72eed784c27bb25ee0)) -* Added library key support for Amplitude ([f0cf6b5](https://github.com/rudderlabs/rudder-transformer/commit/f0cf6b526cf3f0dc9ffcc1476df683a351264c04)) -* **Facebook Pixel:** add response parsing support ([#1412](https://github.com/rudderlabs/rudder-transformer/issues/1412)) ([00893c1](https://github.com/rudderlabs/rudder-transformer/commit/00893c1e525473df306648b0946ecb90841c4197)) -* **hs:** Add support for hubspot association events sent from retl ([#1361](https://github.com/rudderlabs/rudder-transformer/issues/1361)) ([b18c93f](https://github.com/rudderlabs/rudder-transformer/commit/b18c93f9865b4ecb0b5025370c544c58102a4df0)) -* integrate cdk v2 ([#1448](https://github.com/rudderlabs/rudder-transformer/issues/1448)) ([d5086c2](https://github.com/rudderlabs/rudder-transformer/commit/d5086c2f0807424ac4e66a6c12e59b07eada5cbe)) -* **integration:** fb custom audience - upgrade v14 to v15 ([#1463](https://github.com/rudderlabs/rudder-transformer/issues/1463)) ([f83a4b6](https://github.com/rudderlabs/rudder-transformer/commit/f83a4b607fdf02746e60c103e8a29850caeca9e3)) -* **integration:** marketo - correct attribute to attributes, fix test cases ([#1446](https://github.com/rudderlabs/rudder-transformer/issues/1446)) ([80b148f](https://github.com/rudderlabs/rudder-transformer/commit/80b148fabb0eb49ac132e196c2aae0e5be3fed6f)) -* **integration:** onboard Facebook Offline Conversions destination ([#1462](https://github.com/rudderlabs/rudder-transformer/issues/1462)) ([9f0413b](https://github.com/rudderlabs/rudder-transformer/commit/9f0413b8285793ced787cd385beed956b675982a)) -* **integration:** Singular- allow empty string by default for instal… ([#1480](https://github.com/rudderlabs/rudder-transformer/issues/1480)) ([c44dec2](https://github.com/rudderlabs/rudder-transformer/commit/c44dec2a0d6952647489754b3bd5d7917d563251)) -* **integration:** Singular- unixtimestamp format fixes and empty url allowed for openuri ([#1476](https://github.com/rudderlabs/rudder-transformer/issues/1476)) ([66c1efd](https://github.com/rudderlabs/rudder-transformer/commit/66c1efd87878485c78a01f82ec8cafd21056f8a6)) -* **integrations:** user deletion support for mp, clevertap, and af destinations ([#1426](https://github.com/rudderlabs/rudder-transformer/issues/1426)) ([b5c5d6f](https://github.com/rudderlabs/rudder-transformer/commit/b5c5d6fbb9023fbf86e370366ab3f6818b4c343b)) -* json support for warehouse destinations ([#1144](https://github.com/rudderlabs/rudder-transformer/issues/1144)) ([a431b08](https://github.com/rudderlabs/rudder-transformer/commit/a431b087e139a26477050f64ee26dbbe473899a9)) -* Klaviyo ecommerce Specs ([#904](https://github.com/rudderlabs/rudder-transformer/issues/904)) ([5dd5329](https://github.com/rudderlabs/rudder-transformer/commit/5dd53296fbe4add44cc4acb330a61d5e4e11ddc9)) -* migrate pinterest to cdk ([#1458](https://github.com/rudderlabs/rudder-transformer/issues/1458)) ([addff70](https://github.com/rudderlabs/rudder-transformer/commit/addff70d77e50b53cb7bb10fa4f4f59523f38f57)) -* **new integration:** google adwords offline conversions onboarding ([#1397](https://github.com/rudderlabs/rudder-transformer/issues/1397)) ([4974b6d](https://github.com/rudderlabs/rudder-transformer/commit/4974b6d40c6cfcae0f455bc18704137d9b921192)) -* **new integration:** june cloud mode destination onboarding ([#1433](https://github.com/rudderlabs/rudder-transformer/issues/1433)) ([458b32c](https://github.com/rudderlabs/rudder-transformer/commit/458b32c2d4e0100a56eb084128ca0aa76e2a006c)) -* **new integration:** onboard Monday cloud mode destination ([#1400](https://github.com/rudderlabs/rudder-transformer/issues/1400)) ([f4e5cc4](https://github.com/rudderlabs/rudder-transformer/commit/f4e5cc4542a4cd729d8e8c77d4973dbe858bb6db)) -* **new integration:** onboarding mailjet ([#1449](https://github.com/rudderlabs/rudder-transformer/issues/1449)) ([81de8a1](https://github.com/rudderlabs/rudder-transformer/commit/81de8a16c6d1cdeb3ac8b27a7d8a0cd51fc2c4af)) -* **new integration:** onboarding mailmodo source ([#1414](https://github.com/rudderlabs/rudder-transformer/issues/1414)) ([e3689c2](https://github.com/rudderlabs/rudder-transformer/commit/e3689c249fd92baa9b3d640c0802f71b78d22650)) -* **serenytics:** onboarding serenytics cloud mode destinations ([#1430](https://github.com/rudderlabs/rudder-transformer/issues/1430)) ([b7e93e3](https://github.com/rudderlabs/rudder-transformer/commit/b7e93e310903e93c39403f1f4b819c14e09d528d)) -* **signl4:** onboarding signl4 cloud mode destination ([#1424](https://github.com/rudderlabs/rudder-transformer/issues/1424)) ([47bd3f8](https://github.com/rudderlabs/rudder-transformer/commit/47bd3f817a4df4d555a8ede656a8b311a4232519)) -* support 'event' alias for 'message' in dynamic config ([#1289](https://github.com/rudderlabs/rudder-transformer/issues/1289)) ([ff6abb8](https://github.com/rudderlabs/rudder-transformer/commit/ff6abb8d4e89af154289b246b33f6e988c0efcbd)) -* **transformation:** update env varibale name ([d904828](https://github.com/rudderlabs/rudder-transformer/commit/d904828e47a94d82a8428cf376dea5eb926d44a4)) - - -### Bug Fixes - -* address async and flow type issues ([#1457](https://github.com/rudderlabs/rudder-transformer/issues/1457)) ([632f74e](https://github.com/rudderlabs/rudder-transformer/commit/632f74e5f1d35d882ed6531f2af84b7d1fba0472)) -* **algolia:** adding check on eventTypeSetting availability ([#1423](https://github.com/rudderlabs/rudder-transformer/issues/1423)) ([d8572ff](https://github.com/rudderlabs/rudder-transformer/commit/d8572ff4949513573d5f7367fa0dc0811086e61f)) -* **appsflyer:** event name casing in track payloads ([#1390](https://github.com/rudderlabs/rudder-transformer/issues/1390)) ([3b22f18](https://github.com/rudderlabs/rudder-transformer/commit/3b22f1840acaf57b110ff67a9805be6d2bf7b062)) -* **braze:** adding dynamic support for eu data center ([#1236](https://github.com/rudderlabs/rudder-transformer/issues/1236)) ([90bc03f](https://github.com/rudderlabs/rudder-transformer/commit/90bc03f00d8ce48b8e93f28c06863c80c353116f)) -* docker vulnerabilities ([#1435](https://github.com/rudderlabs/rudder-transformer/issues/1435)) ([27084e2](https://github.com/rudderlabs/rudder-transformer/commit/27084e2c483bec679c9988a998b087a558bc5826)) -* facebook pixel proxy tests ([#1444](https://github.com/rudderlabs/rudder-transformer/issues/1444)) ([f632583](https://github.com/rudderlabs/rudder-transformer/commit/f6325833244affaffad8aa311466c1596ef01cdd)) -* Fix test case ([ac2342d](https://github.com/rudderlabs/rudder-transformer/commit/ac2342d43feabe92c7ed23495e02d9f77fb5fccd)) -* **ga:** Do not fallback to userId for cid when disableMd5 is true, keep it undefined ([ad72d59](https://github.com/rudderlabs/rudder-transformer/commit/ad72d5962c19b00ae9dbbb3cec0cc6b223c7683d)) -* **hs:** logic for custom objects support of hs with rETL ([#1222](https://github.com/rudderlabs/rudder-transformer/issues/1222)) ([5353bcc](https://github.com/rudderlabs/rudder-transformer/commit/5353bcc33f7b077aa5240ac653c747aa6f3fd4b6)) -* kafka schemaId ([#1283](https://github.com/rudderlabs/rudder-transformer/issues/1283)) ([214d5d5](https://github.com/rudderlabs/rudder-transformer/commit/214d5d53edb20b6b994d3b01bee8dddcc4fe2128)) -* **marketo:** unhandled exception status-code fix ([#1432](https://github.com/rudderlabs/rudder-transformer/issues/1432)) ([6cc4868](https://github.com/rudderlabs/rudder-transformer/commit/6cc48688c82ba501b296c1171c0327cc91e33e4d)) -* Remove event type guard that prevent traits from copying to user props ([e276ade](https://github.com/rudderlabs/rudder-transformer/commit/e276ade3c57c4556399a5be8b09f15a1877c5a2b)) -* **signl4:** correcting timestamp format ([#1431](https://github.com/rudderlabs/rudder-transformer/issues/1431)) ([18632e6](https://github.com/rudderlabs/rudder-transformer/commit/18632e632330db753eabe1fe4d90f22703979c1b)) -* **trackingplan:** adding message type optional check in tp source config ([60f0658](https://github.com/rudderlabs/rudder-transformer/commit/60f0658a5b7701d8d545ebfb838bfa19cc68c6e2)) -* upgrade dotenv from 8.2.0 to 8.6.0 ([#1389](https://github.com/rudderlabs/rudder-transformer/issues/1389)) ([1c3d001](https://github.com/rudderlabs/rudder-transformer/commit/1c3d001f8c35d0885497faa87c8ce728d6403efe)) -* upgrade koa from 2.13.0 to 2.13.4 ([#1398](https://github.com/rudderlabs/rudder-transformer/issues/1398)) ([213e30e](https://github.com/rudderlabs/rudder-transformer/commit/213e30e4c04481ee4aa9d59c346ed959acfd5bb5)) -* upgrade ua-parser-js from 0.7.24 to 0.8.1 ([#1378](https://github.com/rudderlabs/rudder-transformer/issues/1378)) ([a50899b](https://github.com/rudderlabs/rudder-transformer/commit/a50899b6780d3f640c260830c74f28cd4b1d9b5d)) -* vulnerabilities in dependencies ([#1436](https://github.com/rudderlabs/rudder-transformer/issues/1436)) ([a26e7f5](https://github.com/rudderlabs/rudder-transformer/commit/a26e7f54d5aaafa48c20826cd5dd5f3f8f30e39f)) - -### [0.1.5-rc.0](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.4...v0.1.5-rc.0) (2020-03-16) - -### [0.1.4](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.3...v0.1.4) (2020-03-02) - -### [0.1.3](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.2...v0.1.3) (2020-02-11) - -### [0.1.2](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.1...v0.1.2) (2020-02-07) - - -### Bug Fixes - -* salesforce tests ([86500b8](https://github.com/rudderlabs/rudder-transformer/commit/86500b832610f047666a4fe4799a843c5a1fb6e9)) - -### [0.1.1](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.0...v0.1.1) (2019-11-05) - -## 0.1.0 (2019-10-24) - -### [1.20.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.20.1...v1.20.2) (2023-04-01) - - -### Bug Fixes - -* add the missing git commit sha of the source to bugsnag ([#2030](https://github.com/rudderlabs/rudder-transformer/issues/2030)) ([65ccbdd](https://github.com/rudderlabs/rudder-transformer/commit/65ccbdd693b68c331e500a50f0019ea0a7e2a27c)) - -## [1.20.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.19.0...v1.20.0) (2023-03-28) - - -### Bug Fixes - -* **gainsignt_px:** undefined attributes issue ([#2010](https://github.com/rudderlabs/rudder-transformer/issues/2010)) ([bf56359](https://github.com/rudderlabs/rudder-transformer/commit/bf5635942a88a3afc25506ba6591bf6b844624f3)) -* **monday:** axios call empty response issue ([#2001](https://github.com/rudderlabs/rudder-transformer/issues/2001)) ([196294f](https://github.com/rudderlabs/rudder-transformer/commit/196294f70bc967efea70aef084268db9c567417a)) -* **rockerbox:** make email as non-required field ([#1995](https://github.com/rudderlabs/rudder-transformer/issues/1995)) ([2f7ebff](https://github.com/rudderlabs/rudder-transformer/commit/2f7ebff62c8934165c1271a7c019c2b0b5b2a4b3)) -* **snapchat_conversion:** price calculation ([#1988](https://github.com/rudderlabs/rudder-transformer/issues/1988)) ([8240224](https://github.com/rudderlabs/rudder-transformer/commit/82402242a1ffe9ccc75671023cff1ebbbcb390e6)) -* **test-cases:** fix test cases to use template like secret keys ([#1973](https://github.com/rudderlabs/rudder-transformer/issues/1973)) ([f709d1f](https://github.com/rudderlabs/rudder-transformer/commit/f709d1fb9d1d22e306fc600872dd2b702436f961)) -* undefined columnToPropertyMapping config issue ([#1998](https://github.com/rudderlabs/rudder-transformer/issues/1998)) ([ef7a351](https://github.com/rudderlabs/rudder-transformer/commit/ef7a3511e26e652caa54fb600db01ebe6bd0cc3d)) - -## [1.18.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.17.0...v1.18.0) (2023-03-23) - - -### Features - -* **indicative:** parse user agent info ([#1971](https://github.com/rudderlabs/rudder-transformer/issues/1971)) ([1328b5a](https://github.com/rudderlabs/rudder-transformer/commit/1328b5ac38f9d21def89bacbbca4891dbd6e4450)) - - -### Bug Fixes - -* changelog ([d8d81a2](https://github.com/rudderlabs/rudder-transformer/commit/d8d81a2d4ad428be2936932f22e63fd9007d9799)) -* ga4 user_properties structure ([#1982](https://github.com/rudderlabs/rudder-transformer/issues/1982)) ([3d81202](https://github.com/rudderlabs/rudder-transformer/commit/3d81202fcd88b8033504e9f5aa5d095e6863dc76)) -* tik-tok ads offline events email array issue ([#1979](https://github.com/rudderlabs/rudder-transformer/issues/1979)) ([3c7f4ac](https://github.com/rudderlabs/rudder-transformer/commit/3c7f4ac60ec564198f0bf0524a0780dfc581140a)) - -## [1.17.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.16.2...v1.17.0) (2023-03-21) - - -### Features - -* add default action source ([#1957](https://github.com/rudderlabs/rudder-transformer/issues/1957)) ([043cae2](https://github.com/rudderlabs/rudder-transformer/commit/043cae2802c81e7a1d25d266eaeca06a3000aeaa)) -* **braze:** refactor code custom attribute operations ([#1943](https://github.com/rudderlabs/rudder-transformer/issues/1943)) ([9c91bfc](https://github.com/rudderlabs/rudder-transformer/commit/9c91bfc4f7eeeaa1e97174a2c96c1902c6817c6a)) -* **mix-panel:** add support for multiple group key value ([#1773](https://github.com/rudderlabs/rudder-transformer/issues/1773)) ([e7a8d48](https://github.com/rudderlabs/rudder-transformer/commit/e7a8d489cb3fda2718e106730d69506e6f56c9f3)) - - -### Bug Fixes - -* added products array check for iterable destination ([#1949](https://github.com/rudderlabs/rudder-transformer/issues/1949)) ([87db73e](https://github.com/rudderlabs/rudder-transformer/commit/87db73e062dcac54fdb1906659a90d2df0f13648)) -* **fb pixel:** ecomm ([#1932](https://github.com/rudderlabs/rudder-transformer/issues/1932)) ([8d5e07a](https://github.com/rudderlabs/rudder-transformer/commit/8d5e07a2862ee757ecd3523b36e150f29a134b0f)), closes [#1964](https://github.com/rudderlabs/rudder-transformer/issues/1964) -* **firehose:** handle undefined message type ([#1942](https://github.com/rudderlabs/rudder-transformer/issues/1942)) ([d3ea664](https://github.com/rudderlabs/rudder-transformer/commit/d3ea664c182cc1702ab0298cf79ecad2aae7ce6b)) -* **integration:** pinterest content_id field dropped when having null value to match with cdkv2 ([#1950](https://github.com/rudderlabs/rudder-transformer/issues/1950)) ([09995e9](https://github.com/rudderlabs/rudder-transformer/commit/09995e9cc9931827d8be5b1ede59be9ce77c0cd4)) - -### [1.16.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.16.1...v1.16.2) (2023-03-16) - - -### Bug Fixes - -* add optional chaining for phone in tiktok_ads_offline_events ([37dc013](https://github.com/rudderlabs/rudder-transformer/commit/37dc0139a28fab113eac4b337f3475ac2ea29262)) - -### [1.16.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.16.0...v1.16.1) (2023-03-15) - - -### Bug Fixes - -* **fb pixel:** add default action source ([#1946](https://github.com/rudderlabs/rudder-transformer/issues/1946)) ([2e03f4d](https://github.com/rudderlabs/rudder-transformer/commit/2e03f4dcfbfb1c6d35aecf950e0f1e3828ceaaef)) - -## [1.16.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.15.1...v1.16.0) (2023-03-14) - - -### Features - -* **facebook_app_events:** update api version ([#1921](https://github.com/rudderlabs/rudder-transformer/issues/1921)) ([793ebfb](https://github.com/rudderlabs/rudder-transformer/commit/793ebfb39e8667882cd40ff4add2ea6b5dfb9564)) - - -### Bug Fixes - -* changelog ([ef13dd8](https://github.com/rudderlabs/rudder-transformer/commit/ef13dd8bef572c80ddb8511abb7d5be23cc5dd81)) -* create pull-request jobs in workflows ([36b2677](https://github.com/rudderlabs/rudder-transformer/commit/36b2677209b9b34a33375381dd74a74988e11dd2)) -* syntax issue in workflow ([09d7659](https://github.com/rudderlabs/rudder-transformer/commit/09d765912ef07552729c1193e28c1bd149f68401)) -* syntax issue in workflow ([c84ef6e](https://github.com/rudderlabs/rudder-transformer/commit/c84ef6e1d1b4feefb208e10c316c4f5bd647efa3)) -* **util:** getDestinationExternalIDObjectForRetl funciton ([#1919](https://github.com/rudderlabs/rudder-transformer/issues/1919)) ([235243d](https://github.com/rudderlabs/rudder-transformer/commit/235243de9afb1b52b56b7db9170e5eb3345b1de6)) - -### [1.15.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.15.0...v1.15.1) (2023-03-13) - - -### Features - -* mautic: support self hosted instance ([#1909](https://github.com/rudderlabs/rudder-transformer/issues/1909)) ([7c0a724](https://github.com/rudderlabs/rudder-transformer/commit/7c0a7240d9fcef45e4066a4a7dee8234c7e782d3)) -* moenagae alias call support ([#1930](https://github.com/rudderlabs/rudder-transformer/issues/1930)) ([194bf8e](https://github.com/rudderlabs/rudder-transformer/commit/194bf8e3e2f47ca63ee273c9255468b41bc6ffcf)) -* transformation secrets ([#1912](https://github.com/rudderlabs/rudder-transformer/issues/1912)) ([a0b488a](https://github.com/rudderlabs/rudder-transformer/commit/a0b488a4514c9c868f39d000a4ae40aa3f7b5de6)) - - -### Bug Fixes - -* client_id mapping for ga4 ([#1904](https://github.com/rudderlabs/rudder-transformer/issues/1904)) ([9aaf908](https://github.com/rudderlabs/rudder-transformer/commit/9aaf90864bd489fb463a56f62a673ead2bb83fe5)) -* **destination:** add channel as platform ([#1906](https://github.com/rudderlabs/rudder-transformer/issues/1906)) ([4cfbbd0](https://github.com/rudderlabs/rudder-transformer/commit/4cfbbd02530d1cc02b1b04ab5c721f1b642d41bc)) -* remove ga4 identify call support for cloud mode and treat identify call event as track events (login, sign_up and generate_lead) ([#1903](https://github.com/rudderlabs/rudder-transformer/issues/1903)) ([fa8fd74](https://github.com/rudderlabs/rudder-transformer/commit/fa8fd74f14d0ac6707f83ed81897a541ae6191e6)) -* **slack:** handlebars error handling ([#1910](https://github.com/rudderlabs/rudder-transformer/issues/1910)) ([0c6bc2e](https://github.com/rudderlabs/rudder-transformer/commit/0c6bc2edb17986a1d99365a4468a67bd65e09e47)) - -## [1.15.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.14.0...v1.15.0) (2023-03-07) - - -### Features - -* log process memory errors ([#1920](https://github.com/rudderlabs/rudder-transformer/issues/1920)) ([076d7b5](https://github.com/rudderlabs/rudder-transformer/commit/076d7b58831b035102a0544985d9a1ff67ef1791)) -* revamp github actions for release management ([#1898](https://github.com/rudderlabs/rudder-transformer/issues/1898)) ([8847f58](https://github.com/rudderlabs/rudder-transformer/commit/8847f589dc2248d4210c82326022d9f459b2f888)) -* suppress errors from unwanted modules to bugsnag ([#1907](https://github.com/rudderlabs/rudder-transformer/issues/1907)) ([9e6a1c0](https://github.com/rudderlabs/rudder-transformer/commit/9e6a1c0bd3dfa79e2a470eefad7d4c9b34c842cb)) - - -### Bug Fixes - -* correcting method name for prepareProxy ([#1923](https://github.com/rudderlabs/rudder-transformer/issues/1923)) ([cfed522](https://github.com/rudderlabs/rudder-transformer/commit/cfed5228be21bd8d7f5a2ea8bc4b97c973a112be)) -* **fb pixel:** zp mapping and external_id ([#1908](https://github.com/rudderlabs/rudder-transformer/issues/1908)) ([c8665d4](https://github.com/rudderlabs/rudder-transformer/commit/c8665d4475fe06d45d3b4fdd26b46247be0188f6)) -* **ga4:** product array issue ([#1845](https://github.com/rudderlabs/rudder-transformer/issues/1845)) ([3d24e93](https://github.com/rudderlabs/rudder-transformer/commit/3d24e93a6c00c3d2bd425012e4b315997b5e05b6)) -* updated batching logic for pinterest_tag ([#1878](https://github.com/rudderlabs/rudder-transformer/issues/1878)) ([e38d772](https://github.com/rudderlabs/rudder-transformer/commit/e38d7721451d4c43d8c1fe67d28566302dced440)) - -## [1.14.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.13.0...v1.14.0) (2023-02-28) - - -### Features - -* added customerio group call support ([#1869](https://github.com/rudderlabs/rudder-transformer/issues/1869)) ([5e692ea](https://github.com/rudderlabs/rudder-transformer/commit/5e692ead3c43819edd47f8cf244a3f78ce510359)) -* added new destination vitally ([#1892](https://github.com/rudderlabs/rudder-transformer/issues/1892)) ([8638ee7](https://github.com/rudderlabs/rudder-transformer/commit/8638ee7765b4e3ecf215ec90056d03cffb42f5f6)) -* include latest image of transformer ([#1879](https://github.com/rudderlabs/rudder-transformer/issues/1879)) ([b179fef](https://github.com/rudderlabs/rudder-transformer/commit/b179fef031fe06aa8d4e3b258c4740b45f4387bb)) -* onboard courier destination ([#1844](https://github.com/rudderlabs/rudder-transformer/issues/1844)) ([#1883](https://github.com/rudderlabs/rudder-transformer/issues/1883)) ([18bcdf8](https://github.com/rudderlabs/rudder-transformer/commit/18bcdf8b4b1f0b63cbe3f839df38f4b6b6875e98)) -* python libraries ([#1855](https://github.com/rudderlabs/rudder-transformer/issues/1855)) ([01f3df5](https://github.com/rudderlabs/rudder-transformer/commit/01f3df5ad5868a3604715c26f7ea9d8dea82860b)) -* **transformation:** adding rudder libraries support ([#1817](https://github.com/rudderlabs/rudder-transformer/issues/1817)) ([1c91d22](https://github.com/rudderlabs/rudder-transformer/commit/1c91d22795b142a90011e35cf85d1a4ac8eaa545)) - - -### Bug Fixes - -* **active-campaign:** add check before iterating stored event array ([#1902](https://github.com/rudderlabs/rudder-transformer/issues/1902)) ([9666e85](https://github.com/rudderlabs/rudder-transformer/commit/9666e851751101efc99f1d48018a9ae1ed6a9b8e)) -* **integration:** Algolia in CDK v2 now errors out for non string event names ([#1867](https://github.com/rudderlabs/rudder-transformer/issues/1867)) ([5be8891](https://github.com/rudderlabs/rudder-transformer/commit/5be88917270a9fb1c28fdd7f547e9a017aacf56d)) -* logger import ([#1874](https://github.com/rudderlabs/rudder-transformer/issues/1874)) ([7ff1b4a](https://github.com/rudderlabs/rudder-transformer/commit/7ff1b4a11fe530de45dacce1da7bf0d58d4b38fd)) -* package.json & package-lock.json to reduce vulnerabilities ([#1885](https://github.com/rudderlabs/rudder-transformer/issues/1885)) ([11b4a4b](https://github.com/rudderlabs/rudder-transformer/commit/11b4a4b523b00dffb0c9d0017a6ed3279fc596d2)) - -## [1.13.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.12.0...v1.13.0) (2023-02-15) - - -### Features - -* **destination:** onboard criteo audience ([#1792](https://github.com/rudderlabs/rudder-transformer/issues/1792)) ([5904c75](https://github.com/rudderlabs/rudder-transformer/commit/5904c75042c7cb34320fc43bcd3b54bfe5ce97fc)) -* **integration:** rockerbox - add support for custom properties mapping ([#1815](https://github.com/rudderlabs/rudder-transformer/issues/1815)) ([8ba50d2](https://github.com/rudderlabs/rudder-transformer/commit/8ba50d2249d5bd5db84ff9c37323e618b5942ec5)) -* **integration:** rockerbox - allow all properties to be passed over to rockerbox ([#1838](https://github.com/rudderlabs/rudder-transformer/issues/1838)) ([fb64039](https://github.com/rudderlabs/rudder-transformer/commit/fb6403992c76077398a9f8b5ac4cbe9fb28fd073)) -* **integrations:** onboarding webhook to CDK v2 ([#1783](https://github.com/rudderlabs/rudder-transformer/issues/1783)) ([22d583a](https://github.com/rudderlabs/rudder-transformer/commit/22d583ae2c239f532629a0d0db055658e2eda65d)) -* **mailchimp:** add support for track call ([#1814](https://github.com/rudderlabs/rudder-transformer/issues/1814)) ([94c10ba](https://github.com/rudderlabs/rudder-transformer/commit/94c10ba971a54f5f9894c0107a96a121068994cf)) -* moengage source ([#1846](https://github.com/rudderlabs/rudder-transformer/issues/1846)) ([123a2d9](https://github.com/rudderlabs/rudder-transformer/commit/123a2d9f57fd4f0c76f939b8d56edbbbc995ab00)) -* **new integration:** onboard optimizely fullstack cloud mode ([#1805](https://github.com/rudderlabs/rudder-transformer/issues/1805)) ([5373185](https://github.com/rudderlabs/rudder-transformer/commit/537318589110672ad6f453510a19e7fde3bfd2bb)) -* shopify - add cart token, order token and checkout token in the Context object ([#1847](https://github.com/rudderlabs/rudder-transformer/issues/1847)) ([88e8fe0](https://github.com/rudderlabs/rudder-transformer/commit/88e8fe0a14766532739aaf800cebb61b0ef6175d)) -* **source:** initial commit for identity stitching in shopify ([#1810](https://github.com/rudderlabs/rudder-transformer/issues/1810)) ([7b662df](https://github.com/rudderlabs/rudder-transformer/commit/7b662dfbf192f08f7bd2baf8dbd9dc5f12a8f23e)) -* **transformation:** libraries import extractor ([#1851](https://github.com/rudderlabs/rudder-transformer/issues/1851)) ([462bba9](https://github.com/rudderlabs/rudder-transformer/commit/462bba9e9ed49f0a76a8bb0e4d0b444e324f208c)) -* userId to be converted to string for Router ([#1822](https://github.com/rudderlabs/rudder-transformer/issues/1822)) ([7ec03c6](https://github.com/rudderlabs/rudder-transformer/commit/7ec03c66632513da4a311c3e19abcb3accf3437e)) - - -### Bug Fixes - -* **active_campaign:** handle bad url string while formatting with domainUrlV2 ([#1816](https://github.com/rudderlabs/rudder-transformer/issues/1816)) ([7fd15be](https://github.com/rudderlabs/rudder-transformer/commit/7fd15be8633c9cc6fcb4448f73042d641f81356c)) -* amplitude check for actionKey before accessing it ([#1833](https://github.com/rudderlabs/rudder-transformer/issues/1833)) ([5071582](https://github.com/rudderlabs/rudder-transformer/commit/50715827981e70e814c427cfa0359de16fb3c554)) -* bugsnag errors ([#1863](https://github.com/rudderlabs/rudder-transformer/issues/1863)) ([ae627d3](https://github.com/rudderlabs/rudder-transformer/commit/ae627d3adc48aa5ab390461693005d8957757430)) -* **CDK v2:** editing CDK v2 for pinterest tag for num_items field ([#1840](https://github.com/rudderlabs/rudder-transformer/issues/1840)) ([b1265c0](https://github.com/rudderlabs/rudder-transformer/commit/b1265c0949f8352881dfb13d5d31ba712e26363b)) -* codebuild issue ([16eab14](https://github.com/rudderlabs/rudder-transformer/commit/16eab14e627184d04b1a7dbb1fdd3388ff065c85)) -* criteo_audience: stringification of destination error ([#1839](https://github.com/rudderlabs/rudder-transformer/issues/1839)) ([fe17453](https://github.com/rudderlabs/rudder-transformer/commit/fe17453db7bef03916feb271bae1c25b613829da)) -* ga4 userId issue ([#1857](https://github.com/rudderlabs/rudder-transformer/issues/1857)) ([cd30c47](https://github.com/rudderlabs/rudder-transformer/commit/cd30c47f292db71a8961bef6b38a3478316e00b9)) -* **integration:** Pinterest conversion in CDK v2 returns correct num_items for single product array ([#1861](https://github.com/rudderlabs/rudder-transformer/issues/1861)) ([8c8c316](https://github.com/rudderlabs/rudder-transformer/commit/8c8c316b9ba795111f716c314cedb189e968260e)) -* **integrations:** salesforce update error message and error response handler ([#1799](https://github.com/rudderlabs/rudder-transformer/issues/1799)) ([b473c23](https://github.com/rudderlabs/rudder-transformer/commit/b473c2389909e1f06d8d79b279e66b86b414c908)) -* **klaviyo:** skip profile lookup call for rETL events ([#1856](https://github.com/rudderlabs/rudder-transformer/issues/1856)) ([9e6b5e4](https://github.com/rudderlabs/rudder-transformer/commit/9e6b5e4c145d64341e043014baed4e344fecc74c)) -* order_token updated in shopify ([#1865](https://github.com/rudderlabs/rudder-transformer/issues/1865)) ([7fc608e](https://github.com/rudderlabs/rudder-transformer/commit/7fc608e0f1c264c4494b987e0102ff48aa51e4fe)) -* package.json & package-lock.json to reduce vulnerabilities ([#1824](https://github.com/rudderlabs/rudder-transformer/issues/1824)) ([779edb2](https://github.com/rudderlabs/rudder-transformer/commit/779edb290b04694b126739708a30be024a53fe33)) -* refactor subscribe user flow to stop subscribing user without consent ([#1841](https://github.com/rudderlabs/rudder-transformer/issues/1841)) ([fe231c2](https://github.com/rudderlabs/rudder-transformer/commit/fe231c280a1250413f4b665820e4da303e05259a)) -* set context as metadata in bugsnag error notification ([#1778](https://github.com/rudderlabs/rudder-transformer/issues/1778)) ([55c3097](https://github.com/rudderlabs/rudder-transformer/commit/55c309716877b303943c18537352347b83d72c2f)) -* **singular:** undefined properties object for track ([#1808](https://github.com/rudderlabs/rudder-transformer/issues/1808)) ([f53bec1](https://github.com/rudderlabs/rudder-transformer/commit/f53bec192825aedfcf320197c386a449f9677816)) -* **transformation:** release isolate in case of error while creating ([#1850](https://github.com/rudderlabs/rudder-transformer/issues/1850)) ([ea51e24](https://github.com/rudderlabs/rudder-transformer/commit/ea51e24a893daa18e9b30463e9300ce029230a00)) -* typecast userId, anonymousId to string ([2150033](https://github.com/rudderlabs/rudder-transformer/commit/215003381557c583bd8889cef121ebbba56785c2)) -* undefined check added for isHybridModeEnabled function ([#1812](https://github.com/rudderlabs/rudder-transformer/issues/1812)) ([a49be9e](https://github.com/rudderlabs/rudder-transformer/commit/a49be9e77b6ba6bc1ef5087208ddc1a135e4301e)) -* update check for props value ([343e946](https://github.com/rudderlabs/rudder-transformer/commit/343e946ed4adc89ad8c17d945b69c2f3f3be7506)) - -## [1.12.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.11.0...v1.12.0) (2023-01-19) - - -### Features - -* **BQStream:** add batch support ([#1377](https://github.com/rudderlabs/rudder-transformer/issues/1377)) ([14c7531](https://github.com/rudderlabs/rudder-transformer/commit/14c7531635b5348ef518dcad483f25d4adeddddd)) -* **destination:** onboard lemnisk integration ([#1787](https://github.com/rudderlabs/rudder-transformer/issues/1787)) ([3c6b9e1](https://github.com/rudderlabs/rudder-transformer/commit/3c6b9e148dff559357fb61de49602f9d1689d699)), closes [#1728](https://github.com/rudderlabs/rudder-transformer/issues/1728) -* ga4 page calls are discarded if hybrid mode is enabled ([#1794](https://github.com/rudderlabs/rudder-transformer/issues/1794)) ([ca12d07](https://github.com/rudderlabs/rudder-transformer/commit/ca12d078e3f936c4c0fd4449259d1a55ba0a4424)) -* sessionId consistency across destinations ([#1789](https://github.com/rudderlabs/rudder-transformer/issues/1789)) ([ff68a44](https://github.com/rudderlabs/rudder-transformer/commit/ff68a4488e50f4a44c950395d0f9e5dc514db1df)) - - -### Bug Fixes - -* add missing implementation stat tag for router transformation ([#1779](https://github.com/rudderlabs/rudder-transformer/issues/1779)) ([5ebde56](https://github.com/rudderlabs/rudder-transformer/commit/5ebde56ea644f81d1a17fa4d85697821879fa191)) -* add sources as valid channel to cdkv1 ([bd74ef7](https://github.com/rudderlabs/rudder-transformer/commit/bd74ef7eff712d4db75856a205ddaa473d80ddd9)) -* add sources as valid channel to cdkv1 ([#1803](https://github.com/rudderlabs/rudder-transformer/issues/1803)) ([e3057db](https://github.com/rudderlabs/rudder-transformer/commit/e3057dbff9d8daa1f64b5cd6de6b57ab97c016ee)) -* add validation for event name as string ([#1768](https://github.com/rudderlabs/rudder-transformer/issues/1768)) ([c48ec5e](https://github.com/rudderlabs/rudder-transformer/commit/c48ec5e3cd6590e5c766bc3afac9eb5c368b85f0)) -* array type check for externalIdArray ([#1785](https://github.com/rudderlabs/rudder-transformer/issues/1785)) ([dec3bb6](https://github.com/rudderlabs/rudder-transformer/commit/dec3bb6661b6737203964b2c4b5e3d2bd7421433)) -* bugsnag error fixes for salesforce, garl, gaoc ([#1776](https://github.com/rudderlabs/rudder-transformer/issues/1776)) ([553c5de](https://github.com/rudderlabs/rudder-transformer/commit/553c5defc098e01e74d98606cf59baa9008b814d)) -* change destination configuration errors to abortable ([#1790](https://github.com/rudderlabs/rudder-transformer/issues/1790)) ([fb1281d](https://github.com/rudderlabs/rudder-transformer/commit/fb1281d2bc090bda34c7420c10946504e83756ef)) -* destination transformation change from processor to router ([#1754](https://github.com/rudderlabs/rudder-transformer/issues/1754)) ([674d476](https://github.com/rudderlabs/rudder-transformer/commit/674d476bd1e55194456798c7a83bd27a62b868e3)) -* **integration:** GAOC - fix timestamp format, allow calls without custom variables ([#1796](https://github.com/rudderlabs/rudder-transformer/issues/1796)) ([7c450ee](https://github.com/rudderlabs/rudder-transformer/commit/7c450ee78db2052bbb70866cbc6bd98cfd9c32b4)) -* iterable alias call is separated from identify batching ([#1777](https://github.com/rudderlabs/rudder-transformer/issues/1777)) ([3676c45](https://github.com/rudderlabs/rudder-transformer/commit/3676c4591e8b241ad6a7873954bc8f07e7a69584)) -* products array mapping and rename impact_radius to impact ([#1797](https://github.com/rudderlabs/rudder-transformer/issues/1797)) ([f812f0d](https://github.com/rudderlabs/rudder-transformer/commit/f812f0d3fbff6d6bfdd3670c59cf8ea01744f80f)) -* proper error throw in gaec ([#1767](https://github.com/rudderlabs/rudder-transformer/issues/1767)) ([a2ed19d](https://github.com/rudderlabs/rudder-transformer/commit/a2ed19dc0b5eb6bbaec7dd88b25762553b1aae79)) -* remove regex validation for phone_number ([#1771](https://github.com/rudderlabs/rudder-transformer/issues/1771)) ([6c01642](https://github.com/rudderlabs/rudder-transformer/commit/6c016428b496cea7e3771d3cf5ab4dfbbd7e382b)) -* revert salesforce fix for undefined access_token ([#1780](https://github.com/rudderlabs/rudder-transformer/issues/1780)) ([d917b2e](https://github.com/rudderlabs/rudder-transformer/commit/d917b2e61afbdfb697e5d6066aa6e34fd9f71427)) -* send dest info for failed events ([#1770](https://github.com/rudderlabs/rudder-transformer/issues/1770)) ([9f108c0](https://github.com/rudderlabs/rudder-transformer/commit/9f108c0b6a0978b7ca71d1b1bbeaafbba8dce2ee)) - -## [1.11.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.10.0...v1.11.0) (2023-01-10) - - -### Features - -* [impact radius] onboard impact radius cloud mode destination ([#1730](https://github.com/rudderlabs/rudder-transformer/issues/1730)) ([8d55c24](https://github.com/rudderlabs/rudder-transformer/commit/8d55c24930e45ddb0a38d1e2ca935b11d8fac665)), closes [#1764](https://github.com/rudderlabs/rudder-transformer/issues/1764) -* appcenter updated to support test events ([#1741](https://github.com/rudderlabs/rudder-transformer/issues/1741)) ([00648da](https://github.com/rudderlabs/rudder-transformer/commit/00648da21286cf4170e395e601dcd4b7d199957f)) -* **braze:** nested array ops ([#1753](https://github.com/rudderlabs/rudder-transformer/issues/1753)) ([0658a5f](https://github.com/rudderlabs/rudder-transformer/commit/0658a5f323a7b076a88fcb987f2ac25ea803552f)) -* clientId support added for ga4 hybrid mode ([#1759](https://github.com/rudderlabs/rudder-transformer/issues/1759)) ([04638cb](https://github.com/rudderlabs/rudder-transformer/commit/04638cb1550c05435a12d8ed481fd55c13e667da)) -* **destination:** onboard discord ([#1725](https://github.com/rudderlabs/rudder-transformer/issues/1725)) ([4f6323b](https://github.com/rudderlabs/rudder-transformer/commit/4f6323bcb5e13fb70fd0fd879c64917d46120a34)), closes [#1647](https://github.com/rudderlabs/rudder-transformer/issues/1647) [#1644](https://github.com/rudderlabs/rudder-transformer/issues/1644) [#1656](https://github.com/rudderlabs/rudder-transformer/issues/1656) [#1658](https://github.com/rudderlabs/rudder-transformer/issues/1658) [#1665](https://github.com/rudderlabs/rudder-transformer/issues/1665) [#1649](https://github.com/rudderlabs/rudder-transformer/issues/1649) [#1652](https://github.com/rudderlabs/rudder-transformer/issues/1652) [#1651](https://github.com/rudderlabs/rudder-transformer/issues/1651) [#1669](https://github.com/rudderlabs/rudder-transformer/issues/1669) [#1673](https://github.com/rudderlabs/rudder-transformer/issues/1673) [#1638](https://github.com/rudderlabs/rudder-transformer/issues/1638) [#1641](https://github.com/rudderlabs/rudder-transformer/issues/1641) [#1653](https://github.com/rudderlabs/rudder-transformer/issues/1653) [#1661](https://github.com/rudderlabs/rudder-transformer/issues/1661) [#1666](https://github.com/rudderlabs/rudder-transformer/issues/1666) [#1667](https://github.com/rudderlabs/rudder-transformer/issues/1667) [#1671](https://github.com/rudderlabs/rudder-transformer/issues/1671) [#1659](https://github.com/rudderlabs/rudder-transformer/issues/1659) [#1654](https://github.com/rudderlabs/rudder-transformer/issues/1654) [#1655](https://github.com/rudderlabs/rudder-transformer/issues/1655) [#1670](https://github.com/rudderlabs/rudder-transformer/issues/1670) [#1657](https://github.com/rudderlabs/rudder-transformer/issues/1657) [#1672](https://github.com/rudderlabs/rudder-transformer/issues/1672) [#1642](https://github.com/rudderlabs/rudder-transformer/issues/1642) [#1645](https://github.com/rudderlabs/rudder-transformer/issues/1645) [#1650](https://github.com/rudderlabs/rudder-transformer/issues/1650) [#1639](https://github.com/rudderlabs/rudder-transformer/issues/1639) [#1674](https://github.com/rudderlabs/rudder-transformer/issues/1674) [#1660](https://github.com/rudderlabs/rudder-transformer/issues/1660) [#1648](https://github.com/rudderlabs/rudder-transformer/issues/1648) [#1675](https://github.com/rudderlabs/rudder-transformer/issues/1675) [#1677](https://github.com/rudderlabs/rudder-transformer/issues/1677) [#1678](https://github.com/rudderlabs/rudder-transformer/issues/1678) [#1676](https://github.com/rudderlabs/rudder-transformer/issues/1676) [#1680](https://github.com/rudderlabs/rudder-transformer/issues/1680) [#1682](https://github.com/rudderlabs/rudder-transformer/issues/1682) [#1681](https://github.com/rudderlabs/rudder-transformer/issues/1681) [#1684](https://github.com/rudderlabs/rudder-transformer/issues/1684) [#1685](https://github.com/rudderlabs/rudder-transformer/issues/1685) [#1686](https://github.com/rudderlabs/rudder-transformer/issues/1686) [#1687](https://github.com/rudderlabs/rudder-transformer/issues/1687) [#1688](https://github.com/rudderlabs/rudder-transformer/issues/1688) [#1689](https://github.com/rudderlabs/rudder-transformer/issues/1689) [#1690](https://github.com/rudderlabs/rudder-transformer/issues/1690) [#1691](https://github.com/rudderlabs/rudder-transformer/issues/1691) [#1692](https://github.com/rudderlabs/rudder-transformer/issues/1692) [#1697](https://github.com/rudderlabs/rudder-transformer/issues/1697) [#1699](https://github.com/rudderlabs/rudder-transformer/issues/1699) [#1700](https://github.com/rudderlabs/rudder-transformer/issues/1700) [#1698](https://github.com/rudderlabs/rudder-transformer/issues/1698) [#1704](https://github.com/rudderlabs/rudder-transformer/issues/1704) [#1705](https://github.com/rudderlabs/rudder-transformer/issues/1705) -* **destination:** onboard pipedream ([#1703](https://github.com/rudderlabs/rudder-transformer/issues/1703)) ([f03e86a](https://github.com/rudderlabs/rudder-transformer/commit/f03e86a89c1123310b5d9507c5e4d82ea3d4bbf8)) -* **destination:** onboard TikTok_Ads_Offline_Events ([#1749](https://github.com/rudderlabs/rudder-transformer/issues/1749)) ([67a3a4e](https://github.com/rudderlabs/rudder-transformer/commit/67a3a4ef6f9caa3a87afce09d502a702c584ce33)) -* ga4 hybrid mode support ([#1709](https://github.com/rudderlabs/rudder-transformer/issues/1709)) ([08779d4](https://github.com/rudderlabs/rudder-transformer/commit/08779d4b8ff94bd21d9ef3600736503193da1620)) -* **integration:** adobe_analytics-fix typo, add missing mapping ([#1763](https://github.com/rudderlabs/rudder-transformer/issues/1763)) ([32f65dc](https://github.com/rudderlabs/rudder-transformer/commit/32f65dcdd3d807be1eb9a409a7b5b1d0892b067a)) -* **new integration:** onboarding sendinblue cloud mode destination ([#1662](https://github.com/rudderlabs/rudder-transformer/issues/1662)) ([e265e66](https://github.com/rudderlabs/rudder-transformer/commit/e265e66a900671f537198769b8ee0c61694bdbf2)) -* onboard pagerduty destination ([#1736](https://github.com/rudderlabs/rudder-transformer/issues/1736)) ([a947b10](https://github.com/rudderlabs/rudder-transformer/commit/a947b10c5d642463d1a03061906520ebbfdc9b05)) -* onboard pagerduty source ([#1721](https://github.com/rudderlabs/rudder-transformer/issues/1721)) ([927fa95](https://github.com/rudderlabs/rudder-transformer/commit/927fa951c35cfe098dfdb3e5499fdffcc47cb18d)) -* **pinterest:** add ldp support ([#1731](https://github.com/rudderlabs/rudder-transformer/issues/1731)) ([a54d074](https://github.com/rudderlabs/rudder-transformer/commit/a54d074f547e5e1d291bf6fa830afc013c2c7146)) -* **transformation:** faas integration for python transformations ([#1664](https://github.com/rudderlabs/rudder-transformer/issues/1664)) ([5ac8ac5](https://github.com/rudderlabs/rudder-transformer/commit/5ac8ac54b2e10ff600ab7c08b8a9ce3e6a345bee)) - - -### Bug Fixes - -* **amplitude:** added an error validation at processor ([#1717](https://github.com/rudderlabs/rudder-transformer/issues/1717)) ([424bce9](https://github.com/rudderlabs/rudder-transformer/commit/424bce9cc72a2196a955efd08e643d04e337317a)) -* **destination:** credentials exposure on live events for aws lambda ([#1726](https://github.com/rudderlabs/rudder-transformer/issues/1726)) ([589fc40](https://github.com/rudderlabs/rudder-transformer/commit/589fc407d2c4449628fa7915289ae9a1c97d20d4)) -* encode email with encodeUriComponent before searching ([#1729](https://github.com/rudderlabs/rudder-transformer/issues/1729)) ([21b624f](https://github.com/rudderlabs/rudder-transformer/commit/21b624f59c098a0459a16347e1845d7a661377fd)) -* **facebook pixel:** error code mapping for transformer proxy ([#1738](https://github.com/rudderlabs/rudder-transformer/issues/1738)) ([4e98299](https://github.com/rudderlabs/rudder-transformer/commit/4e98299298f10dc5ae39d5a3994746515622c729)) -* fixed flattenJson method ([#1718](https://github.com/rudderlabs/rudder-transformer/issues/1718)) ([9edb44e](https://github.com/rudderlabs/rudder-transformer/commit/9edb44e11b9b7ae059e9f4cfa88633e3fa4cd902)) -* hotfix for zendesk global variable ([a5d4424](https://github.com/rudderlabs/rudder-transformer/commit/a5d442405b3b55cc3bafd1389a771904d31da7c6)) -* set content_type product by default ([#1761](https://github.com/rudderlabs/rudder-transformer/issues/1761)) ([6f9cda1](https://github.com/rudderlabs/rudder-transformer/commit/6f9cda143cb8ab6b215f4b3684c5375a76d160fd)) -* user deletion handlers implementation across destinations ([#1748](https://github.com/rudderlabs/rudder-transformer/issues/1748)) ([786cfe0](https://github.com/rudderlabs/rudder-transformer/commit/786cfe0d0849d68a511c920d6c292ef3f73aee7f)), closes [#1720](https://github.com/rudderlabs/rudder-transformer/issues/1720) [#1719](https://github.com/rudderlabs/rudder-transformer/issues/1719) [#1723](https://github.com/rudderlabs/rudder-transformer/issues/1723) [#1751](https://github.com/rudderlabs/rudder-transformer/issues/1751) [#1750](https://github.com/rudderlabs/rudder-transformer/issues/1750) [#1735](https://github.com/rudderlabs/rudder-transformer/issues/1735) -* **zendesk:** remove endpoint global variable ([#1746](https://github.com/rudderlabs/rudder-transformer/issues/1746)) ([836c37e](https://github.com/rudderlabs/rudder-transformer/commit/836c37eb069ee88d24806e692ec70e0d0b045ae1)) - -## [1.10.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.9.1...v1.10.0) (2022-12-20) - - -### Features - -* introduce new tags and error classes ([#1631](https://github.com/rudderlabs/rudder-transformer/issues/1631)) ([0615a31](https://github.com/rudderlabs/rudder-transformer/commit/0615a3196d4203f6f648a4e04ca84e7ede405895)), closes [#1647](https://github.com/rudderlabs/rudder-transformer/issues/1647) [#1644](https://github.com/rudderlabs/rudder-transformer/issues/1644) [#1656](https://github.com/rudderlabs/rudder-transformer/issues/1656) [#1658](https://github.com/rudderlabs/rudder-transformer/issues/1658) [#1665](https://github.com/rudderlabs/rudder-transformer/issues/1665) [#1649](https://github.com/rudderlabs/rudder-transformer/issues/1649) [#1652](https://github.com/rudderlabs/rudder-transformer/issues/1652) [#1651](https://github.com/rudderlabs/rudder-transformer/issues/1651) [#1669](https://github.com/rudderlabs/rudder-transformer/issues/1669) [#1673](https://github.com/rudderlabs/rudder-transformer/issues/1673) [#1638](https://github.com/rudderlabs/rudder-transformer/issues/1638) [#1641](https://github.com/rudderlabs/rudder-transformer/issues/1641) [#1653](https://github.com/rudderlabs/rudder-transformer/issues/1653) [#1661](https://github.com/rudderlabs/rudder-transformer/issues/1661) [#1666](https://github.com/rudderlabs/rudder-transformer/issues/1666) [#1667](https://github.com/rudderlabs/rudder-transformer/issues/1667) [#1671](https://github.com/rudderlabs/rudder-transformer/issues/1671) [#1659](https://github.com/rudderlabs/rudder-transformer/issues/1659) [#1654](https://github.com/rudderlabs/rudder-transformer/issues/1654) [#1655](https://github.com/rudderlabs/rudder-transformer/issues/1655) [#1670](https://github.com/rudderlabs/rudder-transformer/issues/1670) [#1657](https://github.com/rudderlabs/rudder-transformer/issues/1657) [#1672](https://github.com/rudderlabs/rudder-transformer/issues/1672) [#1642](https://github.com/rudderlabs/rudder-transformer/issues/1642) [#1645](https://github.com/rudderlabs/rudder-transformer/issues/1645) [#1650](https://github.com/rudderlabs/rudder-transformer/issues/1650) [#1639](https://github.com/rudderlabs/rudder-transformer/issues/1639) [#1674](https://github.com/rudderlabs/rudder-transformer/issues/1674) [#1660](https://github.com/rudderlabs/rudder-transformer/issues/1660) [#1648](https://github.com/rudderlabs/rudder-transformer/issues/1648) [#1675](https://github.com/rudderlabs/rudder-transformer/issues/1675) [#1677](https://github.com/rudderlabs/rudder-transformer/issues/1677) [#1678](https://github.com/rudderlabs/rudder-transformer/issues/1678) [#1676](https://github.com/rudderlabs/rudder-transformer/issues/1676) [#1680](https://github.com/rudderlabs/rudder-transformer/issues/1680) [#1682](https://github.com/rudderlabs/rudder-transformer/issues/1682) [#1681](https://github.com/rudderlabs/rudder-transformer/issues/1681) [#1684](https://github.com/rudderlabs/rudder-transformer/issues/1684) [#1685](https://github.com/rudderlabs/rudder-transformer/issues/1685) [#1686](https://github.com/rudderlabs/rudder-transformer/issues/1686) [#1687](https://github.com/rudderlabs/rudder-transformer/issues/1687) [#1688](https://github.com/rudderlabs/rudder-transformer/issues/1688) [#1689](https://github.com/rudderlabs/rudder-transformer/issues/1689) [#1690](https://github.com/rudderlabs/rudder-transformer/issues/1690) [#1691](https://github.com/rudderlabs/rudder-transformer/issues/1691) [#1692](https://github.com/rudderlabs/rudder-transformer/issues/1692) [#1697](https://github.com/rudderlabs/rudder-transformer/issues/1697) [#1699](https://github.com/rudderlabs/rudder-transformer/issues/1699) [#1700](https://github.com/rudderlabs/rudder-transformer/issues/1700) [#1698](https://github.com/rudderlabs/rudder-transformer/issues/1698) [#1704](https://github.com/rudderlabs/rudder-transformer/issues/1704) [#1705](https://github.com/rudderlabs/rudder-transformer/issues/1705) - - -### Bug Fixes - -* minor issues ([#1711](https://github.com/rudderlabs/rudder-transformer/issues/1711)) ([fdea0bd](https://github.com/rudderlabs/rudder-transformer/commit/fdea0bd74529d7f4625885a594eea9fa20a0f20a)) - -### [1.9.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.9.0...v1.9.1) (2022-12-16) - - -### Bug Fixes - -* **trackingplan:** error message population ([#1706](https://github.com/rudderlabs/rudder-transformer/issues/1706)) ([72079a7](https://github.com/rudderlabs/rudder-transformer/commit/72079a7a71f52d44b057df6a910f0b0b54108f72)) - -## [1.9.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.8.0...v1.9.0) (2022-12-16) - - -### Features - -* **destination:** onboard pipedream as event stream source ([#1634](https://github.com/rudderlabs/rudder-transformer/issues/1634)) ([477e2f7](https://github.com/rudderlabs/rudder-transformer/commit/477e2f79704576c5611a9a7e97faf066db10dd87)) -* map the usertraits for all event in Posthog ([#1636](https://github.com/rudderlabs/rudder-transformer/issues/1636)) ([3a12f79](https://github.com/rudderlabs/rudder-transformer/commit/3a12f793073ab360ef5f235aac77b3c587c16006)) -* onboard ga4 hybrid mode ([#1617](https://github.com/rudderlabs/rudder-transformer/issues/1617)) ([0986b76](https://github.com/rudderlabs/rudder-transformer/commit/0986b769d2e2d84314724a16c322cd05d9fa8bd4)) -* onboard pinterest and algolia to json template engine ([#1640](https://github.com/rudderlabs/rudder-transformer/issues/1640)) ([f0f4717](https://github.com/rudderlabs/rudder-transformer/commit/f0f471762dae0ccc8f3449c50f1602bf03a54ec5)) - - -### Bug Fixes - -* **destination:** follow ecommerce spec in tiktok_ads ([#1629](https://github.com/rudderlabs/rudder-transformer/issues/1629)) ([a258bfb](https://github.com/rudderlabs/rudder-transformer/commit/a258bfb4b746aa48c12435792adb477a2957334e)) -* upgrade base node image in dockerfiles ([#1702](https://github.com/rudderlabs/rudder-transformer/issues/1702)) ([a26b20e](https://github.com/rudderlabs/rudder-transformer/commit/a26b20e43915cb8020e46e16c1997b38663f1899)) - -## [1.8.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.7.0...v1.8.0) (2022-12-07) +## [1.22.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.21.0...v1.22.0) (2023-04-10) ### Features -* added subscription group in braze ([#1597](https://github.com/rudderlabs/rudder-transformer/issues/1597)) ([f321f4e](https://github.com/rudderlabs/rudder-transformer/commit/f321f4e525c077c06c853530d8c8c23da35baee1)) -* **clevertap:** onboarding clevertap transformer proxy ([#1596](https://github.com/rudderlabs/rudder-transformer/issues/1596)) ([5479aa6](https://github.com/rudderlabs/rudder-transformer/commit/5479aa6afde2171bfd767602c55a36590ed7059b)) -* **destination:** add groupId support as groupKey in mixpanel ([#1590](https://github.com/rudderlabs/rudder-transformer/issues/1590)) ([a33adc6](https://github.com/rudderlabs/rudder-transformer/commit/a33adc6c12a4f7cd6b62955bc29d58206034b3c4)) -* **destination:** cache eviction in salesforce ([#1598](https://github.com/rudderlabs/rudder-transformer/issues/1598)) ([9af5552](https://github.com/rudderlabs/rudder-transformer/commit/9af55520f3199b4ad0027edac4650b81193ff9c5)) -* **destination:** onboard awin integration ([#1589](https://github.com/rudderlabs/rudder-transformer/issues/1589)) ([f015518](https://github.com/rudderlabs/rudder-transformer/commit/f0155185d3a9b9dfa3681a9b52c64fe5e24d6d6d)) -* **destination:** onboard marketo static list ([#1558](https://github.com/rudderlabs/rudder-transformer/issues/1558)) ([db73de9](https://github.com/rudderlabs/rudder-transformer/commit/db73de99dd538eb1c820d3bd2d42689163993cfe)) -* **destination:** onboard persistIq ([#1612](https://github.com/rudderlabs/rudder-transformer/issues/1612)) ([103ad00](https://github.com/rudderlabs/rudder-transformer/commit/103ad00df7d28d3368382cf7b0099c901bb853e4)) -* **destination:** singular- add support for other apple os ([#1611](https://github.com/rudderlabs/rudder-transformer/issues/1611)) ([63f23d8](https://github.com/rudderlabs/rudder-transformer/commit/63f23d8dc8bcf80b84b0976903dfb360785bec86)) -* ga user delete support ([#1531](https://github.com/rudderlabs/rudder-transformer/issues/1531)) ([eb198dd](https://github.com/rudderlabs/rudder-transformer/commit/eb198dd085d16d9c9069352cec8bfb6f33247654)), closes [#1551](https://github.com/rudderlabs/rudder-transformer/issues/1551) -* ga4 hybrid mode suport ([#1607](https://github.com/rudderlabs/rudder-transformer/issues/1607)) ([3edaa10](https://github.com/rudderlabs/rudder-transformer/commit/3edaa10741b2527bb05e13b129f233cba781d1e3)) -* **integration:** shopify- Add topic support in context for debugging ([#1602](https://github.com/rudderlabs/rudder-transformer/issues/1602)) ([ff3fab2](https://github.com/rudderlabs/rudder-transformer/commit/ff3fab2ec13e012aad1920c6b86b6b3e78062690)) -* **integrations:** update primary email for zendesk ([#1604](https://github.com/rudderlabs/rudder-transformer/issues/1604)) ([157f91e](https://github.com/rudderlabs/rudder-transformer/commit/157f91ef5654fddda90e8eb3e1f5899cee681854)) -* onboard olark source ([#1614](https://github.com/rudderlabs/rudder-transformer/issues/1614)) ([64db0ec](https://github.com/rudderlabs/rudder-transformer/commit/64db0ec3a77a58a61d456ac66d91bcc1ee172c64)) -* **source:** onboard satismeter as an event-stream ([#1594](https://github.com/rudderlabs/rudder-transformer/issues/1594)) ([53b9d6f](https://github.com/rudderlabs/rudder-transformer/commit/53b9d6ffaf0db1daa3eda8f8c89a0034cb50164e)) +* add override support in clevertap ([#2043](https://github.com/rudderlabs/rudder-transformer/issues/2043)) ([addb9f9](https://github.com/rudderlabs/rudder-transformer/commit/addb9f90258233ed0c05583250b6d6e7ff56041c)) +* **clevertap:** ignore stringification for objects for Charged event ([#2041](https://github.com/rudderlabs/rudder-transformer/issues/2041)) ([fd3e4ea](https://github.com/rudderlabs/rudder-transformer/commit/fd3e4ea5297712011022ccaf4eb785b79c321b7d)) +* enhancement gaoc store conversion ([#1990](https://github.com/rudderlabs/rudder-transformer/issues/1990)) ([f90b16f](https://github.com/rudderlabs/rudder-transformer/commit/f90b16f8c827aa32fbe92e0fa053cc8212bad0a3)) ### Bug Fixes -* bugsnag bug fixes for several destinations and sources ([#1585](https://github.com/rudderlabs/rudder-transformer/issues/1585)) ([c222dc6](https://github.com/rudderlabs/rudder-transformer/commit/c222dc6cbc489d23ad9b38137c449e76084b458e)) -* **destination:** empty params fix in awin ([#1628](https://github.com/rudderlabs/rudder-transformer/issues/1628)) ([e36ab45](https://github.com/rudderlabs/rudder-transformer/commit/e36ab455ce33a308c58aed84c51fef7f9b80ea26)) -* email not required for update call ([#1626](https://github.com/rudderlabs/rudder-transformer/issues/1626)) ([51dcbd9](https://github.com/rudderlabs/rudder-transformer/commit/51dcbd9a0efee2cdc3342bdcc96c67783a5aa118)) -* fixed encryption info and quantity mandatory in CM360 ([#1618](https://github.com/rudderlabs/rudder-transformer/issues/1618)) ([bbe0a26](https://github.com/rudderlabs/rudder-transformer/commit/bbe0a2689930ed783abfd1cf6ea66d50cf1cf826)) -* remove disable destination category for OAuth destinations ([#1601](https://github.com/rudderlabs/rudder-transformer/issues/1601)) ([06f9ee7](https://github.com/rudderlabs/rudder-transformer/commit/06f9ee749d692ec781d53aa229fd58964d0420dd)) -* saas -> master ([#1603](https://github.com/rudderlabs/rudder-transformer/issues/1603)) ([b154e1d](https://github.com/rudderlabs/rudder-transformer/commit/b154e1d61bd894e27f62ecc737d1dd0f1b16d28a)), closes [#1601](https://github.com/rudderlabs/rudder-transformer/issues/1601) [#1606](https://github.com/rudderlabs/rudder-transformer/issues/1606) - -## [1.7.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.6.0...v1.7.0) (2022-11-17) - +* batching with multiplexing ([#1926](https://github.com/rudderlabs/rudder-transformer/issues/1926)) ([e3fe5b5](https://github.com/rudderlabs/rudder-transformer/commit/e3fe5b520fa85849b0ef6148c2380afd8242eec6)) -### Features - -* add support for topic parsing ([#1574](https://github.com/rudderlabs/rudder-transformer/issues/1574)) ([da64878](https://github.com/rudderlabs/rudder-transformer/commit/da648788ab0460bd231cf9147fb9852747551ef8)) -* **destination:** add partner_name for tiktok ads ([#1583](https://github.com/rudderlabs/rudder-transformer/issues/1583)) ([12265a9](https://github.com/rudderlabs/rudder-transformer/commit/12265a952a171627ac05d7eab8899d97ceade13c)) -* **destination:** onboard campaign manager ([#1580](https://github.com/rudderlabs/rudder-transformer/issues/1580)) ([b823a53](https://github.com/rudderlabs/rudder-transformer/commit/b823a538ca4d4f38faa4762ae986375e0eb8ae05)) -* sendgrid idetify and user deletion support ([#1571](https://github.com/rudderlabs/rudder-transformer/issues/1571)) ([caee969](https://github.com/rudderlabs/rudder-transformer/commit/caee969c79ce9673096d0fc4d08be3ba942ce9f5)) +## [1.21.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.20.2...v1.21.0) (2023-04-04) ### Bug Fixes -* (marketo) logger import ([#1576](https://github.com/rudderlabs/rudder-transformer/issues/1576)) ([c83f046](https://github.com/rudderlabs/rudder-transformer/commit/c83f046ee8baed0e61e8c4d2ac78fec74d74b794)) -* add test coverage for processMetadata function ([#1567](https://github.com/rudderlabs/rudder-transformer/issues/1567)) ([b438daa](https://github.com/rudderlabs/rudder-transformer/commit/b438daad9bf0c845d867e0261ff69e77fc3ee0cd)) -* **destination:** fix the flattening issue solve for ga4 ([#1581](https://github.com/rudderlabs/rudder-transformer/issues/1581)) ([bea730d](https://github.com/rudderlabs/rudder-transformer/commit/bea730da510c016bd3a71cb519316375b44ea6d3)) -* **destination:** revamp group call in Gainsight_PX to reduce API calls ([#1578](https://github.com/rudderlabs/rudder-transformer/issues/1578)) ([f641cc0](https://github.com/rudderlabs/rudder-transformer/commit/f641cc0d3b64fcb736bbd4d5208819958bacb393)) -* **destination:** update formating of user traits in facebook pixel ([#1579](https://github.com/rudderlabs/rudder-transformer/issues/1579)) ([b7772e4](https://github.com/rudderlabs/rudder-transformer/commit/b7772e41530f1d4e88263408d4ff3532c187eaf5)) -* **integration:** Shopify - correct typo in customer_disabled, add to track_maps ([#1573](https://github.com/rudderlabs/rudder-transformer/issues/1573)) ([cfb5c56](https://github.com/rudderlabs/rudder-transformer/commit/cfb5c56bdc70e52dc996fdfc9c26743a6728d875)) -* **transformation:** convert slash to dot to get valid docker image name ([#1564](https://github.com/rudderlabs/rudder-transformer/issues/1564)) ([f1b6b94](https://github.com/rudderlabs/rudder-transformer/commit/f1b6b946e1a6eb519560b675f3fce10d1e833950)) -* typo in topic mapping for shopify source ([#1566](https://github.com/rudderlabs/rudder-transformer/issues/1566)) ([0ecf278](https://github.com/rudderlabs/rudder-transformer/commit/0ecf278be9a2435ed67fee299350a34c4b13bb9a)) - -## [1.6.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.5.0...v1.6.0) (2022-11-10) - +* add canonicals for adobe analytics ([#2033](https://github.com/rudderlabs/rudder-transformer/issues/2033)) ([a5ce9f4](https://github.com/rudderlabs/rudder-transformer/commit/a5ce9f4564c4635420d9027f2229c4c098a3d6ca)) +* **customerio:** group call filter logic ([#2027](https://github.com/rudderlabs/rudder-transformer/issues/2027)) ([196e501](https://github.com/rudderlabs/rudder-transformer/commit/196e501006a93fa164f7207253a1b20ffce2342e)) +* removed console ([#2034](https://github.com/rudderlabs/rudder-transformer/issues/2034)) ([a03f5cd](https://github.com/rudderlabs/rudder-transformer/commit/a03f5cd2d54d2e04634733911f31d9fecfd4dd69)) -### Features -* **destination:** skip unix timestamp conversion if already being sent from source ([#1560](https://github.com/rudderlabs/rudder-transformer/issues/1560)) ([a52cbd7](https://github.com/rudderlabs/rudder-transformer/commit/a52cbd797fa8a0ccec6589ff78b966da26040fbc)) -* **destination:** stringify the object and array for Clevertap ([#1554](https://github.com/rudderlabs/rudder-transformer/issues/1554)) ([1c7b459](https://github.com/rudderlabs/rudder-transformer/commit/1c7b459d74ae0b17360d0e49e9bc11557e6f4233)) -* **destination:** support custom mapping with client_id for ga4 destination ([#1553](https://github.com/rudderlabs/rudder-transformer/issues/1553)) ([e9f056b](https://github.com/rudderlabs/rudder-transformer/commit/e9f056bacad84d7e59e58904626c6eb7edcc4686)) -* **destination:** update identify call to set primary email for Zendesk([#1539](https://github.com/rudderlabs/rudder-transformer/issues/1539)) ([ed307a3](https://github.com/rudderlabs/rudder-transformer/commit/ed307a31ff46575f3a606a0894eeeaaec0b40c00)) -* **marketo:** add dynamic ttl & cache eviction support ([#1519](https://github.com/rudderlabs/rudder-transformer/issues/1519)) ([19f1081](https://github.com/rudderlabs/rudder-transformer/commit/19f1081cc32ba9798876dcb9d46d9d094c171e1d)) -* support custom webhooks in auth0 source transformer ([#1527](https://github.com/rudderlabs/rudder-transformer/issues/1527)) ([ebc005f](https://github.com/rudderlabs/rudder-transformer/commit/ebc005f84d3af4a7a32f362cc7ece842c8f269a1)) +### [1.20.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.20.1...v1.20.2) (2023-04-01) ### Bug Fixes -* (marketo)- remove duplicate responseHandler from util and refactor ([#1557](https://github.com/rudderlabs/rudder-transformer/issues/1557)) ([144793e](https://github.com/rudderlabs/rudder-transformer/commit/144793eef2c83b9bc43b989b061c7c7a7c4f07fe)) -* **destination:** do not update event properties to lowercase in hubspot ([#1559](https://github.com/rudderlabs/rudder-transformer/issues/1559)) ([e41b37f](https://github.com/rudderlabs/rudder-transformer/commit/e41b37f38f1f9de87fa452ea30c6587d87a95a5d)) -* ecom events properties mapping correction ([#1549](https://github.com/rudderlabs/rudder-transformer/issues/1549)) ([0e9c816](https://github.com/rudderlabs/rudder-transformer/commit/0e9c816092c5fc777f2d472e13ec3aa94def2160)) -* incorrect lodash cloneDeep import ([#1545](https://github.com/rudderlabs/rudder-transformer/issues/1545)) ([5e70dca](https://github.com/rudderlabs/rudder-transformer/commit/5e70dcae665f3610ea6e65bb2d6303b9a547036e)) -* suppress cdk error types ([#1555](https://github.com/rudderlabs/rudder-transformer/issues/1555)) ([9215a7c](https://github.com/rudderlabs/rudder-transformer/commit/9215a7ca272122199202d26301f9515a1a3bd6b0)) - -## [1.5.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.4.0...v1.5.0) (2022-11-03) - - -### Features - -* added multitopic support for kafka ([#1488](https://github.com/rudderlabs/rudder-transformer/issues/1488)) ([bd1298b](https://github.com/rudderlabs/rudder-transformer/commit/bd1298b57358cf62a2ef7f74fe06ba0200bda488)) -* **new integration:** onboarding snapchat custom audience ([#1443](https://github.com/rudderlabs/rudder-transformer/issues/1443)) ([1e00248](https://github.com/rudderlabs/rudder-transformer/commit/1e0024824074e4b66a67f38302ec02d611e7a8c7)) - - -### Bug Fixes +* add the missing git commit sha of the source to bugsnag ([#2030](https://github.com/rudderlabs/rudder-transformer/issues/2030)) ([65ccbdd](https://github.com/rudderlabs/rudder-transformer/commit/65ccbdd693b68c331e500a50f0019ea0a7e2a27c)) -* fixing errors caught by bugsnag ([#1536](https://github.com/rudderlabs/rudder-transformer/issues/1536)) ([9c43896](https://github.com/rudderlabs/rudder-transformer/commit/9c43896f27be87d8c024a61b4cb4a09124918f23)) -* suppress errors thrown from the transformers in bugsnag notifier ([#1534](https://github.com/rudderlabs/rudder-transformer/issues/1534)) ([1ca8e9f](https://github.com/rudderlabs/rudder-transformer/commit/1ca8e9f704eb03699c198c91cf1691ccdfa42772)) -## [1.4.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.3.0...v1.4.0) (2022-11-01) +### [1.20.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.20.0...v1.20.1) (2023-04-01) ### Features -* **integration:** onboarding gainsight px source ([#1500](https://github.com/rudderlabs/rudder-transformer/issues/1500)) ([0d0cce5](https://github.com/rudderlabs/rudder-transformer/commit/0d0cce5299b0cad9c616cb7b0bbee92f6f414732)) -* onboard algolia destination to cdk 2.0 ([#1474](https://github.com/rudderlabs/rudder-transformer/issues/1474)) ([e716d84](https://github.com/rudderlabs/rudder-transformer/commit/e716d8458d636854f59a555cafc2a7b00a0b1b50)) +* add audience id for retl sources from context ([#2025](https://github.com/rudderlabs/rudder-transformer/issues/2025)) ([40481a8](https://github.com/rudderlabs/rudder-transformer/commit/40481a83100ac40316fb5b3eb999464c5b927b4d)) +* add fb to transformer proxy ([#1900](https://github.com/rudderlabs/rudder-transformer/issues/1900)) ([7e6341f](https://github.com/rudderlabs/rudder-transformer/commit/7e6341f3d065aecefe3abe634cd3720cf426583a)) ### Bug Fixes -* **amplitude:** send error response instead of discarding the event during batch processing ([#1521](https://github.com/rudderlabs/rudder-transformer/issues/1521)) ([fece19f](https://github.com/rudderlabs/rudder-transformer/commit/fece19fccff44a31d1d96c43bd138ce6f2cce10d)) -* cdk based live compare test results ([#1483](https://github.com/rudderlabs/rudder-transformer/issues/1483)) ([d8f32c3](https://github.com/rudderlabs/rudder-transformer/commit/d8f32c3d522a6e3b33023828e1bd8b870046861f)) -* error stat issue for algolia ([#1528](https://github.com/rudderlabs/rudder-transformer/issues/1528)) ([3a7482c](https://github.com/rudderlabs/rudder-transformer/commit/3a7482cf4f6d37785e9ef595bd7e4a9d54aebedb)) -* upgrade ajv from 8.6.1 to 8.11.0 ([#1372](https://github.com/rudderlabs/rudder-transformer/issues/1372)) ([f3b54c0](https://github.com/rudderlabs/rudder-transformer/commit/f3b54c0876bb7be79244e02e31517db13260c610)) -* upgrade axios from 0.26.1 to 0.27.2 ([#1403](https://github.com/rudderlabs/rudder-transformer/issues/1403)) ([1186518](https://github.com/rudderlabs/rudder-transformer/commit/1186518cf89ad4de3ad16ae0a0fcb09e148bdfe5)) - -## [1.3.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.2.0...v1.3.0) (2022-10-25) - +* **customerio:** added validations to convert integer to string ([#2017](https://github.com/rudderlabs/rudder-transformer/issues/2017)) ([f50b128](https://github.com/rudderlabs/rudder-transformer/commit/f50b12845008fb6b7bfdc410cf9b43a246dc4ca3)) +* **customerio:** update logic of getting event name ([#2028](https://github.com/rudderlabs/rudder-transformer/issues/2028)) ([18e4a83](https://github.com/rudderlabs/rudder-transformer/commit/18e4a83a8d2da1146dc1b1f78cf710a200c30b92)) -### Features -* **error reporting:** integrate bugsnag ([#1469](https://github.com/rudderlabs/rudder-transformer/issues/1469)) ([39b5fa2](https://github.com/rudderlabs/rudder-transformer/commit/39b5fa22ddb8e79d540242c66732cdcb31760ba9)) -* **integrations:** added support for catalogs iterable with vdm rETL source ([#1439](https://github.com/rudderlabs/rudder-transformer/issues/1439)) ([586f771](https://github.com/rudderlabs/rudder-transformer/commit/586f771f8e0733ac2f79ea4741bb155eb24910ca)) -* **new integration:** factorsAi ([#1490](https://github.com/rudderlabs/rudder-transformer/issues/1490)) ([1000ca8](https://github.com/rudderlabs/rudder-transformer/commit/1000ca8853b48f65bf1e8db0e2999f1d4b47387b)) +## [1.20.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.19.0...v1.20.0) (2023-03-28) ### Bug Fixes -* bugsnag error notify handler ([#1512](https://github.com/rudderlabs/rudder-transformer/issues/1512)) ([d947c0e](https://github.com/rudderlabs/rudder-transformer/commit/d947c0ec23998ce54553839cf4b2e337c379713e)) -* **mixpanel:** stripped off last 36 characters of insert_id ([#1503](https://github.com/rudderlabs/rudder-transformer/issues/1503)) ([550faec](https://github.com/rudderlabs/rudder-transformer/commit/550faecae92d48364b0fdebb8e50c057c0dfffe2)) -* posthog group update ([#1496](https://github.com/rudderlabs/rudder-transformer/issues/1496)) ([154f656](https://github.com/rudderlabs/rudder-transformer/commit/154f656e2d437c1c54a6ef85c1b37f65fe154f14)) -* skip adding Id field to salesforce payload for retl ([#1501](https://github.com/rudderlabs/rudder-transformer/issues/1501)) ([d2808f4](https://github.com/rudderlabs/rudder-transformer/commit/d2808f42ae3d3281468dbec1fc13e1511a45ebcd)) -* upgrade @aws-sdk/client-s3 from 3.56.0 to 3.180.0 ([#1505](https://github.com/rudderlabs/rudder-transformer/issues/1505)) ([58c0179](https://github.com/rudderlabs/rudder-transformer/commit/58c01795f2c5b767e614c0d1777d7173eb741d17)) -* upgrade @aws-sdk/lib-storage from 3.56.0 to 3.142.0 ([#1370](https://github.com/rudderlabs/rudder-transformer/issues/1370)) ([94faae5](https://github.com/rudderlabs/rudder-transformer/commit/94faae5fe34ef559b82975d4c53f4bd54b6dbaf1)) - -## [1.2.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.1.0...v1.2.0) (2022-10-18) - - -* release 1.2.0 ([1ce4963](https://github.com/rudderlabs/rudder-transformer/commit/1ce4963a959d38077d5eece1795d7af5b6379314)) - -## [1.1.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.0.0...v1.1.0) (2022-10-17) - - -### Features +* **gainsignt_px:** undefined attributes issue ([#2010](https://github.com/rudderlabs/rudder-transformer/issues/2010)) ([bf56359](https://github.com/rudderlabs/rudder-transformer/commit/bf5635942a88a3afc25506ba6591bf6b844624f3)) +* **monday:** axios call empty response issue ([#2001](https://github.com/rudderlabs/rudder-transformer/issues/2001)) ([196294f](https://github.com/rudderlabs/rudder-transformer/commit/196294f70bc967efea70aef084268db9c567417a)) +* **rockerbox:** make email as non-required field ([#1995](https://github.com/rudderlabs/rudder-transformer/issues/1995)) ([2f7ebff](https://github.com/rudderlabs/rudder-transformer/commit/2f7ebff62c8934165c1271a7c019c2b0b5b2a4b3)) +* **snapchat_conversion:** price calculation ([#1988](https://github.com/rudderlabs/rudder-transformer/issues/1988)) ([8240224](https://github.com/rudderlabs/rudder-transformer/commit/82402242a1ffe9ccc75671023cff1ebbbcb390e6)) +* **test-cases:** fix test cases to use template like secret keys ([#1973](https://github.com/rudderlabs/rudder-transformer/issues/1973)) ([f709d1f](https://github.com/rudderlabs/rudder-transformer/commit/f709d1fb9d1d22e306fc600872dd2b702436f961)) +* undefined columnToPropertyMapping config issue ([#1998](https://github.com/rudderlabs/rudder-transformer/issues/1998)) ([ef7a351](https://github.com/rudderlabs/rudder-transformer/commit/ef7a3511e26e652caa54fb600db01ebe6bd0cc3d)) -* **integration:** Marketo- attribute to attributes, apiName to name,… ([#1481](https://github.com/rudderlabs/rudder-transformer/issues/1481)) ([e7187d6](https://github.com/rudderlabs/rudder-transformer/commit/e7187d64ef20dd788826eed91a9bd234b778c93a)) -## [1.0.0](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.5-rc.0...v1.0.0) (2022-10-13) +## [1.19.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.18.0...v1.19.0) (2023-03-23) ### Features -* add commit id and version in health endpoint ([#1445](https://github.com/rudderlabs/rudder-transformer/issues/1445)) ([e21dca7](https://github.com/rudderlabs/rudder-transformer/commit/e21dca7106afae7b6150fa8ab85520de321a2ea4)) -* Add library key support ([4aa31af](https://github.com/rudderlabs/rudder-transformer/commit/4aa31afc9828a20132a5b9142279f6d06179039a)) -* Add support for all Apple family OSes ([#925](https://github.com/rudderlabs/rudder-transformer/issues/925)) ([0962527](https://github.com/rudderlabs/rudder-transformer/commit/0962527bbe11927a53dd0c3973d5d39da0b961ce)) -* add Variance as a destination ([c5f84c6](https://github.com/rudderlabs/rudder-transformer/commit/c5f84c6f58b27ee45728f190869e21145a522a62)) -* Added library key support for Amplitude ([5af62c0](https://github.com/rudderlabs/rudder-transformer/commit/5af62c09668eff2ee321dc72eed784c27bb25ee0)) -* Added library key support for Amplitude ([f0cf6b5](https://github.com/rudderlabs/rudder-transformer/commit/f0cf6b526cf3f0dc9ffcc1476df683a351264c04)) -* **Facebook Pixel:** add response parsing support ([#1412](https://github.com/rudderlabs/rudder-transformer/issues/1412)) ([00893c1](https://github.com/rudderlabs/rudder-transformer/commit/00893c1e525473df306648b0946ecb90841c4197)) -* **hs:** Add support for hubspot association events sent from retl ([#1361](https://github.com/rudderlabs/rudder-transformer/issues/1361)) ([b18c93f](https://github.com/rudderlabs/rudder-transformer/commit/b18c93f9865b4ecb0b5025370c544c58102a4df0)) -* integrate cdk v2 ([#1448](https://github.com/rudderlabs/rudder-transformer/issues/1448)) ([d5086c2](https://github.com/rudderlabs/rudder-transformer/commit/d5086c2f0807424ac4e66a6c12e59b07eada5cbe)) -* **integration:** fb custom audience - upgrade v14 to v15 ([#1463](https://github.com/rudderlabs/rudder-transformer/issues/1463)) ([f83a4b6](https://github.com/rudderlabs/rudder-transformer/commit/f83a4b607fdf02746e60c103e8a29850caeca9e3)) -* **integration:** marketo - correct attribute to attributes, fix test cases ([#1446](https://github.com/rudderlabs/rudder-transformer/issues/1446)) ([80b148f](https://github.com/rudderlabs/rudder-transformer/commit/80b148fabb0eb49ac132e196c2aae0e5be3fed6f)) -* **integration:** onboard Facebook Offline Conversions destination ([#1462](https://github.com/rudderlabs/rudder-transformer/issues/1462)) ([9f0413b](https://github.com/rudderlabs/rudder-transformer/commit/9f0413b8285793ced787cd385beed956b675982a)) -* **integration:** Singular- allow empty string by default for instal… ([#1480](https://github.com/rudderlabs/rudder-transformer/issues/1480)) ([c44dec2](https://github.com/rudderlabs/rudder-transformer/commit/c44dec2a0d6952647489754b3bd5d7917d563251)) -* **integration:** Singular- unixtimestamp format fixes and empty url allowed for openuri ([#1476](https://github.com/rudderlabs/rudder-transformer/issues/1476)) ([66c1efd](https://github.com/rudderlabs/rudder-transformer/commit/66c1efd87878485c78a01f82ec8cafd21056f8a6)) -* **integrations:** user deletion support for mp, clevertap, and af destinations ([#1426](https://github.com/rudderlabs/rudder-transformer/issues/1426)) ([b5c5d6f](https://github.com/rudderlabs/rudder-transformer/commit/b5c5d6fbb9023fbf86e370366ab3f6818b4c343b)) -* json support for warehouse destinations ([#1144](https://github.com/rudderlabs/rudder-transformer/issues/1144)) ([a431b08](https://github.com/rudderlabs/rudder-transformer/commit/a431b087e139a26477050f64ee26dbbe473899a9)) -* Klaviyo ecommerce Specs ([#904](https://github.com/rudderlabs/rudder-transformer/issues/904)) ([5dd5329](https://github.com/rudderlabs/rudder-transformer/commit/5dd53296fbe4add44cc4acb330a61d5e4e11ddc9)) -* migrate pinterest to cdk ([#1458](https://github.com/rudderlabs/rudder-transformer/issues/1458)) ([addff70](https://github.com/rudderlabs/rudder-transformer/commit/addff70d77e50b53cb7bb10fa4f4f59523f38f57)) -* **new integration:** google adwords offline conversions onboarding ([#1397](https://github.com/rudderlabs/rudder-transformer/issues/1397)) ([4974b6d](https://github.com/rudderlabs/rudder-transformer/commit/4974b6d40c6cfcae0f455bc18704137d9b921192)) -* **new integration:** june cloud mode destination onboarding ([#1433](https://github.com/rudderlabs/rudder-transformer/issues/1433)) ([458b32c](https://github.com/rudderlabs/rudder-transformer/commit/458b32c2d4e0100a56eb084128ca0aa76e2a006c)) -* **new integration:** onboard Monday cloud mode destination ([#1400](https://github.com/rudderlabs/rudder-transformer/issues/1400)) ([f4e5cc4](https://github.com/rudderlabs/rudder-transformer/commit/f4e5cc4542a4cd729d8e8c77d4973dbe858bb6db)) -* **new integration:** onboarding mailjet ([#1449](https://github.com/rudderlabs/rudder-transformer/issues/1449)) ([81de8a1](https://github.com/rudderlabs/rudder-transformer/commit/81de8a16c6d1cdeb3ac8b27a7d8a0cd51fc2c4af)) -* **new integration:** onboarding mailmodo source ([#1414](https://github.com/rudderlabs/rudder-transformer/issues/1414)) ([e3689c2](https://github.com/rudderlabs/rudder-transformer/commit/e3689c249fd92baa9b3d640c0802f71b78d22650)) -* **serenytics:** onboarding serenytics cloud mode destinations ([#1430](https://github.com/rudderlabs/rudder-transformer/issues/1430)) ([b7e93e3](https://github.com/rudderlabs/rudder-transformer/commit/b7e93e310903e93c39403f1f4b819c14e09d528d)) -* **signl4:** onboarding signl4 cloud mode destination ([#1424](https://github.com/rudderlabs/rudder-transformer/issues/1424)) ([47bd3f8](https://github.com/rudderlabs/rudder-transformer/commit/47bd3f817a4df4d555a8ede656a8b311a4232519)) -* support 'event' alias for 'message' in dynamic config ([#1289](https://github.com/rudderlabs/rudder-transformer/issues/1289)) ([ff6abb8](https://github.com/rudderlabs/rudder-transformer/commit/ff6abb8d4e89af154289b246b33f6e988c0efcbd)) -* **transformation:** update env varibale name ([d904828](https://github.com/rudderlabs/rudder-transformer/commit/d904828e47a94d82a8428cf376dea5eb926d44a4)) - - -### Bug Fixes - -* address async and flow type issues ([#1457](https://github.com/rudderlabs/rudder-transformer/issues/1457)) ([632f74e](https://github.com/rudderlabs/rudder-transformer/commit/632f74e5f1d35d882ed6531f2af84b7d1fba0472)) -* **algolia:** adding check on eventTypeSetting availability ([#1423](https://github.com/rudderlabs/rudder-transformer/issues/1423)) ([d8572ff](https://github.com/rudderlabs/rudder-transformer/commit/d8572ff4949513573d5f7367fa0dc0811086e61f)) -* **appsflyer:** event name casing in track payloads ([#1390](https://github.com/rudderlabs/rudder-transformer/issues/1390)) ([3b22f18](https://github.com/rudderlabs/rudder-transformer/commit/3b22f1840acaf57b110ff67a9805be6d2bf7b062)) -* **braze:** adding dynamic support for eu data center ([#1236](https://github.com/rudderlabs/rudder-transformer/issues/1236)) ([90bc03f](https://github.com/rudderlabs/rudder-transformer/commit/90bc03f00d8ce48b8e93f28c06863c80c353116f)) -* docker vulnerabilities ([#1435](https://github.com/rudderlabs/rudder-transformer/issues/1435)) ([27084e2](https://github.com/rudderlabs/rudder-transformer/commit/27084e2c483bec679c9988a998b087a558bc5826)) -* facebook pixel proxy tests ([#1444](https://github.com/rudderlabs/rudder-transformer/issues/1444)) ([f632583](https://github.com/rudderlabs/rudder-transformer/commit/f6325833244affaffad8aa311466c1596ef01cdd)) -* Fix test case ([ac2342d](https://github.com/rudderlabs/rudder-transformer/commit/ac2342d43feabe92c7ed23495e02d9f77fb5fccd)) -* **ga:** Do not fallback to userId for cid when disableMd5 is true, keep it undefined ([ad72d59](https://github.com/rudderlabs/rudder-transformer/commit/ad72d5962c19b00ae9dbbb3cec0cc6b223c7683d)) -* **hs:** logic for custom objects support of hs with rETL ([#1222](https://github.com/rudderlabs/rudder-transformer/issues/1222)) ([5353bcc](https://github.com/rudderlabs/rudder-transformer/commit/5353bcc33f7b077aa5240ac653c747aa6f3fd4b6)) -* kafka schemaId ([#1283](https://github.com/rudderlabs/rudder-transformer/issues/1283)) ([214d5d5](https://github.com/rudderlabs/rudder-transformer/commit/214d5d53edb20b6b994d3b01bee8dddcc4fe2128)) -* **marketo:** unhandled exception status-code fix ([#1432](https://github.com/rudderlabs/rudder-transformer/issues/1432)) ([6cc4868](https://github.com/rudderlabs/rudder-transformer/commit/6cc48688c82ba501b296c1171c0327cc91e33e4d)) -* Remove event type guard that prevent traits from copying to user props ([e276ade](https://github.com/rudderlabs/rudder-transformer/commit/e276ade3c57c4556399a5be8b09f15a1877c5a2b)) -* **signl4:** correcting timestamp format ([#1431](https://github.com/rudderlabs/rudder-transformer/issues/1431)) ([18632e6](https://github.com/rudderlabs/rudder-transformer/commit/18632e632330db753eabe1fe4d90f22703979c1b)) -* **trackingplan:** adding message type optional check in tp source config ([60f0658](https://github.com/rudderlabs/rudder-transformer/commit/60f0658a5b7701d8d545ebfb838bfa19cc68c6e2)) -* upgrade dotenv from 8.2.0 to 8.6.0 ([#1389](https://github.com/rudderlabs/rudder-transformer/issues/1389)) ([1c3d001](https://github.com/rudderlabs/rudder-transformer/commit/1c3d001f8c35d0885497faa87c8ce728d6403efe)) -* upgrade koa from 2.13.0 to 2.13.4 ([#1398](https://github.com/rudderlabs/rudder-transformer/issues/1398)) ([213e30e](https://github.com/rudderlabs/rudder-transformer/commit/213e30e4c04481ee4aa9d59c346ed959acfd5bb5)) -* upgrade ua-parser-js from 0.7.24 to 0.8.1 ([#1378](https://github.com/rudderlabs/rudder-transformer/issues/1378)) ([a50899b](https://github.com/rudderlabs/rudder-transformer/commit/a50899b6780d3f640c260830c74f28cd4b1d9b5d)) -* vulnerabilities in dependencies ([#1436](https://github.com/rudderlabs/rudder-transformer/issues/1436)) ([a26e7f5](https://github.com/rudderlabs/rudder-transformer/commit/a26e7f54d5aaafa48c20826cd5dd5f3f8f30e39f)) - -### [0.1.5-rc.0](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.4...v0.1.5-rc.0) (2020-03-16) - -### [0.1.4](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.3...v0.1.4) (2020-03-02) - -### [0.1.3](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.2...v0.1.3) (2020-02-11) - -### [0.1.2](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.1...v0.1.2) (2020-02-07) +* **indicative:** parse user agent info ([#1971](https://github.com/rudderlabs/rudder-transformer/issues/1971)) ([1328b5a](https://github.com/rudderlabs/rudder-transformer/commit/1328b5ac38f9d21def89bacbbca4891dbd6e4450)) ### Bug Fixes -* salesforce tests ([86500b8](https://github.com/rudderlabs/rudder-transformer/commit/86500b832610f047666a4fe4799a843c5a1fb6e9)) - -### [0.1.1](https://github.com/rudderlabs/rudder-transformer/compare/v0.1.0...v0.1.1) (2019-11-05) - -## 0.1.0 (2019-10-24) +* file names in helm charts update job ([#1992](https://github.com/rudderlabs/rudder-transformer/issues/1992)) ([c694b49](https://github.com/rudderlabs/rudder-transformer/commit/c694b49cfae270e10bdad1d2e990f287b679649d)) +* ga4 user_properties structure ([#1982](https://github.com/rudderlabs/rudder-transformer/issues/1982)) ([3d81202](https://github.com/rudderlabs/rudder-transformer/commit/3d81202fcd88b8033504e9f5aa5d095e6863dc76)) +* **GA4:** revert context.traits support for user_properties ([#1991](https://github.com/rudderlabs/rudder-transformer/issues/1991)) ([ae001dc](https://github.com/rudderlabs/rudder-transformer/commit/ae001dc7aafe8b33be696acac9fad3416b51f8e8)) +* revert context.traits support for user_properties ([4f51403](https://github.com/rudderlabs/rudder-transformer/commit/4f51403facdadfc2928f13159918bede3a5c073c)) +* tik-tok ads offline events email array issue ([#1979](https://github.com/rudderlabs/rudder-transformer/issues/1979)) ([3c7f4ac](https://github.com/rudderlabs/rudder-transformer/commit/3c7f4ac60ec564198f0bf0524a0780dfc581140a)) -## [1.19.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.18.0...v1.19.0) (2023-03-23) +## [1.18.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.17.0...v1.18.0) (2023-03-23) ### Features @@ -993,10 +88,8 @@ All notable changes to this project will be documented in this file. See [standa ### Bug Fixes -* file names in helm charts update job ([#1992](https://github.com/rudderlabs/rudder-transformer/issues/1992)) ([c694b49](https://github.com/rudderlabs/rudder-transformer/commit/c694b49cfae270e10bdad1d2e990f287b679649d)) +* changelog ([d8d81a2](https://github.com/rudderlabs/rudder-transformer/commit/d8d81a2d4ad428be2936932f22e63fd9007d9799)) * ga4 user_properties structure ([#1982](https://github.com/rudderlabs/rudder-transformer/issues/1982)) ([3d81202](https://github.com/rudderlabs/rudder-transformer/commit/3d81202fcd88b8033504e9f5aa5d095e6863dc76)) -* **GA4:** revert context.traits support for user_properties ([#1991](https://github.com/rudderlabs/rudder-transformer/issues/1991)) ([ae001dc](https://github.com/rudderlabs/rudder-transformer/commit/ae001dc7aafe8b33be696acac9fad3416b51f8e8)) -* revert context.traits support for user_properties ([4f51403](https://github.com/rudderlabs/rudder-transformer/commit/4f51403facdadfc2928f13159918bede3a5c073c)) * tik-tok ads offline events email array issue ([#1979](https://github.com/rudderlabs/rudder-transformer/issues/1979)) ([3c7f4ac](https://github.com/rudderlabs/rudder-transformer/commit/3c7f4ac60ec564198f0bf0524a0780dfc581140a)) ## [1.17.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.16.2...v1.17.0) (2023-03-21) diff --git a/package-lock.json b/package-lock.json index 12a693f85d..acb29f1039 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.21.0", + "version": "1.22.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cd8311e885..0fe1adedfc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.21.0", + "version": "1.22.0", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { diff --git a/src/v0/destinations/clevertap/config.js b/src/v0/destinations/clevertap/config.js index 624010b488..25ece35537 100644 --- a/src/v0/destinations/clevertap/config.js +++ b/src/v0/destinations/clevertap/config.js @@ -40,6 +40,7 @@ const CLEVERTAP_DEFAULT_EXCLUSION = [ 'userId', 'id', 'ts', + 'overrideFields', ]; // ref : https://developer.clevertap.com/docs/disassociate-api const DEL_MAX_BATCH_SIZE = 100; diff --git a/src/v0/destinations/clevertap/transform.js b/src/v0/destinations/clevertap/transform.js index 073380581e..3594f4c68b 100644 --- a/src/v0/destinations/clevertap/transform.js +++ b/src/v0/destinations/clevertap/transform.js @@ -79,7 +79,7 @@ const responseWrapper = (payload, destination) => { * @returns * return the final payload after converting to the relevant data-types. */ -const convertObjectAndArrayToString = (payload) => { +const convertObjectAndArrayToString = (payload, event) => { const finalPayload = {}; if (payload) { Object.keys(payload).forEach((key) => { @@ -89,6 +89,15 @@ const convertObjectAndArrayToString = (payload) => { finalPayload[key] = payload[key]; } }); + if (event === 'Charged' && finalPayload.Items) { + finalPayload.Items = JSON.parse(finalPayload.Items); + if ( + !Array.isArray(finalPayload.Items) || + (Array.isArray(finalPayload.Items) && typeof finalPayload.Items[0] !== 'object') + ) { + throw new InstrumentationError('Products property value must be an array of objects'); + } + } } return finalPayload; }; @@ -208,6 +217,14 @@ const getClevertapProfile = (message, category) => { CLEVERTAP_DEFAULT_EXCLUSION, ); profile = convertObjectAndArrayToString(profile); + + // Add additional properties being passed inside overrideFields in traits + // to be added to the profile object, to be sent into Clevertap profileData + if (message.traits?.overrideFields) { + const { overrideFields } = message.traits; + Object.assign(profile, overrideFields); + } + return removeUndefinedAndNullValues(profile); }; @@ -292,7 +309,10 @@ const responseBuilderSimple = (message, category, destination) => { eventPayload.type = 'event'; // stringify the evtData if it's an Object or array. if (eventPayload.evtData) { - eventPayload.evtData = convertObjectAndArrayToString(eventPayload.evtData); + eventPayload.evtData = convertObjectAndArrayToString( + eventPayload.evtData, + eventPayload.evtName, + ); } // setting identification for tracking payload here based on destination config diff --git a/src/v0/destinations/fb_custom_audience/transform.js b/src/v0/destinations/fb_custom_audience/transform.js index 4f2bf077a3..46e832ff8a 100644 --- a/src/v0/destinations/fb_custom_audience/transform.js +++ b/src/v0/destinations/fb_custom_audience/transform.js @@ -7,12 +7,10 @@ const { defaultDeleteRequestConfig, checkSubsetOfArray, isDefinedAndNotNullAndNotEmpty, - getSuccessRespEvents, - getErrorRespEvents, returnArrayOfSubarrays, isDefinedAndNotNull, flattenMap, - handleRtTfSingleEventError, + simpleProcessRouterDest, getDestinationExternalIDInfoForRetl, } = require('../../util'); @@ -371,26 +369,8 @@ const processEvent = (message, destination) => { const process = (event) => processEvent(event.message, event.destination); -const processRouterDest = (inputs, reqMetadata) => { - if (!Array.isArray(inputs) || inputs.length <= 0) { - const respEvents = getErrorRespEvents(null, 400, 'Invalid event array'); - return [respEvents]; - } - const respList = inputs.map((input) => { - try { - if (input.message.statusCode) { - // already transformed event - return getSuccessRespEvents(input.message, [input.metadata], input.destination); - } - const transformedList = process(input); - const responseList = transformedList.map((transformedPayload) => - getSuccessRespEvents(transformedPayload, [input.metadata], input.destination), - ); - return responseList; - } catch (error) { - return handleRtTfSingleEventError(input, error, reqMetadata); - } - }); +const processRouterDest = async (inputs, reqMetadata) => { + const respList = await simpleProcessRouterDest(inputs, process, reqMetadata); return flattenMap(respList); }; diff --git a/src/v0/destinations/google_adwords_offline_conversions/config.js b/src/v0/destinations/google_adwords_offline_conversions/config.js index bfb5fa0326..0f321f06a6 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/config.js +++ b/src/v0/destinations/google_adwords_offline_conversions/config.js @@ -13,6 +13,7 @@ const CALL_CONVERSION = `${BASE_ENDPOINT}:uploadCallConversions`; // Ref - https://developers.google.com/google-ads/api/rest/reference/rest/v11/customers.googleAds/searchStream const SEARCH_STREAM = `${BASE_ENDPOINT}/googleAds:searchStream`; +const STORE_CONVERSION_CONFIG = `${BASE_ENDPOINT}/offlineUserDataJobs`; const CONFIG_CATEGORIES = { TRACK_CLICK_CONVERSIONS_CONFIG: { name: 'TrackClickConversionsConfig', @@ -20,6 +21,15 @@ const CONFIG_CATEGORIES = { TRACK_CALL_CONVERSIONS_CONFIG: { name: 'TrackCallConversionsConfig', }, + TRACK_STORE_CONVERSION_CONFIG_CREATE_JOB: { + name: 'TrackCreateJobStoreConversionsConfig', + }, + TRACK_STORE_CONVERSION_CONFIG_ADD_CONVERSION: { + name: 'TrackAddStoreConversionsConfig', + }, + TRACK_STORE_ADDRESS_IDENTIFIER: { + name: 'storeAddoperationAddressMap' + } }; const CONVERSION_ACTION_ID_CACHE_TTL = process.env.CONVERSION_ACTION_ID_CACHE_TTL @@ -41,4 +51,12 @@ module.exports = { SEARCH_STREAM, CONVERSION_ACTION_ID_CACHE_TTL, CONVERSION_CUSTOM_VARIABLE_CACHE_TTL, + STORE_CONVERSION_CONFIG, + trackCreateStoreConversionsMapping: + MAPPING_CONFIG[CONFIG_CATEGORIES.TRACK_STORE_CONVERSION_CONFIG_CREATE_JOB.name], + trackAddStoreConversionsMapping: + MAPPING_CONFIG[CONFIG_CATEGORIES.TRACK_STORE_CONVERSION_CONFIG_ADD_CONVERSION.name], + trackAddStoreAddressConversionsMapping: + MAPPING_CONFIG[CONFIG_CATEGORIES.TRACK_STORE_ADDRESS_IDENTIFIER.name], + }; diff --git a/src/v0/destinations/google_adwords_offline_conversions/data/TrackAddStoreConversionsConfig.json b/src/v0/destinations/google_adwords_offline_conversions/data/TrackAddStoreConversionsConfig.json new file mode 100644 index 0000000000..0c65850b68 --- /dev/null +++ b/src/v0/destinations/google_adwords_offline_conversions/data/TrackAddStoreConversionsConfig.json @@ -0,0 +1,56 @@ +[ + { + "destKey": "operations.create.transaction_attribute.store_attribute.store_code", + "sourceKeys": [ + "properties.store_code", + "properties.storeCode" + ], + "required": false, + "metadata": { + "type": "toString" + } + }, + { + "destKey": "operations.create.transaction_attribute.transaction_amount_micros", + "sourceKeys": [ + "properties.conversionValue", + "properties.total", + "properties.value", + "properties.revenue" + ], + "required": true, + "metadata": { + "type": "toNumber" + } + }, + { + "destKey": "operations.create.transaction_attribute.order_id", + "sourceKeys": [ + "properties.order_id", + "properties.orderId" + ], + "required": false, + "metadata": { + "type": "toString" + } + }, + { + "destKey": "operations.create.transaction_attribute.currency_code", + "sourceKeys": "properties.currency", + "required": true, + "metadata": { + "type": "toString" + } + }, + { + "destKey": "operations.create.transaction_attribute.transaction_date_time", + "sourceKeys": [ + "properties.transaction_date_time", + "originalTimestamp" + ], + "required": true, + "metadata": { + "type": "toString" + } + } +] \ No newline at end of file diff --git a/src/v0/destinations/google_adwords_offline_conversions/data/TrackCreateJobStoreConversionsConfig.json b/src/v0/destinations/google_adwords_offline_conversions/data/TrackCreateJobStoreConversionsConfig.json new file mode 100644 index 0000000000..87b78c9303 --- /dev/null +++ b/src/v0/destinations/google_adwords_offline_conversions/data/TrackCreateJobStoreConversionsConfig.json @@ -0,0 +1,24 @@ +[ + { + "destKey": "enable_match_rate_range_preview", + "sourceKeys": "properties.enable_match_rate_range_preview", + "required": false + }, + { + "destKey": "job.storeSalesMetadata.loyaltyFraction", + "sourceKeys": "properties.loyaltyFraction", + "required": false, + "defaultValue":"1" + }, + { + "destKey": "job.storeSalesMetadata.transaction_upload_fraction", + "sourceKeys": "properties.transaction_upload_fraction", + "required": false, + "defaultValue":"1" + }, + { + "destKey": "job.storeSalesMetadata.custom_key", + "sourceKeys": "properties.custom_key", + "required": false + } +] \ No newline at end of file diff --git a/src/v0/destinations/google_adwords_offline_conversions/data/storeAddoperationAddressMap.json b/src/v0/destinations/google_adwords_offline_conversions/data/storeAddoperationAddressMap.json new file mode 100644 index 0000000000..0822d9f9c8 --- /dev/null +++ b/src/v0/destinations/google_adwords_offline_conversions/data/storeAddoperationAddressMap.json @@ -0,0 +1,66 @@ +[ + { + "sourceKeys": "city", + "destKey": "city", + "sourceFromGenericMap": true + }, + { + "sourceKeys": "state", + "destKey": "state", + "sourceFromGenericMap": true + }, + { + "sourceKeys": [ + "context.traits.country_code", + "properties.country_code", + "context.traits.countryCode", + "properties.countryCode" + ], + "destKey": "country_code" + }, + { + "sourceKeys": [ + "context.traits.postal_code", + "properties.postal_code", + "context.traits.postalCode", + "properties.postalCode", + "context.traits.zipCode", + "properties.zipCode" + ], + "destKey": "postal_code" + }, + { + "sourceKeys": "firstName", + "destKey": "hashed_first_name", + "sourceFromGenericMap": true, + "metadata": { + "type": [ + "toLower" + ] + } + }, + { + "destKey": "hashed_street_address", + "sourceKeys": [ + "properties.streetAddress", + "context.traits.streetAddress", + "traits.street", + "context.traits.street" + ], + "metadata": { + "type": [ + "toLower" + ] + } + }, + { + "sourceKeys": "lastName", + "destKey": "hashed_last_name", + "metadata": { + "type": [ + "toLower" + ] + }, + "sourceFromGenericMap": true + } +] \ No newline at end of file diff --git a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js index 3e252ae1c3..55947de6be 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js @@ -3,7 +3,11 @@ const get = require('get-value'); const sha256 = require('sha256'); const { prepareProxyRequest, httpSend, httpPOST } = require('../../../adapters/network'); const { REFRESH_TOKEN } = require('../../../adapters/networkhandler/authConstants'); -const { isHttpStatusSuccess, getHashFromArray, isDefinedAndNotNullAndNotEmpty } = require('../../util'); +const { + isHttpStatusSuccess, + getHashFromArray, + isDefinedAndNotNullAndNotEmpty, +} = require('../../util'); const { getConversionActionId } = require('./utils'); const Cache = require('../../util/cache'); const { CONVERSION_CUSTOM_VARIABLE_CACHE_TTL, SEARCH_STREAM } = require('./config'); @@ -37,6 +41,43 @@ const getAuthErrCategory = (status) => { } }; +const createJob = async (endpoint, headers, payload) => { + const endPoint = `${endpoint}:create` + let createJobResponse = await httpPOST(endPoint, payload, { headers }); + createJobResponse = processAxiosResponse(createJobResponse); + const { response, status } = createJobResponse; + if (!isHttpStatusSuccess(status)) { + throw new AbortedError( + `[Google Ads Offline Conversions]:: ${response?.error?.message} during google_ads_offline_store_conversions Job Creation`, + status, + response, + getAuthErrCategory(status), + ); + } + return response.resourceName.split('/')[3]; +}; + +const addConversionToJob = async (endpoint, headers, jobId, payload) => { + const endPoint = `${endpoint}/${jobId}:addOperations` + let addConversionToJobResponse = await httpPOST(endPoint, payload, { headers }); + addConversionToJobResponse = processAxiosResponse(addConversionToJobResponse); + if (!isHttpStatusSuccess(addConversionToJobResponse.status)) { + throw new AbortedError( + `[Google Ads Offline Conversions]:: ${addConversionToJobResponse.response?.error?.message} during google_ads_offline_store_conversions Add Conversion`, + addConversionToJobResponse.status, + addConversionToJobResponse.response, + getAuthErrCategory(get(addConversionToJobResponse, 'status')), + ); + } + return true; +} + +const runTheJob = async (endpoint, headers, payload, jobId) => { + const endPoint = `${endpoint}/${jobId}:run`; + const executeJobResponse = await httpPOST(endPoint, payload, { headers }); + return executeJobResponse; +} + /** * get all the custom variable for a customerID i.e created * in Google Ads using searchStream endpoint @@ -116,11 +157,24 @@ const getConversionCustomVariableHashMap = (arrays) => { const ProxyRequest = async (request) => { const { method, endpoint, headers, params, body } = request; + if (body.JSON?.isStoreConversion) { + const firstResponse = await createJob(endpoint, headers, body.JSON.createJobPayload); + const addPayload = body.JSON.addConversionPayload; + // Mapping Conversion Action + const conversionId = await getConversionActionId(headers, params); + set(addPayload, 'operations.create.transaction_attribute.conversion_action', conversionId) + await addConversionToJob(endpoint, headers, firstResponse, addPayload); + // console.log(JSON.stringify(secondResponse.response.response)); + const thirdResponse = await runTheJob(endpoint, headers, body.JSON.executeJobPayload, firstResponse); + return thirdResponse; + } // fetch conversionAction // httpPOST -> axios.post() - const conversionActionId = await getConversionActionId(headers, params); - set(body.JSON, 'conversions.0.conversionAction', conversionActionId); - + if (params?.event) { + const conversionActionId = await getConversionActionId(headers, params); + set(body.JSON, 'conversions.0.conversionAction', conversionActionId); + } + // customVariables would be undefined in case of Store Conversions if (isDefinedAndNotNullAndNotEmpty(params.customVariables)) { // fetch all conversion custom variable in google ads let conversionCustomVariable = await getConversionCustomVariable(headers, params); diff --git a/src/v0/destinations/google_adwords_offline_conversions/transform.js b/src/v0/destinations/google_adwords_offline_conversions/transform.js index e998321429..9479f159ad 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/transform.js +++ b/src/v0/destinations/google_adwords_offline_conversions/transform.js @@ -1,28 +1,23 @@ -const sha256 = require('sha256'); -const { get, set, cloneDeep } = require('lodash'); +const { set } = require('lodash'); const moment = require('moment'); const { EventType } = require('../../../constants'); const { getHashFromArrayWithDuplicate, constructPayload, removeHyphens, - defaultRequestConfig, - defaultPostRequestConfig, simpleProcessRouterDest, getHashFromArray, - getFieldValueFromMessage, } = require('../../util'); - const { - CLICK_CONVERSION, CALL_CONVERSION, - trackClickConversionsMapping, trackCallConversionsMapping, + STORE_CONVERSION_CONFIG } = require('./config'); const { validateDestinationConfig, - getAccessToken, - removeHashToSha256TypeFromMappingJson, + getStoreConversionPayload, + requestBuilder, + getClickConversionPayloadAndEndpoint } = require('./utils'); const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); @@ -37,132 +32,41 @@ const { InstrumentationError, ConfigurationError } = require('../../util/errorTy * @returns */ const getConversions = (message, metadata, { Config }, event, conversionType) => { - let payload; + let payload = {}; let endpoint; - const filteredCustomerId = removeHyphens(Config.customerId); - const { - hashUserIdentifier, - defaultUserIdentifier, - UserIdentifierSource, - conversionEnvironment, - customVariables, - subAccount, - loginCustomerId, - } = Config; + const { customerId } = Config; const { properties, originalTimestamp } = message; + const filteredCustomerId = removeHyphens(customerId); if (conversionType === 'click') { - // click conversions - let updatedClickMapping = cloneDeep(trackClickConversionsMapping); - - if (hashUserIdentifier === false) { - updatedClickMapping = removeHashToSha256TypeFromMappingJson(updatedClickMapping); - } - - payload = constructPayload(message, updatedClickMapping); - - // either of email or phone should be passed - // defaultUserIdentifier depends on the webapp configuration - // Ref - https://developers.google.com/google-ads/api/rest/reference/rest/v11/customers/uploadClickConversions#ClickConversion - - let email; - let phone; - if (defaultUserIdentifier === 'email') { - email = getFieldValueFromMessage(message, 'email'); - if (email) { - email = hashUserIdentifier ? sha256(email).toString() : email; - set(payload, 'conversions[0].userIdentifiers[0].hashedEmail', email); - } - } else { - phone = getFieldValueFromMessage(message, 'phone'); - if (phone) { - phone = hashUserIdentifier ? sha256(phone).toString() : phone; - set(payload, 'conversions[0].userIdentifiers[0].hashedPhoneNumber', phone); - } - } - - endpoint = CLICK_CONVERSION.replace(':customerId', filteredCustomerId); - - const products = get(message, 'properties.products'); - const itemList = []; - if (products && products.length > 0 && Array.isArray(products)) { - // products is a list of items - products.forEach((product) => { - if (Object.keys(product).length > 0) { - itemList.push({ - productId: product.product_id, - quantity: parseInt(product.quantity, 10), - unitPrice: Number(product.price), - }); - } - }); - - set(payload, 'conversions[0].cartData.items', itemList); - } - - // userIdentifierSource - // if userIdentifierSource doesn't exist in properties - // then it is taken from the webapp config - if (!properties.userIdentifierSource && UserIdentifierSource !== 'none') { - set(payload, 'conversions[0].userIdentifiers[0].userIdentifierSource', UserIdentifierSource); - - // one of email or phone must be provided - if (!email && !phone) { - throw new InstrumentationError(`Either of email or phone is required for user identifier`); - } - } - - // conversionEnvironment - // if conversionEnvironment doesn't exist in properties - // then it is taken from the webapp config - if (!properties.conversionEnvironment && conversionEnvironment !== 'none') { - set(payload, 'conversions[0].conversionEnvironment', conversionEnvironment); - } + // click conversion + const convertedPayload = getClickConversionPayloadAndEndpoint(message, Config, filteredCustomerId); + payload = convertedPayload.payload; + endpoint = convertedPayload.endpoint + } else if (conversionType === 'store') { + payload = getStoreConversionPayload(message, Config, filteredCustomerId); + endpoint = STORE_CONVERSION_CONFIG.replace(':customerId', filteredCustomerId); } else { // call conversions - payload = constructPayload(message, trackCallConversionsMapping); endpoint = CALL_CONVERSION.replace(':customerId', filteredCustomerId); } - // transform originalTimestamp to conversionDateTime format (yyyy-mm-dd hh:mm:ss+|-hh:mm) - // e.g 2019-10-14T11:15:18.299Z -> 2019-10-14 16:10:29+0530 - if (!properties.conversionDateTime && originalTimestamp) { - const timestamp = originalTimestamp; - const conversionDateTime = moment(timestamp) - .utcOffset(moment(timestamp).utcOffset()) - .format('YYYY-MM-DD HH:mm:ssZ'); - set(payload, 'conversions[0].conversionDateTime', conversionDateTime); - } + if (conversionType !== 'store') { - payload.partialFailure = true; - - const response = defaultRequestConfig(); - response.method = defaultPostRequestConfig.requestMethod; - response.endpoint = endpoint; - response.params = { - event, - customerId: filteredCustomerId, - customVariables, - properties, - }; - response.body.JSON = payload; - response.headers = { - Authorization: `Bearer ${getAccessToken(metadata)}`, - 'Content-Type': 'application/json', - 'developer-token': get(metadata, 'secret.developer_token'), - }; - - if (subAccount) { - if (loginCustomerId) { - const filteredLoginCustomerId = removeHyphens(loginCustomerId); - response.headers['login-customer-id'] = filteredLoginCustomerId; - } else { - throw new ConfigurationError(`loginCustomerId is required as subAccount is enabled`); + // transform originalTimestamp to conversionDateTime format (yyyy-mm-dd hh:mm:ss+|-hh:mm) + // e.g 2019-10-14T11:15:18.299Z -> 2019-10-14 16:10:29+0530 + if (!properties.conversionDateTime && originalTimestamp) { + const timestamp = originalTimestamp; + const conversionDateTime = moment(timestamp) + .utcOffset(moment(timestamp).utcOffset()) + .format('YYYY-MM-DD HH:mm:ssZ'); + set(payload, 'conversions[0].conversionDateTime', conversionDateTime); } + payload.partialFailure = true; } + return requestBuilder(payload, endpoint, Config, metadata, event, filteredCustomerId, properties); - return response; }; /** @@ -192,8 +96,8 @@ const trackResponseBuilder = (message, metadata, destination) => { if (!eventsToConversionsNamesMapping[event] || !eventsToOfflineConversionsTypeMapping[event]) { throw new ConfigurationError(`Event name '${event}' is not valid`); } - - eventsToOfflineConversionsTypeMapping[event].forEach((conversionType) => { + const conversionTypes = Array.from(eventsToOfflineConversionsTypeMapping[event]); + conversionTypes.forEach(conversionType => { responseList.push( getConversions( message, @@ -204,7 +108,6 @@ const trackResponseBuilder = (message, metadata, destination) => { ), ); }); - return responseList; }; diff --git a/src/v0/destinations/google_adwords_offline_conversions/utils.js b/src/v0/destinations/google_adwords_offline_conversions/utils.js index 69a0e6bfd3..18928e0a53 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/utils.js +++ b/src/v0/destinations/google_adwords_offline_conversions/utils.js @@ -1,12 +1,28 @@ const sha256 = require('sha256'); -const get = require('get-value'); +const { get, set, cloneDeep } = require('lodash'); +const moment = require('moment'); const { httpPOST } = require('../../../adapters/network'); -const { isHttpStatusSuccess } = require('../../util'); +const { + isHttpStatusSuccess, + constructPayload, + defaultRequestConfig, + defaultPostRequestConfig, + removeHyphens, + getFieldValueFromMessage +} = require('../../util'); const { REFRESH_TOKEN } = require('../../../adapters/networkhandler/authConstants'); -const { SEARCH_STREAM, CONVERSION_ACTION_ID_CACHE_TTL } = require('./config'); +const { + SEARCH_STREAM, + CONVERSION_ACTION_ID_CACHE_TTL, + trackCreateStoreConversionsMapping, + trackAddStoreConversionsMapping, + trackAddStoreAddressConversionsMapping, + trackClickConversionsMapping, + CLICK_CONVERSION +} = require('./config'); const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); const Cache = require('../../util/cache'); -const { AbortedError, OAuthSecretError, ConfigurationError } = require('../../util/errorTypes'); +const { AbortedError, OAuthSecretError, ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const conversionActionIdCache = new Cache(CONVERSION_ACTION_ID_CACHE_TTL); @@ -106,10 +122,228 @@ const removeHashToSha256TypeFromMappingJson = (mapping) => { }); return newMapping; }; +/** + * To construct the address object according to the google ads documentation + * @param {*} message + */ +const buildAndGetAddress = (message, hashUserIdentifier) => { + const address = constructPayload(message, trackAddStoreAddressConversionsMapping); + if(address.hashed_last_name){ + address.hashed_last_name = hashUserIdentifier? sha256(address.hashed_last_name).toString(): address.hashed_last_name; + } + if(address.hashed_first_name){ + address.hashed_first_name = hashUserIdentifier? sha256(address.hashed_first_name).toString(): address.hashed_first_name; + } + if(address.hashed_street_address){ + address.hashed_street_address = hashUserIdentifier? sha256(address.hashed_street_address).toString(): address.hashed_street_address; + } + return Object.keys(address).length > 0 ? address : null; +}; + +// It builds request according to transformer server contract +const requestBuilder = ( + payload, + endpoint, + Config, + metadata, + event, + filteredCustomerId, + properties +) => { + const { customVariables, subAccount, loginCustomerId } = Config; + const response = defaultRequestConfig(); + response.method = defaultPostRequestConfig.requestMethod; + response.endpoint = endpoint; + response.params = { + event, + customerId: filteredCustomerId + }; + if (!payload?.isStoreConversion) { + response.params.customVariables = customVariables; + response.params.properties = properties; + } + response.body.JSON = payload; + response.headers = { + Authorization: `Bearer ${getAccessToken(metadata)}`, + 'Content-Type': 'application/json', + 'developer-token': get(metadata, 'secret.developer_token'), + }; + + if (subAccount) { + if (loginCustomerId) { + const filteredLoginCustomerId = removeHyphens(loginCustomerId); + response.headers['login-customer-id'] = filteredLoginCustomerId; + } else { + throw new ConfigurationError(`loginCustomerId is required as subAccount is enabled`); + } + } + return response; +}; +/** + * This function creates a offlineUserDataJob Payload + * and returns the payload + */ +const getCreateJobPayload = message => { + const payload = constructPayload(message, trackCreateStoreConversionsMapping); + set(payload, "job.type", 'STORE_SALES_UPLOAD_FIRST_PARTY'); + if (!payload.job?.storeSalesMetadata?.loyaltyFraction) { + set(payload, "job.storeSalesMetadata.loyaltyFraction", '1'); + } + if (!payload.job?.storeSalesMetadata?.transaction_upload_fraction) { + set(payload, "job.storeSalesMetadata.transaction_upload_fraction", '1'); + } + return payload; +}; + +/** + * This Function create the add conversion payload + * and returns the payload + */ +const getAddConversionPayload = (message, Config) => { + const { properties } = message; + const { validateOnly, hashUserIdentifier, + defaultUserIdentifier } = Config; + const payload = constructPayload(message, trackAddStoreConversionsMapping); + payload.enable_partial_failure = false; + payload.enable_warnings = false; + payload.validate_only = validateOnly || false; + + // transform originalTimestamp to format (yyyy-mm-dd hh:mm:ss+|-hh:mm) + // e.g 2019-10-14T11:15:18.299Z -> 2019-10-14 16:10:29+0530 + const timestamp = payload.operations.create.transaction_attribute.transaction_date_time; + const convertedDateTime = moment(timestamp) + .utcOffset(moment(timestamp).utcOffset()) + .format('YYYY-MM-DD HH:mm:ssZ'); + payload.operations.create.transaction_attribute.transaction_date_time = convertedDateTime; + // mapping custom_key that should be predefined in google Ui and mentioned when new job is created + if (properties.custom_key && properties[properties.custom_key]) { + payload.operations.create.transaction_attribute[properties.custom_key] = properties[properties.custom_key]; + } + // Converting transaction Cost to micro as mentioned here : https://developers.google.com/google-ads/api/reference/rpc/v13/TransactionAttribute#:~:text=30%2B03%3A00%22-,transaction_amount_micros,-double + payload.operations.create.transaction_attribute.transaction_amount_micros = `${payload.operations.create.transaction_attribute.transaction_amount_micros * 1000000}`; + // userIdentifierSource + // if userIdentifierSource doesn't exist in properties + // then it is taken from the webapp config + let email = getFieldValueFromMessage(message, 'email'); + let phone = getFieldValueFromMessage(message, 'phone'); + const address = buildAndGetAddress(message, hashUserIdentifier); + if (defaultUserIdentifier === 'email' && email) { + email = hashUserIdentifier ? sha256(email).toString() : email; + set(payload, 'operations.create.userIdentifiers[0].hashedEmail', email); + } else if (defaultUserIdentifier === 'phone' && phone) { + phone = hashUserIdentifier ? sha256(phone).toString(): phone; + set(payload, 'operations.create.userIdentifiers[0].hashedPhoneNumber', phone); + } else if (address) { + // priortizing address in case defaultUserIdentifier is not present + set(payload, 'operations.create.userIdentifiers[0].address_info', address); + } else if (email) { + // case when default choosen value is not present + email = hashUserIdentifier ? sha256(email).toString() : email; + set(payload, 'operations.create.userIdentifiers[0].hashedEmail', email); + } else if (phone) { + phone = hashUserIdentifier ? sha256(phone).toString(): phone; + set(payload, 'operations.create.userIdentifiers[0].hashedPhoneNumber', phone); + } else { + set(payload, 'operations.create.userIdentifiers[0]', {}); // if no user identifier is present + } + return payload; +}; + +const getStoreConversionPayload = (message, Config, event) => { + const { validateOnly } = Config; + const payload = {}; + payload.event = event; + payload.isStoreConversion = true; + payload.createJobPayload = getCreateJobPayload(message); + payload.addConversionPayload = getAddConversionPayload(message, Config); + payload.executeJobPayload = { validate_only: validateOnly } + return payload; +} + +const getClickConversionPayloadAndEndpoint = (message, Config, filteredCustomerId) => { + let email = getFieldValueFromMessage(message, 'email'); + let phone = getFieldValueFromMessage(message, 'phone'); + const { + hashUserIdentifier, + defaultUserIdentifier, + UserIdentifierSource, + conversionEnvironment + } = Config; + const { properties } = message; + // click conversions + let updatedClickMapping = cloneDeep(trackClickConversionsMapping); + + if (hashUserIdentifier === false) { + updatedClickMapping = removeHashToSha256TypeFromMappingJson(updatedClickMapping); + } + + const payload = constructPayload(message, updatedClickMapping); + + + const endpoint = CLICK_CONVERSION.replace(':customerId', filteredCustomerId); + + const products = get(message, 'properties.products'); + const itemList = []; + if (products && products.length > 0 && Array.isArray(products)) { + // products is a list of items + products.forEach((product) => { + if (Object.keys(product).length > 0) { + itemList.push({ + productId: product.product_id, + quantity: parseInt(product.quantity, 10), + unitPrice: Number(product.price), + }); + } + }); + + set(payload, 'conversions[0].cartData.items', itemList); + } + + // userIdentifierSource + // if userIdentifierSource doesn't exist in properties + // then it is taken from the webapp config + if (!properties.userIdentifierSource && UserIdentifierSource !== 'none') { + set(payload, 'conversions[0].userIdentifiers[0].userIdentifierSource', UserIdentifierSource); + + // one of email or phone must be provided + if (!email && !phone) { + throw new InstrumentationError(`Either of email or phone is required for user identifier`); + } + } + // either of email or phone should be passed + // defaultUserIdentifier depends on the webapp configuration + // Ref - https://developers.google.com/google-ads/api/rest/reference/rest/v11/customers/uploadClickConversions#ClickConversion + if (defaultUserIdentifier === 'email' && email) { + email = hashUserIdentifier ? sha256(email).toString() : email; + set(payload, 'conversions[0].userIdentifiers[0].hashedEmail', email); + } else if (defaultUserIdentifier === 'phone' && phone) { + phone = hashUserIdentifier ? sha256(phone).toString() : phone; + set(payload, 'conversions[0].userIdentifiers[0].hashedPhoneNumber', phone); + } else if (email) { + // case when default choosen value is not present + email = hashUserIdentifier ? sha256(email).toString() : email; + set(payload, 'conversions[0].userIdentifiers[0].hashedEmail', email); + } else if (phone) { + phone = hashUserIdentifier ? sha256(phone).toString() : phone; + set(payload, 'conversions[0].userIdentifiers[0].hashedPhoneNumber', phone); + } + + // conversionEnvironment + // if conversionEnvironment doesn't exist in properties + // then it is taken from the webapp config + if (!properties.conversionEnvironment && conversionEnvironment !== 'none') { + set(payload, 'conversions[0].conversionEnvironment', conversionEnvironment); + } + return { payload, endpoint }; +} module.exports = { validateDestinationConfig, getAccessToken, getConversionActionId, removeHashToSha256TypeFromMappingJson, -}; + getStoreConversionPayload, + requestBuilder, + buildAndGetAddress, + getClickConversionPayloadAndEndpoint +}; \ No newline at end of file diff --git a/src/v0/destinations/iterable/transform.js b/src/v0/destinations/iterable/transform.js index 2925fd7b99..be5a7fbf21 100644 --- a/src/v0/destinations/iterable/transform.js +++ b/src/v0/destinations/iterable/transform.js @@ -422,30 +422,33 @@ function getEventChunks(event, identifyEventChunks, trackEventChunks, eventRespo event.message.operation === 'catalogs' ) { identifyEventChunks.push(event); - } else if (event.message.endpoint.includes('api/events/track')) { + } else if (event.message?.endpoint?.includes('api/events/track')) { // Checking if it is track type of event trackEventChunks.push(event); } else { // any other type of event const { message, metadata, destination } = event; const endpoint = get(message, 'endpoint'); + if (Array.isArray(message)) { + eventResponseList.push(getSuccessRespEvents(message, metadata, destination)); + } else { + const batchedResponse = defaultBatchRequestConfig(); + batchedResponse.batchedRequest.headers = message.headers; + batchedResponse.batchedRequest.endpoint = endpoint; + batchedResponse.batchedRequest.body = message.body; + batchedResponse.batchedRequest.params = message.params; + batchedResponse.batchedRequest.method = defaultPostRequestConfig.requestMethod; + batchedResponse.metadata = [metadata]; + batchedResponse.destination = destination; - const batchedResponse = defaultBatchRequestConfig(); - batchedResponse.batchedRequest.headers = message.headers; - batchedResponse.batchedRequest.endpoint = endpoint; - batchedResponse.batchedRequest.body = message.body; - batchedResponse.batchedRequest.params = message.params; - batchedResponse.batchedRequest.method = defaultPostRequestConfig.requestMethod; - batchedResponse.metadata = [metadata]; - batchedResponse.destination = destination; - - eventResponseList.push( - getSuccessRespEvents( - batchedResponse.batchedRequest, - batchedResponse.metadata, - batchedResponse.destination, - ), - ); + eventResponseList.push( + getSuccessRespEvents( + batchedResponse.batchedRequest, + batchedResponse.metadata, + batchedResponse.destination, + ), + ); + } } } diff --git a/src/v0/destinations/snapchat_conversion/transform.js b/src/v0/destinations/snapchat_conversion/transform.js index b48ab492f2..94b87b1d1c 100644 --- a/src/v0/destinations/snapchat_conversion/transform.js +++ b/src/v0/destinations/snapchat_conversion/transform.js @@ -14,6 +14,7 @@ const { getValidDynamicFormConfig, checkInvalidRtTfEvents, handleRtTfSingleEventError, + batchMultiplexedEvents, } = require('../../util'); const { ENDPOINT, @@ -288,32 +289,6 @@ function process(event) { return response; } -function batchEvents(eventsChunk) { - const batchedResponseList = []; - - // arrayChunks = [[e1,e2,e3,..batchSize],[e1,e2,e3,..batchSize]..] - const arrayChunks = _.chunk(eventsChunk, MAX_BATCH_SIZE); - - arrayChunks.forEach((chunk) => { - const batchEventResponse = generateBatchedPayloadForArray(chunk); - batchedResponseList.push( - getSuccessRespEvents( - batchEventResponse.batchedRequest, - batchEventResponse.metadata, - batchEventResponse.destination, - true, - ), - ); - }); - - return batchedResponseList; -} - -function getEventChunks(event, eventsChunk) { - // build eventsChunk of MAX_BATCH_SIZE - eventsChunk.push(event); -} - const processRouterDest = async (inputs, reqMetadata) => { const errorRespEvents = checkInvalidRtTfEvents(inputs); if (errorRespEvents.length > 0) { @@ -324,35 +299,34 @@ const processRouterDest = async (inputs, reqMetadata) => { const errorRespList = []; inputs.forEach((event) => { try { - if (event.message.statusCode) { + let resp = event.message; + if (!event.message.statusCode) { // already transformed event - getEventChunks(event, eventsChunk); - } else { - // if not transformed - let response = process(event); - response = Array.isArray(response) ? response : [response]; - response.forEach((res) => { - getEventChunks( - { - message: res, - metadata: event.metadata, - destination: event.destination, - }, - eventsChunk, - ); - }); + resp = process(event); } + eventsChunk.push({ + message: Array.isArray(resp) ? resp : [resp], + metadata: event.metadata, + destination: event.destination, + }); } catch (error) { const errRespEvent = handleRtTfSingleEventError(event, error, reqMetadata); errorRespList.push(errRespEvent); } }); - let batchedResponseList = []; + const batchResponseList = []; if (eventsChunk.length > 0) { - batchedResponseList = batchEvents(eventsChunk); + const batchedEvents = batchMultiplexedEvents(eventsChunk, MAX_BATCH_SIZE); + batchedEvents.forEach((batch) => { + const batchedRequest = generateBatchedPayloadForArray(batch.events, batch.destination); + batchResponseList.push( + getSuccessRespEvents(batchedRequest, batch.metadata, batch.destination, true), + ); + }); } - return [...batchedResponseList, ...errorRespList]; + + return [...batchResponseList, ...errorRespList]; }; module.exports = { process, processRouterDest }; diff --git a/src/v0/destinations/snapchat_conversion/util.js b/src/v0/destinations/snapchat_conversion/util.js index 99df37b673..d39b0253a5 100644 --- a/src/v0/destinations/snapchat_conversion/util.js +++ b/src/v0/destinations/snapchat_conversion/util.js @@ -112,39 +112,31 @@ function getPriceSum(message) { * @param {*} events * @returns */ -function generateBatchedPayloadForArray(events) { +function generateBatchedPayloadForArray(events, destination) { const batchResponseList = []; - const metadata = []; // extracting destination // from the first event in a batch - const { destination } = events[0]; const { apiKey } = destination.Config; - let batchEventResponse = defaultBatchRequestConfig(); + const { batchedRequest } = defaultBatchRequestConfig(); // Batch event into dest batch structure events.forEach((ev) => { - batchResponseList.push(ev.message.body.JSON); - metadata.push(ev.metadata); + batchResponseList.push(ev.body.JSON); }); - batchEventResponse.batchedRequest.body.JSON_ARRAY = { + batchedRequest.body.JSON_ARRAY = { batch: JSON.stringify(batchResponseList), }; - batchEventResponse.batchedRequest.endpoint = ENDPOINT; - batchEventResponse.batchedRequest.headers = { + batchedRequest.endpoint = ENDPOINT; + batchedRequest.headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${apiKey}`, }; - batchEventResponse = { - ...batchEventResponse, - metadata, - destination, - }; - return batchEventResponse; + return batchedRequest; } module.exports = { diff --git a/src/v0/destinations/tiktok_ads/transform.js b/src/v0/destinations/tiktok_ads/transform.js index 3fcb58cb77..77f2f8103f 100644 --- a/src/v0/destinations/tiktok_ads/transform.js +++ b/src/v0/destinations/tiktok_ads/transform.js @@ -17,6 +17,7 @@ const { getHashFromArrayWithDuplicate, checkInvalidRtTfEvents, handleRtTfSingleEventError, + batchMultiplexedEvents, } = require('../../util'); const { trackMapping, @@ -202,60 +203,35 @@ const process = async (event) => { }; function batchEvents(eventsChunk) { - const batchedResponseList = []; - // arrayChunks = [[e1,e2,e3,..batchSize],[e1,e2,e3,..batchSize]..] - // transformed payload of (n) batch size - const arrayChunks = _.chunk(eventsChunk, MAX_BATCH_SIZE); - - arrayChunks.forEach((chunk) => { - const batchResponseList = []; - const metadata = []; + const { destination, events } = eventsChunk; + const { accessToken, pixelCode } = destination.Config; + const { batchedRequest } = defaultBatchRequestConfig(); + const batchResponseList = []; + events.forEach((transformedEvent) => { // extracting destination // from the first event in a batch - const { destination } = chunk[0]; - const { accessToken, pixelCode } = destination.Config; - - let batchEventResponse = defaultBatchRequestConfig(); - - // Batch event into dest batch structure - chunk.forEach((ev) => { - // Pixel code must be added above "batch": [..] - delete ev.message.body.JSON.pixel_code; - // Partner name must be added above "batch": [..] - delete ev.message.body.JSON.partner_name; - ev.message.body.JSON.type = 'track'; - batchResponseList.push(ev.message.body.JSON); - metadata.push(ev.metadata); - }); + const cloneTransformedEvent = _.clone(transformedEvent); + delete cloneTransformedEvent.body.JSON.pixel_code; + // Partner name must be added above "batch": [..] + delete cloneTransformedEvent.body.JSON.partner_name; + cloneTransformedEvent.body.JSON.type = 'track'; + batchResponseList.push(cloneTransformedEvent.body.JSON); + }); - batchEventResponse.batchedRequest.body.JSON = { - pixel_code: pixelCode, - partner_name: PARTNER_NAME, - batch: batchResponseList, - }; + batchedRequest.body.JSON = { + pixel_code: pixelCode, + partner_name: PARTNER_NAME, + batch: batchResponseList, + }; - batchEventResponse.batchedRequest.endpoint = BATCH_ENDPOINT; - batchEventResponse.batchedRequest.headers = { - 'Access-Token': accessToken, - 'Content-Type': 'application/json', - }; - batchEventResponse = { - ...batchEventResponse, - metadata, - destination, - }; - batchedResponseList.push( - getSuccessRespEvents( - batchEventResponse.batchedRequest, - batchEventResponse.metadata, - batchEventResponse.destination, - true, - ), - ); - }); + batchedRequest.endpoint = BATCH_ENDPOINT; + batchedRequest.headers = { + 'Access-Token': accessToken, + 'Content-Type': 'application/json', + }; - return batchedResponseList; + return batchedRequest; } function getEventChunks(event, trackResponseList, eventsChunk) { @@ -263,39 +239,16 @@ function getEventChunks(event, trackResponseList, eventsChunk) { // eslint-disable-next-line no-param-reassign event.message = Array.isArray(event.message) ? event.message : [event.message]; - event.message.forEach((element) => { - // Do not apply batching if the payload contains test_event_code - // which corresponds to track endpoint - if (element.body.JSON.test_event_code) { - const message = element; - const { metadata, destination } = event; - const endpoint = get(message, 'endpoint'); - delete message.body.JSON.type; - - const batchedResponse = defaultBatchRequestConfig(); - batchedResponse.batchedRequest.headers = message.headers; - batchedResponse.batchedRequest.endpoint = endpoint; - batchedResponse.batchedRequest.body = message.body; - batchedResponse.batchedRequest.params = message.params; - batchedResponse.batchedRequest.method = defaultPostRequestConfig.requestMethod; - batchedResponse.metadata = [metadata]; - batchedResponse.destination = destination; - - trackResponseList.push( - getSuccessRespEvents( - batchedResponse.batchedRequest, - batchedResponse.metadata, - batchedResponse.destination, - ), - ); - } else { - eventsChunk.push({ - message: element, - metadata: event.metadata, - destination: event.destination, - }); - } - }); + if (event.message[0].body.JSON.test_event_code) { + const { metadata, destination, message } = event; + trackResponseList.push(getSuccessRespEvents(message, [metadata], destination)); + } else { + eventsChunk.push({ + message: event.message, + metadata: event.metadata, + destination: event.destination, + }); + } } const processRouterDest = async (inputs, reqMetadata) => { @@ -332,9 +285,15 @@ const processRouterDest = async (inputs, reqMetadata) => { }), ); - let batchedResponseList = []; + const batchedResponseList = []; if (eventsChunk.length > 0) { - batchedResponseList = await batchEvents(eventsChunk); + const batchedEvents = batchMultiplexedEvents(eventsChunk, MAX_BATCH_SIZE); + batchedEvents.forEach((batch) => { + const batchedRequest = batchEvents(batch); + batchedResponseList.push( + getSuccessRespEvents(batchedRequest, batch.metadata, batch.destination, true), + ); + }); } return [...batchedResponseList.concat(trackResponseList), ...errorRespList]; }; diff --git a/src/v0/destinations/tiktok_ads_offline_events/transform.js b/src/v0/destinations/tiktok_ads_offline_events/transform.js index 1ff5e376b9..a1955806c7 100644 --- a/src/v0/destinations/tiktok_ads_offline_events/transform.js +++ b/src/v0/destinations/tiktok_ads_offline_events/transform.js @@ -12,6 +12,7 @@ const { handleRtTfSingleEventError, getSuccessRespEvents, defaultBatchRequestConfig, + batchMultiplexedEvents, } = require('../../util'); const { CONFIG_CATEGORIES, @@ -145,64 +146,52 @@ const process = (event) => { return response; }; -const generateBatch = (eventSetId, events) => { - const batchRequestObject = defaultBatchRequestConfig(); +const createBatch = (events, eventSetId, destination) => { const batchPayload = []; - const metadata = []; - // extracting destination from the first event in a batch - const { destination } = events[0]; - // Batch event into dest batch structure + const { batchedRequest } = defaultBatchRequestConfig(); events.forEach((ev) => { - batchPayload.push(ev.message.body.JSON); - metadata.push(ev.metadata); + batchPayload.push(ev.body.JSON); }); - - batchRequestObject.batchedRequest.body.JSON = { + batchedRequest.body.JSON = { event_set_id: eventSetId, partner_name: PARTNER_NAME, batch: batchPayload, }; - batchRequestObject.batchedRequest.endpoint = CONFIG_CATEGORIES.TRACK.batchEndpoint; + batchedRequest.endpoint = CONFIG_CATEGORIES.TRACK.batchEndpoint; const { accessToken } = destination.Config; - batchRequestObject.batchedRequest.headers = { + batchedRequest.headers = { 'Access-Token': accessToken, 'Content-Type': 'application/json', }; - - return { - ...batchRequestObject, - metadata, - destination, - }; + return batchedRequest; }; +const generateBatch = (batch, eventSetId) => { + // extracting destination from the first event in a batch + const { destination, events } = batch; + // Batch event into dest batch structure + if (Array.isArray(events[0])) { + const batchedRequests = []; + events.forEach((event) => { + batchedRequests.push(createBatch(event, eventSetId, destination)); + }); + return batchedRequests; + } + return createBatch(events, eventSetId, destination); +}; const batchEvents = (eventChunksArray) => { - const batchedResponseList = []; - // { // event_set_id1: [...events] // event_set_id2: [...events] // } - const groupedEventChunks = _.groupBy(eventChunksArray, (event) => event.message.event_set_id); - Object.keys(groupedEventChunks).forEach((eventSetId) => { - // eventChunks = [[e1,e2,e3,..batchSize],[e1,e2,e3,..batchSize]..] - const eventChunks = _.chunk(groupedEventChunks[eventSetId], MAX_BATCH_SIZE); - eventChunks.forEach((chunk) => { - const batchEventResponse = generateBatch(eventSetId, chunk); - batchedResponseList.push( - getSuccessRespEvents( - batchEventResponse.batchedRequest, - batchEventResponse.metadata, - batchEventResponse.destination, - true, - ), - ); - }); + const groupedEventChunks = _.groupBy(eventChunksArray, ({ message }) => { + if (Array.isArray(message)) return message[0].event_set_id; + return message.event_set_id; }); - return batchedResponseList; + return groupedEventChunks; }; const processRouterDest = async (inputs, reqMetadata) => { @@ -227,12 +216,12 @@ const processRouterDest = async (inputs, reqMetadata) => { } else { // if not transformed const procRespList = await process(event); - const transformedPayload = procRespList.map((procResponse) => ({ - message: procResponse, + const transformedPayload = { + message: procRespList, metadata: event.metadata, destination, - })); - eventChunksArray.push(...transformedPayload); + }; + eventChunksArray.push(transformedPayload); } } catch (error) { const errRespEvent = handleRtTfSingleEventError(event, error, reqMetadata); @@ -240,13 +229,21 @@ const processRouterDest = async (inputs, reqMetadata) => { } }), ); + const batchedResponseList = []; + const chunksOnEventSetId = batchEvents(eventChunksArray); + Object.keys(chunksOnEventSetId).forEach((eventSetId) => { + if (chunksOnEventSetId[eventSetId].length > 0) { + const batchedEvents = batchMultiplexedEvents(chunksOnEventSetId[eventSetId], MAX_BATCH_SIZE); + batchedEvents.forEach((batch) => { + const batchedRequest = generateBatch(batch, eventSetId); + batchedResponseList.push( + getSuccessRespEvents(batchedRequest, batch.metadata, batch.destination, true), + ); + }); + } + }); - let batchResponseList = []; - if (eventChunksArray.length > 0) { - batchResponseList = batchEvents(eventChunksArray); - } - - return [...batchResponseList, ...batchErrorRespList]; + return [...batchedResponseList, ...batchErrorRespList]; }; module.exports = { process, processRouterDest }; diff --git a/test/__mocks__/data/google_adwords_offline_conversion/response.json b/test/__mocks__/data/google_adwords_offline_conversion/response.json new file mode 100644 index 0000000000..0f0b3d2629 --- /dev/null +++ b/test/__mocks__/data/google_adwords_offline_conversion/response.json @@ -0,0 +1,117 @@ +{ + "https://googleads.googleapis.com/v13/customers/11122233331/offlineUserDataJobs:create": { + "data": { + "resourceName": "customers/111-222-3333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID_FOR_ADD_FAILURE" + }, + "status": 200 + }, + "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs:create": { + "data": { + "resourceName": "customers/111-222-3333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID" + }, + "status": 200 + }, + "https://googleads.googleapis.com/v13/customers/customerid/offlineUserDataJobs:create": { + "status": 401, + "data": { + "error": { + "code": 401, + "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", + "status": "UNAUTHENTICATED" + } + } + }, + "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID:addOperations": { + "status": 200, + "data": {} + }, + "https://googleads.googleapis.com/v13/customers/11122233331/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID_FOR_ADD_FAILURE:addOperations": { + "status": 400, + "data": { + "error": { + "code": 400, + "message": "Request contains an invalid argument.", + "status": "INVALID_ARGUMENT", + "details": [ + { + "@type": "type.googleapis.com/google.ads.googleads.v13.errors.GoogleAdsFailure", + "errors": [ + { + "errorCode": { + "offlineUserDataJobError": "INVALID_SHA256_FORMAT" + }, + "message": "The SHA256 encoded value is malformed.", + "location": { + "fieldPathElements": [ + { + "fieldName": "operations", + "index": 0 + }, + { + "fieldName": "create" + }, + { + "fieldName": "user_identifiers", + "index": 0 + }, + { + "fieldName": "hashed_email" + } + ] + } + } + ], + "requestId": "68697987" + } + ] + } + } + }, + "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID:run": { + "status": 200, + "data": { + "name": "customers/111-222-3333/operations/abcd=" + } + }, + "https://googleads.googleapis.com/v13/customers/customerid/offlineUserDataJobs/OFFLINE_USER_DATA_JOB_ID_ADD_FAILURE:addOperations": { + "status": 400, + "data": { + "error": { + "code": 400, + "message": "Request contains an invalid argument.", + "status": "INVALID_ARGUMENT", + "details": [ + { + "@type": "type.googleapis.com/google.ads.googleads.v13.errors.GoogleAdsFailure", + "errors": [ + { + "errorCode": { + "dateError": "INVALID_STRING_DATE_TIME_SECONDS" + }, + "message": "2023-02-01 14:34:30z", + "location": { + "fieldPathElements": [ + { + "fieldName": "operations", + "index": 0 + }, + { + "fieldName": "create" + }, + { + "fieldName": "transaction_attribute" + }, + { + "fieldName": "transaction_date_time" + } + ] + } + } + ], + "requestId": "u8e0bxqa8yeFHxzywdRQWA" + } + ] + } + } + } +} \ No newline at end of file diff --git a/test/__tests__/data/clevertap_input.json b/test/__tests__/data/clevertap_input.json index 218c840c78..690d641869 100644 --- a/test/__tests__/data/clevertap_input.json +++ b/test/__tests__/data/clevertap_input.json @@ -768,5 +768,168 @@ "messageId": "46c1a69c-cc24-4a49-8079-3fcbabf15eb8", "previousId": "1122121" } + }, + { + "destination": { + "Config": { + "passcode": "fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1", + "accountId": "476550467", + "trackAnonymous": true, + "enableObjectIdMapping": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "anonymousId": "anon_id", + "email": "johnDoe@gmail.com", + "first_name": "John", + "last_name": "Doe", + "overrideFields": { + "first_name": "John", + "last_name": "Doe" + }, + "phone": "92374162212", + "gender": "M", + "employed": true, + "birthday": "1614775793", + "education": "Science", + "graduate": true, + "married": true, + "customerType": "Prime", + "msg_push": true, + "msgSms": true, + "msgemail": true, + "msgwhatsapp": false, + "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], + "custom_mappings": { + "Office": "Trastkiv", + "Country": "Russia" + }, + "address": { + "city": "kolkata", + "country": "India", + "postalCode": 789223, + "state": "WB", + "street": "" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + }, + { + "destination": { + "Config": { + "passcode": "fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1", + "accountId": "476550467", + "trackAnonymous": true, + "enableObjectIdMapping": false + } + }, + "message": { + "type": "track", + "event": "Order Completed", + "sentAt": "2021-03-10T11:59:57.815Z", + "userId": "riverjohn", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.13", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:5500/test.html", + "path": "/test.html", + "title": "sample source", + "search": "", + "referrer": "http://127.0.0.1:5500/", + "referring_domain": "127.0.0.1:5500" + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "traits": { + "email": "riverjohn@gmail.com", + "phone": "+12345678900", + "avatar": "https://homepages.cae.wisc.edu/~ece533/images/airplane.png", + "testIng": true, + "lastName": "John", + "firstname": "River" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.13" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" + }, + "rudderId": "fd5d3d37-3ce6-471d-b416-2f351212a44f", + "messageId": "8ff6fd1b-b381-43fc-883c-92bf8eb0e725", + "properties": { + "tax": 1, + "total": 20, + "coupon": "ImagePro", + "revenue": 15, + "currency": "USD", + "discount": 1.5, + "order_id": "1234", + "ts": "2021-03-10T11:59:22.080Z", + "products": { + "sku": "G-32", + "url": "https://www.website.com/product/path", + "name": "Monopoly", + "price": 14, + "category": "Games", + "quantity": 1, + "image_url": "https://www.website.com/product/path.jpg", + "product_id": "123" + }, + "shipping": 22, + "affiliation": "Apple Store", + "checkout_id": "12345" + }, + "anonymousId": "b2e06708-dd2a-4aee-bb32-41855d2fbdab", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-03-10T11:59:22.080Z" + } } ] diff --git a/test/__tests__/data/clevertap_output.json b/test/__tests__/data/clevertap_output.json index a5874981fa..3c203053c3 100644 --- a/test/__tests__/data/clevertap_output.json +++ b/test/__tests__/data/clevertap_output.json @@ -161,7 +161,26 @@ "evtData": { "Charged ID": "12345", "Amount": 15, - "Items": "[{\"sku\":\"G-32\",\"url\":\"https://www.website.com/product/path\",\"name\":\"Monopoly\",\"price\":14,\"category\":\"Games\",\"quantity\":1,\"image_url\":\"https://www.website.com/product/path.jpg\",\"product_id\":\"123\"},{\"sku\":\"F-32\",\"name\":\"UNO\",\"price\":3.45,\"category\":\"Games\",\"quantity\":2,\"product_id\":\"345\"}]", + "Items": [ + { + "sku": "G-32", + "url": "https://www.website.com/product/path", + "name": "Monopoly", + "price": 14, + "category": "Games", + "quantity": 1, + "image_url": "https://www.website.com/product/path.jpg", + "product_id": "123" + }, + { + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "category": "Games", + "quantity": 2, + "product_id": "345" + } + ], "tax": 1, "total": 20, "coupon": "ImagePro", @@ -571,5 +590,55 @@ }, "version": "1", "endpoint": "https://api.clevertap.com/1/upload" + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.clevertap.com/1/upload", + "headers": { + "X-CleverTap-Account-Id": "476550467", + "X-CleverTap-Passcode": "fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "d": [ + { + "type": "profile", + "profileData": { + "Email": "johnDoe@gmail.com", + "Phone": "92374162212", + "Gender": "M", + "Employed": true, + "DOB": "1614775793", + "Education": "Science", + "Married": true, + "Customer Type": "Prime", + "Name": "John Doe", + "graduate": true, + "msg_push": true, + "msgSms": true, + "msgemail": true, + "msgwhatsapp": false, + "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", + "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", + "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}", + "first_name": "John", + "last_name": "Doe" + }, + "identity": "anon_id" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + { + "error": "Products property value must be an array of objects" } ] diff --git a/test/__tests__/data/fb_custom_audience_router.json b/test/__tests__/data/fb_custom_audience_router.json index ed58245e9a..3f12ab1397 100644 --- a/test/__tests__/data/fb_custom_audience_router.json +++ b/test/__tests__/data/fb_custom_audience_router.json @@ -51,7 +51,7 @@ "timestamp": "2020-02-02T00:23:09.544Z" }, "metadata": { - "jobId": 2 + "jobId": 1 }, "destination": { "Config": { @@ -169,150 +169,115 @@ ], "output": [ { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "DELETE", - "endpoint": "https://graph.facebook.com/v16.0/aud1/users", - "headers": {}, - "params": { - "access_token": "ABC", - "payload": { - "is_raw": true, - "data_source": { - "type": "UNKNOWN", - "sub_type": "ANYTHING" - }, - "schema": [ - "EMAIL", - "DOBM", - "DOBD", - "DOBY", - "PHONE", - "GEN", - "FI", - "MADID", - "ZIP", - "ST", - "COUNTRY" - ], - "data": [ - [ - "shrouti@abc.com", - "2", - "13", - "2013", - "@09432457768", - "f", - "Ms.", - "ABC", - "ZIP ", - "123abc ", - "IN" + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "method": "DELETE", + "endpoint": "https://graph.facebook.com/v16.0/aud1/users", + "headers": {}, + "params": { + "access_token": "ABC", + "payload": { + "is_raw": true, + "data_source": { + "type": "UNKNOWN", + "sub_type": "ANYTHING" + }, + "schema": [ + "EMAIL", + "DOBM", + "DOBD", + "DOBY", + "PHONE", + "GEN", + "FI", + "MADID", + "ZIP", + "ST", + "COUNTRY" + ], + "data": [ + [ + "shrouti@abc.com", + "2", + "13", + "2013", + "@09432457768", + "f", + "Ms.", + "ABC", + "ZIP ", + "123abc ", + "IN" + ] ] - ] - } - }, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} + } + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} }, - "files": {} - }, - "metadata": [ { - "jobId": 2 + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v16.0/aud1/users", + "headers": {}, + "params": { + "access_token": "ABC", + "payload": { + "is_raw": true, + "data_source": { + "type": "UNKNOWN", + "sub_type": "ANYTHING" + }, + "schema": [ + "EMAIL", + "DOBM", + "DOBD", + "DOBY", + "PHONE", + "GEN", + "FI", + "MADID", + "ZIP", + "ST", + "COUNTRY" + ], + "data": [ + [ + "shrouti@abc.com", + "2", + "13", + "2013", + "@09432457768", + "f", + "Ms.", + "ABC", + "ZIP ", + "123abc ", + "IN" + ] + ] + } + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} } ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accessToken": "ABC", - "userSchema": [ - "EMAIL", - "DOBM", - "DOBD", - "DOBY", - "PHONE", - "GEN", - "FI", - "MADID", - "ZIP", - "ST", - "COUNTRY" - ], - "isHashRequired": false, - "disableFormat": false, - "audienceId": "aud1", - "isRaw": true, - "type": "UNKNOWN", - "subType": "ANYTHING", - "maxUserCount": "50" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v16.0/aud1/users", - "headers": {}, - "params": { - "access_token": "ABC", - "payload": { - "is_raw": true, - "data_source": { - "type": "UNKNOWN", - "sub_type": "ANYTHING" - }, - "schema": [ - "EMAIL", - "DOBM", - "DOBD", - "DOBY", - "PHONE", - "GEN", - "FI", - "MADID", - "ZIP", - "ST", - "COUNTRY" - ], - "data": [ - [ - "shrouti@abc.com", - "2", - "13", - "2013", - "@09432457768", - "f", - "Ms.", - "ABC", - "ZIP ", - "123abc ", - "IN" - ] - ] - } - }, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, "metadata": [ { - "jobId": 2 + "jobId": 1 } ], "batched": false, @@ -347,145 +312,110 @@ } }, { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "DELETE", - "endpoint": "https://graph.facebook.com/v16.0/aud1/users", - "headers": {}, - "params": { - "access_token": "ABC", - "payload": { - "is_raw": true, - "data_source": { - "sub_type": "ANYTHING" - }, - "schema": [ - "EMAIL", - "DOBM", - "DOBD", - "DOBY", - "PHONE", - "GEN", - "FI", - "MADID", - "ZIP", - "ST", - "COUNTRY" - ], - "data": [ - [ - "shrouti@abc.com", - "2", - "13", - "2013", - "@09432457768", - "f", - "Ms.", - "ABC", - "ZIP ", - "123abc ", - "IN" + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "method": "DELETE", + "endpoint": "https://graph.facebook.com/v16.0/aud1/users", + "headers": {}, + "params": { + "access_token": "ABC", + "payload": { + "is_raw": true, + "data_source": { + "sub_type": "ANYTHING" + }, + "schema": [ + "EMAIL", + "DOBM", + "DOBD", + "DOBY", + "PHONE", + "GEN", + "FI", + "MADID", + "ZIP", + "ST", + "COUNTRY" + ], + "data": [ + [ + "shrouti@abc.com", + "2", + "13", + "2013", + "@09432457768", + "f", + "Ms.", + "ABC", + "ZIP ", + "123abc ", + "IN" + ] ] - ] - } - }, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} + } + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} }, - "files": {} - }, - "metadata": [ { - "jobId": 2 + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v16.0/aud1/users", + "headers": {}, + "params": { + "access_token": "ABC", + "payload": { + "is_raw": true, + "data_source": { + "sub_type": "ANYTHING" + }, + "schema": [ + "EMAIL", + "DOBM", + "DOBD", + "DOBY", + "PHONE", + "GEN", + "FI", + "MADID", + "ZIP", + "ST", + "COUNTRY" + ], + "data": [ + [ + "shrouti@abc.com", + "2", + "13", + "2013", + "@09432457768", + "f", + "Ms.", + "ABC", + "ZIP ", + "123abc ", + "IN" + ] + ] + } + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} } ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accessToken": "ABC", - "userSchema": [ - "EMAIL", - "DOBM", - "DOBD", - "DOBY", - "PHONE", - "GEN", - "FI", - "MADID", - "ZIP", - "ST", - "COUNTRY" - ], - "isHashRequired": false, - "disableFormat": false, - "audienceId": "aud1", - "isRaw": true, - "type": "NA", - "subType": "ANYTHING", - "maxUserCount": "50" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v16.0/aud1/users", - "headers": {}, - "params": { - "access_token": "ABC", - "payload": { - "is_raw": true, - "data_source": { - "sub_type": "ANYTHING" - }, - "schema": [ - "EMAIL", - "DOBM", - "DOBD", - "DOBY", - "PHONE", - "GEN", - "FI", - "MADID", - "ZIP", - "ST", - "COUNTRY" - ], - "data": [ - [ - "shrouti@abc.com", - "2", - "13", - "2013", - "@09432457768", - "f", - "Ms.", - "ABC", - "ZIP ", - "123abc ", - "IN" - ] - ] - } - }, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, "metadata": [ { "jobId": 2 diff --git a/test/__tests__/data/fb_custom_audience_router_rETL_output.json b/test/__tests__/data/fb_custom_audience_router_rETL_output.json index 0a0c86f1a7..068e8ac4fc 100644 --- a/test/__tests__/data/fb_custom_audience_router_rETL_output.json +++ b/test/__tests__/data/fb_custom_audience_router_rETL_output.json @@ -1,70 +1,69 @@ [ { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v16.0/23848494844100489/users", - "headers": {}, - "params": { - "access_token": "ABC", - "payload": { - "schema": [ - "EMAIL", - "FN" - ], - "data": [ - [ - "7625cab24612c37df6d2f724721bb38a25095d0295e29b807238ee188b8aca43", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "b2b4abadd72190af54305c0d3abf1977fec4935016bb13ff28040d5712318dfd", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "c4b007d1c3c9a5d31bd4082237a913e8e0db1767225c2a5ef33be2716df005fa", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "94639be1bd9f17c05820164e9d71ef78558f117a9e8bfab43cf8015e08aa0b27", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "39b456cfb4bb07f9e6bb18698aa173171ca49c731fccc4790e9ecea808d24ae6", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "769f73387add781a481ca08300008a08fb2f1816aaed196137efc2e05976d711", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "da2d431121cd10578fd81f8f80344b06db59ea2d05a7b5d27536c8789ddae8f0", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "b100c2ec0718fe6b4805b623aeec6710719d042ceea55f5c8135b010ec1c7b36", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - ], - [ - "0c1d1b0ba547a742013366d6fbc8f71dd77f566d94e41ed9f828a74b96928161", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v16.0/23848494844100489/users", + "headers": {}, + "params": { + "access_token": "ABC", + "payload": { + "schema": ["EMAIL", "FN"], + "data": [ + [ + "7625cab24612c37df6d2f724721bb38a25095d0295e29b807238ee188b8aca43", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "b2b4abadd72190af54305c0d3abf1977fec4935016bb13ff28040d5712318dfd", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "c4b007d1c3c9a5d31bd4082237a913e8e0db1767225c2a5ef33be2716df005fa", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "94639be1bd9f17c05820164e9d71ef78558f117a9e8bfab43cf8015e08aa0b27", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "39b456cfb4bb07f9e6bb18698aa173171ca49c731fccc4790e9ecea808d24ae6", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "769f73387add781a481ca08300008a08fb2f1816aaed196137efc2e05976d711", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "da2d431121cd10578fd81f8f80344b06db59ea2d05a7b5d27536c8789ddae8f0", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "b100c2ec0718fe6b4805b623aeec6710719d042ceea55f5c8135b010ec1c7b36", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ], + [ + "0c1d1b0ba547a742013366d6fbc8f71dd77f566d94e41ed9f828a74b96928161", + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + ] ] - ] - } - }, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, + } + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ], "metadata": [ { "jobId": 2 @@ -83,9 +82,7 @@ "skipVerify": false, "subType": "NA", "type": "NA", - "userSchema": [ - "EMAIL" - ] + "userSchema": ["EMAIL"] }, "secretConfig": {}, "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", @@ -107,4 +104,4 @@ "isProcessorEnabled": true } } -] \ No newline at end of file +] diff --git a/test/__tests__/data/google_adwords_offline_conversions.json b/test/__tests__/data/google_adwords_offline_conversions.json index 8c8b714c73..0ca86f7cf3 100644 --- a/test/__tests__/data/google_adwords_offline_conversions.json +++ b/test/__tests__/data/google_adwords_offline_conversions.json @@ -1,6 +1,6 @@ [ { - "description": "click - testing all the parameters mapping for click conversions", + "description": "click - testing all the parameters mapping for click conversions and only defaultUserIdentifer is set", "input": { "message": { "channel": "web", @@ -21,8 +21,7 @@ "advertisingId": "44c97318-9040-4361-8bc7-4eb30f665ca8" }, "traits": { - "email": "alex@example.com", - "phone": "+1-202-555-0146", + "phone": "alex@example.com", "firstName": "John", "lastName": "Gomes", "city": "London", @@ -239,7 +238,7 @@ "userIdentifiers": [ { "userIdentifierSource": "FIRST_PARTY", - "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110" + "hashedPhoneNumber": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110" } ], "conversionEnvironment": "WEB", @@ -261,7 +260,7 @@ ] }, { - "description": "click - testing all the parameters mapping for click conversions with few edge cases - originalTimestamp and enums are none in config", + "description": "click - testing all the parameters mapping for click conversions and only defaultUserIdentifer is set", "input": { "message": { "channel": "web", @@ -307,9 +306,9 @@ "density": 2 } }, - "event": "sign up completed", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "event": "Promotion Clicked", "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", "originalTimestamp": "2019-10-14T11:15:18.299Z", "anonymousId": "00000000000000000000000000", "userId": "12345", @@ -319,9 +318,8 @@ "externalAttributionCredit": 10, "externalAttributionModel": "externalAttributionModel", "conversionCustomVariable": "conversionCustomVariable", - "value": "10", - "orderId": "PL-123QR", - "merchantId": "123123Mpowi", + "value": "value", + "merchantId": "9876merchantId", "feedCountryCode": "feedCountryCode", "feedLanguageCode": "feedLanguageCode", "localTransactionCost": 20, @@ -338,11 +336,13 @@ "image_url": "https://www.example.com/product/path.jpg" } ], + "userIdentifierSource": "FIRST_PARTY", + "conversionEnvironment": "WEB", "gclid": "gclid", - "conversionAction": "customer", + "conversionDateTime": "2022-01-01 12:32:45-08:00", "conversionValue": "1", "currency": "GBP", - "total": 555 + "orderId": "PL-123QR" }, "integrations": { "All": true @@ -446,9 +446,8 @@ "externalAttributionCredit": 10, "externalAttributionModel": "externalAttributionModel", "conversionCustomVariable": "conversionCustomVariable", - "value": "10", - "orderId": "PL-123QR", - "merchantId": "123123Mpowi", + "value": "value", + "merchantId": "9876merchantId", "feedCountryCode": "feedCountryCode", "feedLanguageCode": "feedLanguageCode", "localTransactionCost": 20, @@ -465,11 +464,13 @@ "image_url": "https://www.example.com/product/path.jpg" } ], + "userIdentifierSource": "FIRST_PARTY", + "conversionEnvironment": "WEB", "gclid": "gclid", - "conversionAction": "customer", + "conversionDateTime": "2022-01-01 12:32:45-08:00", "conversionValue": "1", "currency": "GBP", - "total": 555 + "orderId": "PL-123QR" } }, "body": { @@ -483,7 +484,7 @@ "externalAttributionModel": "externalAttributionModel" }, "cartData": { - "merchantId": 123123, + "merchantId": 9876, "feedCountryCode": "feedCountryCode", "feedLanguageCode": "feedLanguageCode", "localTransactionCost": 20, @@ -497,13 +498,13 @@ }, "userIdentifiers": [ { - "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110", - "userIdentifierSource": "THIRD_PARTY" + "userIdentifierSource": "FIRST_PARTY", + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110" } ], - "gclid": "gclid", - "conversionDateTime": "2019-10-14 11:15:18+00:00", "conversionEnvironment": "WEB", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", "conversionValue": 1, "currencyCode": "GBP", "orderId": "PL-123QR" @@ -520,7 +521,7 @@ ] }, { - "description": "call - testing all the parameter mapping for call conversions", + "description": "click - testing all the parameters mapping for click conversions with few edge cases - originalTimestamp and enums are none in config", "input": { "message": { "channel": "web", @@ -566,16 +567,21 @@ "density": 2 } }, - "event": "Product Searched", - "type": "track", + "event": "sign up completed", "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "type": "track", "originalTimestamp": "2019-10-14T11:15:18.299Z", "anonymousId": "00000000000000000000000000", "userId": "12345", "properties": { + "gbraid": "gbraid", + "wbraid": "wbraid", "externalAttributionCredit": 10, "externalAttributionModel": "externalAttributionModel", - "merchantId": "merchantId", + "conversionCustomVariable": "conversionCustomVariable", + "value": "10", + "orderId": "PL-123QR", + "merchantId": "123123Mpowi", "feedCountryCode": "feedCountryCode", "feedLanguageCode": "feedLanguageCode", "localTransactionCost": 20, @@ -592,18 +598,11 @@ "image_url": "https://www.example.com/product/path.jpg" } ], - "userIdentifierSource": "FIRST_PARTY", - "conversionEnvironment": "WEB", "gclid": "gclid", - - "conversionCustomVariable": "conversionCustomVariable", - "value": "value", - - "callerId": "callerId", - "callStartDateTime": "2022-08-28 15:01:30+05:30", - "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionAction": "customer", "conversionValue": "1", - "currency": "GBP" + "currency": "GBP", + "total": 555 }, "integrations": { "All": true @@ -682,14 +681,14 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://googleads.googleapis.com/v13/customers/9625812972:uploadCallConversions", + "endpoint": "https://googleads.googleapis.com/v13/customers/9625812972:uploadClickConversions", "headers": { "Authorization": "Bearer abcd1234", "Content-Type": "application/json", "developer-token": "ijkl91011" }, "params": { - "event": "search", + "event": "Sign-up - click", "customerId": "9625812972", "customVariables": [ { @@ -702,9 +701,14 @@ } ], "properties": { + "gbraid": "gbraid", + "wbraid": "wbraid", "externalAttributionCredit": 10, "externalAttributionModel": "externalAttributionModel", - "merchantId": "merchantId", + "conversionCustomVariable": "conversionCustomVariable", + "value": "10", + "orderId": "PL-123QR", + "merchantId": "123123Mpowi", "feedCountryCode": "feedCountryCode", "feedLanguageCode": "feedLanguageCode", "localTransactionCost": 20, @@ -721,27 +725,48 @@ "image_url": "https://www.example.com/product/path.jpg" } ], - "userIdentifierSource": "FIRST_PARTY", - "conversionEnvironment": "WEB", "gclid": "gclid", - "conversionCustomVariable": "conversionCustomVariable", - "value": "value", - "callerId": "callerId", - "callStartDateTime": "2022-08-28 15:01:30+05:30", - "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionAction": "customer", "conversionValue": "1", - "currency": "GBP" + "currency": "GBP", + "total": 555 } }, "body": { "JSON": { "conversions": [ { - "callerId": "callerId", - "callStartDateTime": "2022-08-28 15:01:30+05:30", - "conversionDateTime": "2022-01-01 12:32:45-08:00", + "gbraid": "gbraid", + "wbraid": "wbraid", + "externalAttributionData": { + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel" + }, + "cartData": { + "merchantId": 123123, + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "items": [ + { + "productId": "507f1f77bcf86cd799439011", + "quantity": 2, + "unitPrice": 50 + } + ] + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110", + "userIdentifierSource": "THIRD_PARTY" + } + ], + "gclid": "gclid", + "conversionDateTime": "2019-10-14 11:15:18+00:00", + "conversionEnvironment": "WEB", "conversionValue": 1, - "currencyCode": "GBP" + "currencyCode": "GBP", + "orderId": "PL-123QR" } ], "partialFailure": true @@ -755,7 +780,7 @@ ] }, { - "description": "OAuth - access token not found", + "description": "call - testing all the parameter mapping for call conversions", "input": { "message": { "channel": "web", @@ -801,19 +826,15 @@ "density": 2 } }, - "event": "Promotion Clicked", + "event": "Product Searched", "type": "track", "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", "originalTimestamp": "2019-10-14T11:15:18.299Z", "anonymousId": "00000000000000000000000000", "userId": "12345", "properties": { - "gbraid": "gbraid", - "wbraid": "wbraid", "externalAttributionCredit": 10, "externalAttributionModel": "externalAttributionModel", - "conversionCustomVariable": "conversionCustomVariable", - "value": "value", "merchantId": "merchantId", "feedCountryCode": "feedCountryCode", "feedLanguageCode": "feedLanguageCode", @@ -834,6 +855,10 @@ "userIdentifierSource": "FIRST_PARTY", "conversionEnvironment": "WEB", "gclid": "gclid", + "conversionCustomVariable": "conversionCustomVariable", + "value": "value", + "callerId": "callerId", + "callStartDateTime": "2022-08-28 15:01:30+05:30", "conversionDateTime": "2022-01-01 12:32:45-08:00", "conversionValue": "1", "currency": "GBP" @@ -845,7 +870,11 @@ "sentAt": "2019-10-14T11:15:53.296Z" }, "metadata": { - "secret": null + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } }, "destination": { "Config": { @@ -906,21 +935,85 @@ } } }, - "output": { - "metadata": { - "secret": null - }, - "statusCode": 500, - "error": "OAuth - access token not found", - "statTags": { - "destination": "google_adwords_offline_conversions", - "stage": "transform", - "scope": "exception" + "output": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/9625812972:uploadCallConversions", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011" + }, + "params": { + "event": "search", + "customerId": "9625812972", + "customVariables": [ + { + "from": "value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "properties": { + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel", + "merchantId": "merchantId", + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "quantity": "2", + "price": "50", + "sku": "45790-32", + "name": "Monopoly: 3rd Edition", + "position": "1", + "category": "cars", + "url": "https://www.example.com/product/path", + "image_url": "https://www.example.com/product/path.jpg" + } + ], + "userIdentifierSource": "FIRST_PARTY", + "conversionEnvironment": "WEB", + "gclid": "gclid", + "conversionCustomVariable": "conversionCustomVariable", + "value": "value", + "callerId": "callerId", + "callStartDateTime": "2022-08-28 15:01:30+05:30", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": "1", + "currency": "GBP" + } + }, + "body": { + "JSON": { + "conversions": [ + { + "callerId": "callerId", + "callStartDateTime": "2022-08-28 15:01:30+05:30", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": 1, + "currencyCode": "GBP" + } + ], + "partialFailure": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} } - } + ] }, { - "description": "message type not present", + "description": "OAuth - access token not found", "input": { "message": { "channel": "web", @@ -967,6 +1060,7 @@ } }, "event": "Promotion Clicked", + "type": "track", "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", "originalTimestamp": "2019-10-14T11:15:18.299Z", "anonymousId": "00000000000000000000000000", @@ -977,6 +1071,26 @@ "externalAttributionCredit": 10, "externalAttributionModel": "externalAttributionModel", "conversionCustomVariable": "conversionCustomVariable", + "value": "value", + "merchantId": "merchantId", + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "quantity": "2", + "price": "50", + "sku": "45790-32", + "name": "Monopoly: 3rd Edition", + "position": "1", + "category": "cars", + "url": "https://www.example.com/product/path", + "image_url": "https://www.example.com/product/path.jpg" + } + ], + "userIdentifierSource": "FIRST_PARTY", + "conversionEnvironment": "WEB", "gclid": "gclid", "conversionDateTime": "2022-01-01 12:32:45-08:00", "conversionValue": "1", @@ -989,11 +1103,7 @@ "sentAt": "2019-10-14T11:15:53.296Z" }, "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + "secret": null }, "destination": { "Config": { @@ -1056,9 +1166,157 @@ }, "output": { "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", + "secret": null + }, + "statusCode": 500, + "error": "OAuth - access token not found", + "statTags": { + "destination": "google_adwords_offline_conversions", + "stage": "transform", + "scope": "exception" + } + } + }, + { + "description": "message type not present", + "input": { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "id": "0572f78fa49c648e", + "name": "generic_x86_arm", + "type": "Android", + "model": "AOSP on IA Emulator", + "manufacturer": "Google", + "adTrackingEnabled": true, + "advertisingId": "44c97318-9040-4361-8bc7-4eb30f665ca8" + }, + "traits": { + "email": "alex@example.com", + "phone": "+1-202-555-0146", + "firstName": "John", + "lastName": "Gomes", + "city": "London", + "state": "England", + "countryCode": "GB", + "postalCode": "EC3M", + "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "event": "Promotion Clicked", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "gbraid": "gbraid", + "wbraid": "wbraid", + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel", + "conversionCustomVariable": "conversionCustomVariable", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": "1", + "currency": "GBP" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "customerId": "962-581-2972", + "subAccount": false, + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Sign up completed", + "to": "click" + }, + { + "from": "Download", + "to": "call" + }, + { + "from": "Promotion Clicked", + "to": "click" + }, + { + "from": "Product Searched", + "to": "call" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Sign up completed", + "to": "Sign-up - click" + }, + { + "from": "Download", + "to": "Page view" + }, + { + "from": "Promotion Clicked", + "to": "Sign-up - click" + }, + { + "from": "Product Searched", + "to": "search" + } + ], + "customVariables": [ + { + "from": "value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "UserIdentifierSource": "THIRD_PARTY", + "conversionEnvironment": "WEB", + "hashUserIdentifier": true, + "defaultUserIdentifier": "email", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" + } + } + }, + "output": { + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", "developer_token": "ijkl91011" } }, @@ -1824,7 +2082,8 @@ "UserIdentifierSource": "THIRD_PARTY", "conversionEnvironment": "WEB", "hashUserIdentifier": true, - "defaultUserIdentifier": "email", + "defaultUserIdentifier": "phone", + "": "phone", "validateOnly": false, "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" } @@ -2047,7 +2306,7 @@ ] }, { - "description": "call - take conversionDateTime from originalTimestamp", + "description": "call - take conversionDateTime from originalTimestamp and as email", "input": { "message": { "channel": "web", @@ -2122,10 +2381,8 @@ "userIdentifierSource": "FIRST_PARTY", "conversionEnvironment": "WEB", "gclid": "gclid", - "conversionCustomVariable": "conversionCustomVariable", "value": "value", - "callerId": "callerId", "callStartDateTime": "2022-08-28 15:01:30+05:30", "conversionValue": "1", @@ -2293,8 +2550,7 @@ }, "device": {}, "traits": { - "email": "alex@example.com", - "phone": "+1-202-555-0146" + "email": "alex@example.com" }, "library": { "name": "RudderLabs JavaScript SDK", @@ -2388,7 +2644,7 @@ "UserIdentifierSource": "THIRD_PARTY", "conversionEnvironment": "WEB", "hashUserIdentifier": false, - "defaultUserIdentifier": "email", + "defaultUserIdentifier": "phone", "validateOnly": false, "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" } @@ -2814,7 +3070,7 @@ "UserIdentifierSource": "THIRD_PARTY", "conversionEnvironment": "WEB", "hashUserIdentifier": true, - "defaultUserIdentifier": "email", + "defaultUserIdentifier": "phone", "validateOnly": false, "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" } @@ -3184,5 +3440,1177 @@ "files": {} } ] + }, + { + "description": "Store - using email as userIdentifier and validateOnly as false ", + "input": { + "message": { + "channel": "web", + "context": { + "traits": { + "firstName": "John" + } + }, + "event": "Product Clicked", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "loyaltyFraction": 1, + "order_id": "order id", + "currency": "INR", + "revenue": "100", + "store_code": "store code", + "email": "alex@example.com", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "product_id": "123445", + "custom_key": "CUSTOM_KEY", + "CUSTOM_KEY": "CUSTOM_VALUE", + "quantity": 123 + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "customerId": "111-222-3333", + "subAccount": true, + "loginCustomerId": "login-customer-id", + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Sign up completed", + "to": "click" + }, + { + "from": "Download", + "to": "call" + }, + { + "from": "Product Clicked", + "to": "store" + }, + { + "from": "Product Searched", + "to": "call" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Sign up completed", + "to": "Sign-up - click" + }, + { + "from": "Download", + "to": "Page view" + }, + { + "from": "Product Clicked", + "to": "Sign-up - click" + }, + { + "from": "Product Searched", + "to": "search" + } + ], + "customVariables": [ + { + "from": "value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "UserIdentifierSource": "phone", + "conversionEnvironment": "WEB", + "hashUserIdentifier": true, + "defaultUserIdentifier": "email", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" + } + } + }, + "output": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "CUSTOM_KEY": "CUSTOM_VALUE", + "currency_code": "INR", + "order_id": "order id", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110" + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "custom_key": "CUSTOM_KEY", + "loyaltyFraction": 1, + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ] + }, + { + "description": "Store - No transaction amount field is present", + "input": { + "message": { + "channel": "web", + "context": { + "traits": { + "firstName": "John" + } + }, + "event": "Product Clicked", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "loyaltyFraction": 1, + "order_id": "order id", + "currency": "INR", + "store_code": "store code", + "userIdentifierSource": "FIRST_PARTY", + "email": "alex@example.com", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "product_id": "123445", + "quantity": 123 + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "customerId": "111-222-3333", + "subAccount": true, + "loginCustomerId": "login-customer-id", + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Sign up completed", + "to": "click" + }, + { + "from": "Download", + "to": "call" + }, + { + "from": "Product Clicked", + "to": "store" + }, + { + "from": "Product Searched", + "to": "call" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Sign up completed", + "to": "Sign-up - click" + }, + { + "from": "Download", + "to": "Page view" + }, + { + "from": "Product Clicked", + "to": "Sign-up - click" + }, + { + "from": "Product Searched", + "to": "search" + } + ], + "customVariables": [ + { + "from": "value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "conversionEnvironment": "WEB", + "hashUserIdentifier": true, + "defaultUserIdentifier": "email", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" + } + } + }, + "output": { + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "statusCode": 400, + "error": "Missing required value from [\"properties.conversionValue\",\"properties.total\",\"properties.value\",\"properties.revenue\"]", + "statTags": { + "destination": "google_adwords_offline_conversions", + "stage": "transform", + "scope": "exception" + } + } + }, + { + "description": "Store - using address as userIdentifier when deafultUserIdentifier is not present ", + "input": { + "message": { + "channel": "web", + "context": { + "traits": { + "firstName": "John" + } + }, + "event": "Product Clicked", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "loyaltyFraction": 1, + "item_id": "item id", + "merchant_id": "merchant id", + "currency": "INR", + "revenue": "100", + "store_code": "store code", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "product_id": "123445", + "quantity": 123 + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "isCustomerAllowed": true, + "customerId": "111-222-3333", + "subAccount": true, + "loginCustomerId": "login-customer-id", + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Sign up completed", + "to": "click" + }, + { + "from": "Download", + "to": "call" + }, + { + "from": "Product Clicked", + "to": "store" + }, + { + "from": "Product Searched", + "to": "call" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Sign up completed", + "to": "Sign-up - click" + }, + { + "from": "Download", + "to": "Page view" + }, + { + "from": "Product Clicked", + "to": "Sign-up - click" + }, + { + "from": "Product Searched", + "to": "search" + } + ], + "customVariables": [ + { + "from": "value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "conversionEnvironment": "WEB", + "hashUserIdentifier": true, + "defaultUserIdentifier": "email", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" + } + } + }, + "output": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "currency_code": "INR", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "address_info": { + "hashed_first_name": "96d9632f363564cc3032521409cf22a852f2032eec099ed5967c0d000cec607a" + } + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "loyaltyFraction": 1, + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ] + }, + { + "description": "Store - using email as userIdentifier but mapping address due to unavailability and loyaltyFraction not given and hashIdentifier as false", + "input": { + "message": { + "channel": "web", + "context": { + "traits": { + "firstName": "first_name", + "streetAddress": "street_address", + "state": "England" + } + }, + "event": "Product Clicked", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "item_id": "item id", + "merchant_id": "merchant id", + "currency": "INR", + "revenue": "100", + "store_code": "store code", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00Z", + "product_id": "123445", + "quantity": 123 + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "isCustomerAllowed": false, + "customerId": "111-222-3333", + "subAccount": true, + "loginCustomerId": "login-customer-id", + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Sign up completed", + "to": "click" + }, + { + "from": "Download", + "to": "call" + }, + { + "from": "Product Clicked", + "to": "store" + }, + { + "from": "Product Searched", + "to": "call" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Sign up completed", + "to": "Sign-up - click" + }, + { + "from": "Download", + "to": "Page view" + }, + { + "from": "Product Clicked", + "to": "Sign-up - click" + }, + { + "from": "Product Searched", + "to": "search" + } + ], + "customVariables": [ + { + "from": "value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "conversionEnvironment": "WEB", + "hashUserIdentifier": false, + "defaultUserIdentifier": "email", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" + } + } + }, + "output": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "currency_code": "INR", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "address_info": { + "hashed_first_name": "first_name", + "hashed_street_address": "street_address", + "state": "England" + } + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "loyaltyFraction": "1", + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ] + }, + { + "description": "Store - using Phone as userIdentifier and loyaltyFraction not given", + "input": { + "message": { + "channel": "web", + "context": { + "traits": { + "firstName": "John", + "lastName": "Gomes", + "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK", + "state": "England" + } + }, + "event": "Product Clicked", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "item_id": "item id", + "merchant_id": "merchant id", + "currency": "INR", + "revenue": "100", + "store_code": "store code", + "phone": "+1-202-555-0146", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00Z", + "product_id": "123445", + "quantity": 123 + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "isCustomerAllowed": false, + "customerId": "111-222-3333", + "subAccount": true, + "loginCustomerId": "login-customer-id", + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Sign up completed", + "to": "click" + }, + { + "from": "Download", + "to": "call" + }, + { + "from": "Product Clicked", + "to": "store" + }, + { + "from": "Product Searched", + "to": "call" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Sign up completed", + "to": "Sign-up - click" + }, + { + "from": "Download", + "to": "Page view" + }, + { + "from": "Product Clicked", + "to": "Sign-up - click" + }, + { + "from": "Product Searched", + "to": "search" + } + ], + "customVariables": [ + { + "from": "value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "conversionEnvironment": "WEB", + "hashUserIdentifier": true, + "defaultUserIdentifier": "phone", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNku4fGYKkRK" + } + } + }, + "output": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "currency_code": "INR", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedPhoneNumber": "04e1dabb7c1348b72bfa87da179c9697c69af74827649266a5da8cdbb367abcd" + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "loyaltyFraction": "1", + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ] + }, + { + "description": "Store - using Phone as userIdentifier", + "input": { + "message": { + "channel": "web", + "context": { + "traits": { + "firstName": "John", + "lastName": "Gomes", + "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK", + "state": "England" + } + }, + "event": "Product Clicked", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "item_id": "item id", + "merchant_id": "merchant id", + "currency": "INR", + "revenue": "100", + "store_code": "store code", + "phone": "+1-202-555-0146", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00Z", + "product_id": "123445", + "quantity": 123 + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "isCustomerAllowed": false, + "customerId": "111-222-3333", + "subAccount": true, + "loginCustomerId": "login-customer-id", + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Product Clicked", + "to": "store" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Product Clicked", + "to": "Sign-up - click" + } + ], + "hashUserIdentifier": true, + "defaultUserIdentifier": "phone", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNkgr4t3u4fGYKkRK" + } + } + }, + "output": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "currency_code": "INR", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedPhoneNumber": "04e1dabb7c1348b72bfa87da179c9697c69af74827649266a5da8cdbb367abcd" + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "loyaltyFraction": "1", + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ] + }, + { + "description": "Store - using email as userIdentifier when phone is defaultUserIdentifer", + "input": { + "message": { + "channel": "web", + "context": { + "traits": { + "email": "alex@example.com" + } + }, + "event": "Product Clicked", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "item_id": "item id", + "merchant_id": "merchant id", + "currency": "INR", + "revenue": "100", + "store_code": "store code", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00Z", + "product_id": "123445", + "quantity": 123 + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "isCustomerAllowed": false, + "customerId": "111-222-3333", + "subAccount": true, + "loginCustomerId": "login-customer-id", + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Product Clicked", + "to": "store" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Product Clicked", + "to": "Sign-up - click" + } + ], + "hashUserIdentifier": true, + "defaultUserIdentifier": "phone", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNkgr4t3u4fGYKkRK" + } + } + }, + "output": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "currency_code": "INR", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110" + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "loyaltyFraction": "1", + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ] + }, + { + "description": "Store - No userIdentifier is given in payload and phone is defaultUserIdentifer", + "input": { + "message": { + "channel": "web", + "context": { + "traits": {} + }, + "event": "Product Clicked", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "item_id": "item id", + "merchant_id": "merchant id", + "currency": "INR", + "revenue": "100", + "store_code": "store code", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00Z", + "product_id": "123445", + "quantity": 123 + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "secret": { + "access_token": "abcd1234", + "refresh_token": "efgh5678", + "developer_token": "ijkl91011" + } + }, + "destination": { + "Config": { + "isCustomerAllowed": false, + "customerId": "111-222-3333", + "subAccount": true, + "loginCustomerId": "login-customer-id", + "eventsToOfflineConversionsTypeMapping": [ + { + "from": "Product Clicked", + "to": "store" + } + ], + "eventsToConversionsNamesMapping": [ + { + "from": "Product Clicked", + "to": "Sign-up - click" + } + ], + "hashUserIdentifier": true, + "defaultUserIdentifier": "phone", + "validateOnly": false, + "rudderAccountId": "2EOknn1JNH7WK1MfNkgr4t3u4fGYKkRK" + } + } + }, + "output": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "currency_code": "INR", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + {} + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "loyaltyFraction": "1", + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ] } -] +] \ No newline at end of file diff --git a/test/__tests__/data/google_adwords_offline_conversions_proxy_input.json b/test/__tests__/data/google_adwords_offline_conversions_proxy_input.json index 9499219790..9638f4e5d0 100644 --- a/test/__tests__/data/google_adwords_offline_conversions_proxy_input.json +++ b/test/__tests__/data/google_adwords_offline_conversions_proxy_input.json @@ -1,4 +1,208 @@ [ + { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/11122233331/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "CUSTOM_KEY": "CUSTOM_VALUE", + "currency_code": "INR", + "order_id": "order id", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af26f26a133a3bee45021422fc7ae86e9136f14110", + "userIdentifierSource": "UNSPECIFIED" + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "custom_key": "CUSTOM_KEY", + "loyaltyFraction": 1, + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + } + }, + { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "CUSTOM_KEY": "CUSTOM_VALUE", + "currency_code": "INR", + "order_id": "order id", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110", + "userIdentifierSource": "UNSPECIFIED" + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "custom_key": "CUSTOM_KEY", + "loyaltyFraction": 1, + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + } + }, + { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v13/customers/customerid/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": { + "create": { + "transaction_attribute": { + "CUSTOM_KEY": "CUSTOM_VALUE", + "currency_code": "INR", + "order_id": "order id", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110", + "userIdentifierSource": "UNSPECIFIED" + } + ] + } + }, + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "custom_key": "CUSTOM_KEY", + "loyaltyFraction": 1, + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + } + }, { "request": { "body": { @@ -305,4 +509,4 @@ } } } -] +] \ No newline at end of file diff --git a/test/__tests__/data/google_adwords_offline_conversions_proxy_output.json b/test/__tests__/data/google_adwords_offline_conversions_proxy_output.json index 141feea3e4..1e42151230 100644 --- a/test/__tests__/data/google_adwords_offline_conversions_proxy_output.json +++ b/test/__tests__/data/google_adwords_offline_conversions_proxy_output.json @@ -1,4 +1,91 @@ [ + { + "output": { + "status": 400, + "message": "[Google Ads Offline Conversions]:: Request contains an invalid argument. during google_ads_offline_store_conversions Add Conversion", + "destinationResponse": { + "error": { + "code": 400, + "details": [ + { + "@type": "type.googleapis.com/google.ads.googleads.v13.errors.GoogleAdsFailure", + "errors": [ + { + "errorCode": { + "offlineUserDataJobError": "INVALID_SHA256_FORMAT" + }, + "message": "The SHA256 encoded value is malformed.", + "location": { + "fieldPathElements": [ + { + "fieldName": "operations", + "index": 0 + }, + { + "fieldName": "create" + }, + { + "fieldName": "user_identifiers", + "index": 0 + }, + { + "fieldName": "hashed_email" + } + ] + } + } + ], + "requestId": "68697987" + } + ], + "message": "Request contains an invalid argument.", + "status": "INVALID_ARGUMENT" + } + }, + "statTags": { + "destType": "GOOGLE_ADWORDS_OFFLINE_CONVERSIONS", + "errorCategory": "network", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + }, + { + "output": { + "status": 200, + "message": "[Google Ads Offline Conversions Response Handler] - Request processed successfully", + "destinationResponse": { + "response": { + "name": "customers/111-222-3333/operations/abcd=" + }, + "status": 200 + } + } + }, + { + "output": { + "status": 401, + "message": "[Google Ads Offline Conversions]:: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. during google_ads_offline_store_conversions Job Creation", + "authErrorCategory": "REFRESH_TOKEN", + "destinationResponse": { + "error": { + "code": 401, + "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", + "status": "UNAUTHENTICATED" + } + }, + "statTags": { + "destType": "GOOGLE_ADWORDS_OFFLINE_CONVERSIONS", + "errorCategory": "network", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + }, { "output": { "status": 401, @@ -65,4 +152,4 @@ "status": 200 } } -] +] \ No newline at end of file diff --git a/test/__tests__/data/iterable_input.json b/test/__tests__/data/iterable_input.json index cbb4ac401c..21ea74050f 100644 --- a/test/__tests__/data/iterable_input.json +++ b/test/__tests__/data/iterable_input.json @@ -1281,12 +1281,7 @@ "includeKeys": [], "saveDestinationResponse": true, "secretKeys": [], - "supportedMessageTypes": [ - "identify", - "page", - "screen", - "track" - ], + "supportedMessageTypes": ["identify", "page", "screen", "track"], "supportedSourceTypes": [ "android", "ios", @@ -1377,12 +1372,7 @@ "includeKeys": [], "saveDestinationResponse": true, "secretKeys": [], - "supportedMessageTypes": [ - "identify", - "page", - "screen", - "track" - ], + "supportedMessageTypes": ["identify", "page", "screen", "track"], "supportedSourceTypes": [ "android", "ios", @@ -1618,11 +1608,7 @@ "name": "Monopoly: 3rd Edition", "price": "19", "position": "1", - "category": [ - "bikes", - "cars", - "motors" - ], + "category": ["bikes", "cars", "motors"], "url": "https://www.example.com/product/path", "image_url": "https://www.example.com/product/path.jpg", "quantity": "2" @@ -1634,11 +1620,7 @@ "price": "192", "quantity": 22, "position": "12", - "category": [ - "Bikes2", - "cars2", - "motors2" - ], + "category": ["Bikes2", "cars2", "motors2"], "url": "https://www.example.com/product/path2", "image_url": "https://www.example.com/product/path.jpg2" } @@ -1807,5 +1789,64 @@ }, "Enabled": true } + }, + { + "destination": { + "Config": { + "passcode": "fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1", + "accountId": "476550467", + "trackAnonymous": true, + "enableObjectIdMapping": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "traits": { + "email": "sayan@gmail.com" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "event": "order completed", + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "product_id": 1234, + "name": "Shoes", + "price": 45, + "quantity": 1, + "orderId": 10000, + "total": "1000", + "campaignId": "123456", + "templateId": "1213458" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + } } -] \ No newline at end of file +] diff --git a/test/__tests__/data/iterable_output.json b/test/__tests__/data/iterable_output.json index d0088a2bed..768d78d767 100644 --- a/test/__tests__/data/iterable_output.json +++ b/test/__tests__/data/iterable_output.json @@ -979,46 +979,94 @@ }, "files": {} }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.iterable.com/api/commerce/updateCart", - "headers": { - "Content-Type": "application/json", - "api_key": "12345" + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.iterable.com/api/commerce/updateCart", + "headers": { + "Content-Type": "application/json", + "api_key": "12345" + }, + "params": {}, + "body": { + "JSON": { + "user": { + "email": "sayan@gmail.com", + "dataFields": { + "email": "sayan@gmail.com" + }, + "userId": "12345", + "preferUserId": true, + "mergeNestedObjects": true + }, + "items": [ + { + "id": "507f1f77bcf86cd7994390112", + "sku": "45790-322", + "name": "Monopoly: 3rd Edition2", + "categories": ["Cars2"], + "price": 192, + "quantity": 22, + "imageUrl": "https://www.example.com/product/path.jpg2", + "url": "https://www.example.com/product/path2" + } + ] }, - "params": {}, - "body": { - "JSON": { - "user": { - "email": "sayan@gmail.com", - "dataFields": { - "email": "sayan@gmail.com" - }, - "userId": "12345", - "preferUserId": true, - "mergeNestedObjects": true + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.iterable.com/api/commerce/trackPurchase", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "dataFields": { + "product_id": 1234, + "name": "Shoes", + "price": 45, + "quantity": 1, + "orderId": 10000, + "total": "1000", + "campaignId": "123456", + "templateId": "1213458" + }, + "id": "10000", + "createdAt": 1571051718299, + "campaignId": 123456, + "templateId": 1213458, + "total": 1000, + "user": { + "email": "sayan@gmail.com", + "dataFields": { + "email": "sayan@gmail.com" }, - "items": [ - { - "id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "categories": [ - "Cars2" - ], - "price": 192, - "quantity": 22, - "imageUrl": "https://www.example.com/product/path.jpg2", - "url": "https://www.example.com/product/path2" - } - ] + "userId": "12345", + "preferUserId": true, + "mergeNestedObjects": true }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} + "items": [ + { + "id": 1234, + "name": "Shoes", + "price": 45, + "quantity": 1 + } + ] }, - "files": {} - } + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } ] diff --git a/test/__tests__/data/iterable_router_input.json b/test/__tests__/data/iterable_router_input.json index 76ade84d16..a16a08a08e 100644 --- a/test/__tests__/data/iterable_router_input.json +++ b/test/__tests__/data/iterable_router_input.json @@ -257,6 +257,9 @@ "task_id": "tt_10_rows_check", "task_run_id": "c5tar6cqgmgmcjvupdi0", "version": "release.v1.6.8" + }, + "device": { + "token": 54321 } }, "messageId": "2f052f7c-f694-4849-a7ed-a432f7ffa0a4", diff --git a/test/__tests__/data/iterable_router_output.json b/test/__tests__/data/iterable_router_output.json index 31a33f61f4..681395cd58 100644 --- a/test/__tests__/data/iterable_router_output.json +++ b/test/__tests__/data/iterable_router_output.json @@ -53,61 +53,39 @@ "others": [ { "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.iterable.com/api/users/bulkUpdate", + "headers": { + "Content-Type": "application/json", + "api_key": "62d12498c37c4fd8a1a546c2d35c2f60" + }, + "params": {}, "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, "JSON": { "users": [ { "email": "manashi@website.com", - "userId": "abcdeeeeeeeexxxx102", "dataFields": { "city": "Bangalore", "name": "manashi", "email": "manashi@website.com", "country": "India" }, - "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", + "userId": "abcdeeeeeeeexxxx102", "preferUserId": true, "mergeNestedObjects": true } ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "api_key": "62d12498c37c4fd8a1a546c2d35c2f60", - "Content-Type": "application/json" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, - "version": "1", - "endpoint": "https://api.iterable.com/api/users/bulkUpdate" + "files": {} }, - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 5 - } - ], + "metadata": [{ "jobId": 3 }], "batched": true, "statusCode": 200, "destination": { @@ -122,23 +100,28 @@ } }, { - "batched": true, "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.iterable.com/api/events/trackBulk", + "headers": { + "Content-Type": "application/json", + "api_key": "62d12498c37c4fd8a1a546c2d35c2f60" + }, + "params": {}, "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, "JSON": { "events": [ { - "userId": "abcdeeeeeeeexxxx102", - "createdAt": 1598631966468, - "eventName": "Email Opened", "dataFields": { "subject": "resume validate", "sendtime": "2020-01-01", "sendlocation": "akashdeep@gmail.com" - } + }, + "userId": "abcdeeeeeeeexxxx102", + "eventName": "Email Opened", + "createdAt": 1598631966468 }, { "email": "sayan@gmail.com", @@ -155,40 +138,25 @@ "createdAt": 1571051718299 }, { - "createdAt": 1598631966468, "dataFields": { - "referrer": "https://google.com", + "url": "https://dominos.com", "title": "Pizza", - "url": "https://dominos.com" + "referrer": "https://google.com" }, - "eventName": "undefined page", - "userId": "abcdeeeeeeeexxxx102" + "userId": "abcdeeeeeeeexxxx102", + "createdAt": 1598631966468, + "eventName": "undefined page" } ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "api_key": "62d12498c37c4fd8a1a546c2d35c2f60" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, - "version": "1", - "endpoint": "https://api.iterable.com/api/events/trackBulk" + "files": {} }, - "metadata": [ - { - "jobId": 2 - }, - { - "jobId": 4 - }, - { - "jobId": 7 - } - ], + "metadata": [{ "jobId": 2 }, { "jobId": 4 }, { "jobId": 7 }], + "batched": true, "statusCode": 200, "destination": { "Config": { @@ -201,6 +169,113 @@ "Enabled": true } }, + { + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.iterable.com/api/users/update", + "headers": { "Content-Type": "application/json", "api_key": "12345" }, + "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 + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.iterable.com/api/users/registerDeviceToken", + "headers": { "Content-Type": "application/json", "api_key": "12345" }, + "params": {}, + "body": { + "JSON": { + "email": "lynnanderson@smith.net", + "userId": "lynnanderson@smith.net", + "device": { "token": 54321, "platform": "GCM" }, + "preferUserId": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ], + "metadata": { "jobId": 5 }, + "batched": false, + "statusCode": 200, + "destination": { + "ID": "1zia9wKshXt80YksLmUdJnr7IHI", + "Name": "test_iterable", + "DestinationDefinition": { + "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", + "Name": "ITERABLE", + "DisplayName": "Iterable", + "Config": { + "destConfig": { + "defaultConfig": [ + "apiKey", + "mapToSingleEvent", + "trackAllPages", + "trackCategorisedPages", + "trackNamedPages" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": [], + "supportedMessageTypes": ["identify", "page", "screen", "track"], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "warehouse", + "reactnative", + "flutter", + "cordova" + ], + "supportsVisualMapper": true, + "transformAt": "processor", + "transformAtV1": "processor" + }, + "ResponseRules": null + }, + "Config": { + "apiKey": "12345", + "mapToSingleEvent": true, + "trackAllPages": false, + "trackCategorisedPages": true, + "trackNamedPages": true + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + }, { "batchedRequest": { "version": "1", @@ -216,9 +291,7 @@ "JSON": { "user": { "email": "sayan@gmail.com", - "dataFields": { - "email": "sayan@gmail.com" - }, + "dataFields": { "email": "sayan@gmail.com" }, "userId": "12345", "preferUserId": true, "mergeNestedObjects": true @@ -246,17 +319,13 @@ } ] }, - "XML": {}, "JSON_ARRAY": {}, + "XML": {}, "FORM": {} }, "files": {} }, - "metadata": [ - { - "jobId": 6 - } - ], + "metadata": [{ "jobId": 6 }], "batched": false, "statusCode": 200, "destination": { @@ -282,21 +351,14 @@ }, "params": {}, "body": { - "JSON": { - "currentEmail": "old@email.com", - "newEmail": "new@email.com" - }, + "JSON": { "currentEmail": "old@email.com", "newEmail": "new@email.com" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {} }, - "metadata": [ - { - "jobId": 8 - } - ], + "metadata": [{ "jobId": 8 }], "batched": false, "statusCode": 200, "destination": { diff --git a/test/__tests__/data/tiktok_ads_router_output.json b/test/__tests__/data/tiktok_ads_router_output.json index 12e5a686cb..f07c723d93 100644 --- a/test/__tests__/data/tiktok_ads_router_output.json +++ b/test/__tests__/data/tiktok_ads_router_output.json @@ -209,65 +209,67 @@ }, { "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "ip": "13.57.97.131", - "page": { - "referrer": "http://demo.mywebsite.com", - "url": "http://demo.mywebsite.com/purchase" + "batchedRequest": [ + { + "body": { + "FORM": {}, + "JSON": { + "context": { + "ad": { + "callback": "123ATXSfe" + }, + "ip": "13.57.97.131", + "page": { + "referrer": "http://demo.mywebsite.com", + "url": "http://demo.mywebsite.com/purchase" + }, + "user": { + "external_id": "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", + "phone_number": "4443dd476f2be18201447ef046731c1a715accee4edc5192641a3b4c3ba921c7", + "email": "774efc08cebab8c50c0f0eb2d3a2d2e560872a64f6c1617314c4f03b1c3d4dfa" + }, + "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" }, - "user": { - "external_id": "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4", - "phone_number": "4443dd476f2be18201447ef046731c1a715accee4edc5192641a3b4c3ba921c7", - "email": "774efc08cebab8c50c0f0eb2d3a2d2e560872a64f6c1617314c4f03b1c3d4dfa" + "event": "AddToWishlist", + "event_id": "1616318632825_357", + "pixel_code": "A1T8T4UYGVIQA8ORZMX9", + "partner_name": "RudderStack", + "properties": { + "contents": [ + { + "content_id": "1077218", + "content_type": "socks", + "price": 8, + "quantity": 2 + }, + { + "content_id": "1197218", + "content_type": "dress", + "price": 30, + "quantity": 1 + } + ], + "currency": "USD", + "value": 46 }, - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "event": "AddToWishlist", - "event_id": "1616318632825_357", - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "partner_name": "RudderStack", - "properties": { - "contents": [ - { - "content_id": "1077218", - "content_type": "socks", - "price": 8, - "quantity": 2 - }, - { - "content_id": "1197218", - "content_type": "dress", - "price": 30, - "quantity": 1 - } - ], - "currency": "USD", - "value": 46 + "test_event_code": "sample rudder test_event_code", + "timestamp": "2020-09-17T19:49:27Z" }, - "test_event_code": "sample rudder test_event_code", - "timestamp": "2020-09-17T19:49:27Z" + "JSON_ARRAY": {}, + "XML": {} }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://business-api.tiktok.com/open_api/v1.2/pixel/track/", - "files": {}, - "headers": { - "Access-Token": "1234ac663758946dfea3520b394bbac511b371f7", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, + "endpoint": "https://business-api.tiktok.com/open_api/v1.2/pixel/track/", + "files": {}, + "headers": { + "Access-Token": "1234ac663758946dfea3520b394bbac511b371f7", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + } + ], "destination": { "Config": { "accessToken": "1234ac663758946dfea3520b394bbac511b371f7", diff --git a/test/__tests__/google_adwords_offline_conversions.test.js b/test/__tests__/google_adwords_offline_conversions.test.js index 61af86d9c9..b1a0e9c6fb 100644 --- a/test/__tests__/google_adwords_offline_conversions.test.js +++ b/test/__tests__/google_adwords_offline_conversions.test.js @@ -5,7 +5,10 @@ const moment = require("moment"); const fs = require("fs"); const path = require("path"); const version = "v0"; - +const responseFile = fs.readFileSync( + path.resolve(__dirname, `../__mocks__/data/google_adwords_offline_conversion/response.json`) +); +// fs.readFileSync("/Users/apple/Desktop/workspace/rudder-transformer/test//data/google_adwords_offline_conversion/response.json"); const axios = require("axios"); const { handleProxyRequest } = require("../../src/versionedRouter"); @@ -140,6 +143,67 @@ axios.post = jest.fn(async (url, data, reqConfig) => { ], status: 401 }; + } else if ( + url.includes( + "https://googleads.googleapis.com/v13/customers/1112223333/googleAds:searchStream" + ) || + url.includes( + "https://googleads.googleapis.com/v13/customers/111-222-3333/googleAds:searchStream" + ) || url.includes( + "https://googleads.googleapis.com/v13/customers/customer-id/googleAds:searchStream" + ) + ) { + // this is for store case + if (data.query.includes("conversion_action")) { + // searchStream for conversion_action + axiosResponse = { + data: [ + { + results: [ + { + conversionAction: { + resourceName: + "customers/111-222-3333/offlineUserDataJobs/conversion_id", + id: "848898416" + } + } + ], + fieldMask: "conversionAction.id", + requestId: "pNnCTCWGP9XOyy3Hmj7yGA" + } + ], + status: 200 + }; + } else if (data.query.includes("conversion_custom_variable")) { + // searchStream for conversion_custom_variable + axiosResponse = { + data: [ + { + results: [ + { + conversionCustomVariable: { + resourceName: + "customers/1234567891/conversionCustomVariables/19131634", + name: "revenue" + } + }, + { + conversionCustomVariable: { + resourceName: + "customers/1234567891/conversionCustomVariables/19134061", + name: "page_value" + } + } + ] + } + ], + status: 200 + }; + } + } else { + // These cases are taken from response.json + const data = JSON.parse(responseFile); + axiosResponse = data[url]; } return axiosResponse; diff --git a/test/integrations/destinations/Mautic/processor/data.js b/test/integrations/destinations/Mautic/processor/data.js new file mode 100644 index 0000000000..abfe39767f --- /dev/null +++ b/test/integrations/destinations/Mautic/processor/data.js @@ -0,0 +1,1006 @@ +const data = [ + { + "name": "mautic", + "description": "Sub-Domain Not given and Domain Field is given, domainMethod is domainNameOption", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { "anonymousId": "anon-id-new", "context": { "library": { "name": "http" } }, "traits": { "address": { "addressLine1": "abcde", "addressLine2": "fghjikld", "area": "Model Town", "city": "Bareilly" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { + "Config": { + "lookUpField": "email", + "password": "abcdefghij1234", + "subDomainName": "", + "domainMethod": "domainNameOption", + "domainName": "https://testmautic.com", + "userName": "abcdef@gmail.com" + } + } + }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://testmautic.com/api/contacts/new", "headers": { "Content-Type": "application/json", "Authorization": "Basic YWJjZGVmQGdtYWlsLmNvbTphYmNkZWZnaGlqMTIzNA==" }, "params": {}, "body": { "JSON": { "city": "Bareilly", "address1": "abcde", "address2": "fghjikld" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, + { + "name": "mautic", + "description": "Both Sub-Domain and Domain Field are given, domainMethod is subDomainNameOption", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { "anonymousId": "anon-id-new", "context": { "library": { "name": "http" } }, "traits": { "address": { "addressLine1": "abcde", "addressLine2": "fghjikld", "area": "Model Town", "city": "Bareilly" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { + "Config": { + "lookUpField": "email", + "password": "abcdefghij1234", + "subDomainName": "test", + "domainMethod": "subDomainNameOption", + "domainName": "https://testmautic.com/", + "userName": "abcdef@gmail.com" + } + } + }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://test.mautic.net/api/contacts/new", "headers": { "Content-Type": "application/json", "Authorization": "Basic YWJjZGVmQGdtYWlsLmNvbTphYmNkZWZnaGlqMTIzNA==" }, "params": {}, "body": { "JSON": { "city": "Bareilly", "address1": "abcde", "address2": "fghjikld" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, + { + "name": "mautic", + "description": "Both Sub-Domain and Domain Field are given, domainMethod is domainNameOption", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { "anonymousId": "anon-id-new", "context": { "library": { "name": "http" } }, "traits": { "address": { "addressLine1": "abcde", "addressLine2": "fghjikld", "area": "Model Town", "city": "Bareilly" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { + "Config": { + "lookUpField": "email", + "password": "abcdefghij1234", + "subDomainName": "test", + "domainMethod": "domainNameOption", + "domainName": "https://testmautic.com", + "userName": "abcdef@gmail.com" + } + } + }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://testmautic.com/api/contacts/new", "headers": { "Content-Type": "application/json", "Authorization": "Basic YWJjZGVmQGdtYWlsLmNvbTphYmNkZWZnaGlqMTIzNA==" }, "params": {}, "body": { "JSON": { "city": "Bareilly", "address1": "abcde", "address2": "fghjikld" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, + { + "name": "mautic", + "description": "Password Not Provided for Authentication", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "anon-id-new", + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + }, + "traits": { + "firstName": "Anant", + "lastName": "jain" + } + }, + "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", + "originalTimestamp": "2020-02-02T00:23:09.544Z", + "receivedAt": "2022-08-17T10:40:21.162+05:30", + "request_ip": "[::1]", + "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", + "sentAt": "2022-08-17T10:40:21.728+05:30", + "timestamp": "2020-02-02T05:53:08.977+05:30", + "type": "identify", + "userId": "identified user id" + }, + "destination": { + "Config": { + "lookUpField": "email", + "password": "", + "subDomainName": "testapi3", + "userName": "abcdef@gmail.com" + } + } + } + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } }, + "error": "Invalid password value specified in the destination configuration", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, + { + "name": "mautic", + "description": "Empty Sub-Domain and Domain Field", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "anon-id-new", + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + }, + "traits": { + "firstName": "Anant", + "lastName": "jain" + } + }, + "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", + "originalTimestamp": "2020-02-02T00:23:09.544Z", + "receivedAt": "2022-08-17T10:40:21.162+05:30", + "request_ip": "[::1]", + "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", + "sentAt": "2022-08-17T10:40:21.728+05:30", + "timestamp": "2020-02-02T05:53:08.977+05:30", + "type": "identify", + "userId": "identified user id" + }, + "destination": { + "Config": { + "lookUpField": "email", + "password": "abcdefghij1234", + "subDomainName": "", + "domainName": "", + "userName": "opiogfuebj" + } + } + } + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234","domainName": "", "subDomainName": "", "userName": "opiogfuebj" } }, + "error": "Please Provide either subDomain or Domain Name", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": "Create a new Contact with address as String", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "firstName": "Anant", "lastName": "jain", "role": "Manager", "address": "Flat No 58 ABC building XYZ Area near PQRS , 354408", "hasPurchased": "yes", "email": "abc@xyz.com", "title": "Mr", "phone": "9876543212", "state": "Uttar Pradesh", "zipcode": "243001", "prospectOrCustomer": "Prospect", "country": "India", "website": "abc.com", "subscriptionStatus": "New" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "type": "identify", "userId": "identified user id" }, "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "ruddertest2", "userName": "anantjain45823@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://ruddertest2.mautic.net/api/contacts/new", "headers": { "Content-Type": "application/json", "Authorization": "Basic YW5hbnRqYWluNDU4MjNAZ21haWwuY29tOm0zZEczMjVDNTFDMVJQcQ==" }, "params": {}, "body": { "JSON": { "email": "abc@xyz.com", "title": "Mr", "firstname": "Anant", "lastname": "jain", "phone": "9876543212", "website": "abc.com", "state": "Uttar Pradesh", "zipcode": "243001", "ipAddress": "14.5.67.21", "last_active": "2020-02-02T00:23:09.544Z", "country": "India", "haspurchased": "yes", "role": "Manager", "subscription_status": "New", "prospect_or_customer": "Prospect", "address1": "Flat No 58 ABC building XYZ Area near PQRS , 354408", "address2": "" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, { + "name": "mautic", + "description": "Update an existing Contact", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "firstName": "Anant", "lastName": "jain", "role": "Manager", "address": "Flat No 58 ABC building XYZ Area near PQRS , 354408", "hasPurchased": "yes", "email": "hijibi@gmail.com", "title": "Mr", "phone": "9876543212", "state": "Uttar Pradesh", "zipcode": "243001", "prospectOrCustomer": "Prospect", "country": "India", "website": "abc.com", "subscriptionStatus": "New" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "type": "identify", "userId": "identified user id" }, "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "ruddertest2", "userName": "anantjain45823@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "PATCH", "endpoint": "https://ruddertest2.mautic.net/api/contacts/247/edit", "headers": { "Content-Type": "application/json", "Authorization": "Basic YW5hbnRqYWluNDU4MjNAZ21haWwuY29tOm0zZEczMjVDNTFDMVJQcQ==" }, "params": {}, "body": { "JSON": { "email": "hijibi@gmail.com", "title": "Mr", "last_active": "2020-02-02T00:23:09.544Z", "firstname": "Anant", "lastname": "jain", "phone": "9876543212", "website": "abc.com", "state": "Uttar Pradesh", "zipcode": "243001", "ipAddress": "14.5.67.21", "country": "India", "haspurchased": "yes", "role": "Manager", "subscription_status": "New", "prospect_or_customer": "Prospect", "address1": "Flat No 58 ABC building XYZ Area near PQRS , 354408", "address2": "" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, { + "name": "mautic", + "description": "Invalid userName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "firstName": "Anant", "lastName": "jain", "role": "Manager", "address": "Flat No 58 ABC building XYZ Area near PQRS , 354408", "hasPurchased": "yes", "email": "abc@xyz.com", "title": "Mr", "phone": "9876543212", "state": "Uttar Pradesh", "zipcode": "243001", "prospectOrCustomer": "Prospect", "country": "India", "website": "abc.com", "subscriptionStatus": "New" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "type": "identify", "userId": "identified user id" }, "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "" } }, + "error": "Invalid userName value specified in the destination configuration", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": "Password Not Provided for Authentication", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "firstName": "Anant", "lastName": "jain" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "type": "identify", "userId": "identified user id" }, "destination": { "Config": { "lookUpField": "email", "password": "", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } }, + "error": "Invalid password value specified in the destination configuration", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": "Empty Sub-Domain Field ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "firstName": "Anant", "lastName": "jain", "role": "Manager", "address": "Flat No 58 ABC building XYZ Area near PQRS , 354408", "hasPurchased": "yes", "email": "abc@xyz.com", "title": "Mr", "phone": "9876543212", "state": "Uttar Pradesh", "zipcode": "243001", "prospectOrCustomer": "Prospect", "country": "India", "website": "abc.com", "subscriptionStatus": "New" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "type": "identify", "userId": "identified user id" }, "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "", "userName": "abcdef@gmail.com" } }, + "error": "Please Provide either subDomain or Domain Name", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Message type not given", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "state": "uttar pradesh" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id" }, "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } }, + "error": "Event type is required", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Message type not supported", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "state": "uttar pradesh" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "Alias" }, "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } }, + "error": "Event type \"alias\" is not supported", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": "Invalid Title", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "title": "jhdv11" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } }, + "error": "Invalid entry for key title", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": "Invalid Phone No. ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "phone": "765798" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } }, + "error": "The provided phone number is invalid", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Invalid hasPurchased", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "hasPurchased": "Mightbe" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } }, + "error": "Invalid entry for key haspurchased", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Invalid role", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "role": "Xyz" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } }, + "error": "Invalid entry for key role", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Invalid subscriptionStatus", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "subscriptionStatus": "NA" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } }, + "error": "Invalid entry for key subscription_status", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Invalid email", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "email": "abc123" } }, "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } }, + "error": "The provided email is invalid", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Invalid POC", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "ip": "14.5.67.21", "library": { "name": "http" }, "traits": { "prospectOrCustomer": "random" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "email", "password": "m3dG325C51C1RPq", "subDomainName": "testapi3", "userName": "anantjain45823@gmail.com" } }, + "error": "Invalid entry for key prospect_or_customer", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Address as object and city included in it and state Conversion ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "library": { "name": "http" } }, "traits": { "address": { "area": "Model Town", "city": "Bareilly" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://testapi3.mautic.net/api/contacts/new", "headers": { "Content-Type": "application/json", "Authorization": "Basic YWJjZGVmQGdtYWlsLmNvbTphYmNkZWZnaGlqMTIzNA==" }, "params": {}, "body": { "JSON": { "city": "Bareilly", "address1": "Model Town Bareilly ", "address2": "" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, { + "name": "mautic", + "description": " Address as object with adress line 1, line 2 and city included in it ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "library": { "name": "http" } }, "traits": { "address": { "addressLine1": "abcde", "addressLine2": "fghjikld", "area": "Model Town", "city": "Bareilly" } }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "abcdefghij1234", "subDomainName": "testapi3", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://testapi3.mautic.net/api/contacts/new", "headers": { "Content-Type": "application/json", "Authorization": "Basic YWJjZGVmQGdtYWlsLmNvbTphYmNkZWZnaGlqMTIzNA==" }, "params": {}, "body": { "JSON": { "city": "Bareilly", "address1": "abcde", "address2": "fghjikld" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, { + "name": "mautic", + "description": " Update contact with contactId inside externalId ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "anonymousId": "anon-id-new", "context": { "externalId": [{ "type": "mauticContactId", "id": "246" }] }, "traits": { "firstName": "Anant", "role": "Manager" }, "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", "originalTimestamp": "2020-02-02T00:23:09.544Z", "receivedAt": "2022-08-17T10:40:21.162+05:30", "request_ip": "[::1]", "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", "sentAt": "2022-08-17T10:40:21.728+05:30", "timestamp": "2020-02-02T05:53:08.977+05:30", "userId": "identified user id", "type": "identify" }, "destination": { "Config": { "lookUpField": "email", "password": "zzlOylGKJRKVr87", "subDomainName": "testapi5", "userName": "anant45823jain@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "PATCH", "endpoint": "https://testapi5.mautic.net/api/contacts/246/edit", "headers": { "Content-Type": "application/json", "Authorization": "Basic YW5hbnQ0NTgyM2phaW5AZ21haWwuY29tOnp6bE95bEdLSlJLVnI4Nw==" }, "params": {}, "body": { "JSON": { "last_active": "2020-02-02T00:23:09.544Z", "firstname": "Anant", "role": "Manager" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, { + "name": "mautic", + "description": " Group Id not given ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "userId": "user123", "context": { "externalId": [{ "type": "mauticContactId", "id": "246" }] }, "traits": { "type": "Segments" }, "type": "group" }, "destination": { "Config": { "lookUpField": "lastName", "password": "zzlOylGKJRKVr87", "subDomainName": "testapi5", "userName": "anant45823jain@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "lastName", "password": "zzlOylGKJRKVr87", "subDomainName": "testapi5", "userName": "anant45823jain@gmail.com" } }, + "error": "`groupId` is missing in the event", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": "Remove contact with segment with ConatctId given inside externalId and operation given as remove", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "userId": "user123", "groupId": "17", "context": { "externalId": [{ "type": "mauticContactId", "id": "246" }] }, "traits": { "lastName": "garwal", "type": "Segments", "operation": "remove" }, "type": "group" }, "destination": { "Config": { "lookUpField": "lastName", "password": "zzlOylGKJRKVr87", "subDomainName": "testapi5", "userName": "anant45823jain@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://testapi5.mautic.net/api/segments/17/contact/246/remove", "headers": { "Content-Type": "application/json", "Authorization": "Basic YW5hbnQ0NTgyM2phaW5AZ21haWwuY29tOnp6bE95bEdLSlJLVnI4Nw==" }, "params": {}, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, { + "name": "mautic", + "description": "Group contact with segment with contactId inside externalId with operation givenn as add", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "userId": "user123", "groupId": "17", "context": { "externalId": [{ "type": "mauticContactId", "id": "246" }] }, "traits": { "type": "Segments" }, "type": "group" }, "destination": { "Config": { "lookUpField": "lastName", "password": "zzlOylGKJRKVr87", "subDomainName": "testapi5", "userName": "anant45823jain@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://testapi5.mautic.net/api/segments/17/contact/246/add", "headers": { "Content-Type": "application/json", "Authorization": "Basic YW5hbnQ0NTgyM2phaW5AZ21haWwuY29tOnp6bE95bEdLSlJLVnI4Nw==" }, "params": {}, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, { + "name": "mautic", + "description": " Group type not given ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "userId": "user123", "context": { "externalId": [{ "type": "mauticContactId", "id": "246" }] }, "traits": {}, "type": "group" }, "destination": { "Config": { "lookUpField": "lastName", "password": "abcdefghij1234", "subDomainName": "testapi5", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "lastName", "password": "abcdefghij1234", "subDomainName": "testapi5", "userName": "abcdef@gmail.com" } }, + "error": "`type` is missing in the traits", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " Group type not supported ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "userId": "user123", "groupId": "17", "context": { "externalId": [{ "type": "mauticContactId", "id": "246" }] }, "traits": { "type": "Alias" }, "type": "group" }, "destination": { "Config": { "lookUpField": "lastName", "password": "abcdefghij1234", "subDomainName": "testapi5", "userName": "abcdef@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "lastName", "password": "abcdefghij1234", "subDomainName": "testapi5", "userName": "abcdef@gmail.com" } }, + "error": "Grouping type \"alias\" is not supported. Only \"Segments\", \"Companies\", and \"Campaigns\" are supported", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": "Group contact with Company without contactId inside externalId ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "userId": "user123", "groupId": "20", "context": { "traits": { "email": "hijibi@gmail.com" } }, "traits": { "type": "Companies" }, "type": "group" }, "destination": { "Config": { "lookUpField": "email", "password": "zzlOylGKJRKVr87", "subDomainName": "ruddertest2", "userName": "anant45823jain@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://ruddertest2.mautic.net/api/companies/20/contact/247/add", "headers": { "Content-Type": "application/json", "Authorization": "Basic YW5hbnQ0NTgyM2phaW5AZ21haWwuY29tOnp6bE95bEdLSlJLVnI4Nw==" }, "params": {}, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } + }, { + "name": "mautic", + "description": " Group contact with campaign with contactId found by lookUpField with no operation field", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "userId": "user123", "groupId": "20", "traits": { "lastName": "kumar", "type": "Campaigns" }, "type": "group" }, "destination": { "Config": { "lookUpField": "lastName", "password": "zzlOylGKJRKVr87", "subDomainName": "ruddertest2", "userName": "anant45823jain@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "lastName", "password": "zzlOylGKJRKVr87", "subDomainName": "ruddertest2", "userName": "anant45823jain@gmail.com" } }, + "error": "Found more than one contact on lookup", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }, { + "name": "mautic", + "description": " No contact found for lookup field and email to group ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "userId": "user123", "groupId": "20", "traits": { "lastName": "Singh", "type": "Campaigns" }, "type": "group" }, "destination": { "Config": { "lookUpField": "lastName", "password": "zzlOylGKJRKVr87", "subDomainName": "ruddertest2", "userName": "anant45823jain@gmail.com" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "lookUpField": "lastName", "password": "zzlOylGKJRKVr87", "subDomainName": "ruddertest2", "userName": "anant45823jain@gmail.com" } }, + "error": "Could not find any contact ID on lookup", "statTags": { + "destType": "MAUTIC", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }]; module.exports = { + data + } \ No newline at end of file diff --git a/test/integrations/destinations/Mautic/router/data.js b/test/integrations/destinations/Mautic/router/data.js new file mode 100644 index 0000000000..8a2d6d0ae3 --- /dev/null +++ b/test/integrations/destinations/Mautic/router/data.js @@ -0,0 +1,328 @@ +const data = [ + { + "name": "mautic", + "description": "Successfull Identify Call with all traits", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "anonymousId": "anon-id-new", + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + }, + "traits": { + "firstName": "Anant", + "lastName": "jain", + "role": "Manager", + "address": "Flat No 58 ABC building XYZ Area near PQRS , 354408", + "hasPurchased": "yes", + "email": "abc@xyz.com", + "title": "Mr", + "phone": "9876543212", + "state": "Uttar Pradesh", + "zipcode": "243001", + "prospectOrCustomer": "Prospect", + "country": "India", + "website": "abc.com", + "subscriptionStatus": "New" + } + }, + "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", + "originalTimestamp": "2020-02-02T00:23:09.544Z", + "receivedAt": "2022-08-17T10:40:21.162+05:30", + "request_ip": "[::1]", + "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", + "sentAt": "2022-08-17T10:40:21.728+05:30", + "timestamp": "2020-02-02T05:53:08.977+05:30", + "type": "identify", + "userId": "identified user id" + }, + "destination": { + "Config": { + "lookUpField": "email", + "password": "m3dG325C51C1RPq", + "subDomainName": "ruddertest2", + "userName": "anantjain45823@gmail.com" + } + }, + "metadata": { + "jobId": 1 + } + }] + , "destType": "mautic" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "userId": "", + "type": "REST", + "method": "POST", + "endpoint": "https://ruddertest2.mautic.net/api/contacts/new", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic YW5hbnRqYWluNDU4MjNAZ21haWwuY29tOm0zZEczMjVDNTFDMVJQcQ==" + }, + "params": {}, + "body": { + "JSON": { + "email": "abc@xyz.com", + "title": "Mr", + "firstname": "Anant", + "lastname": "jain", + "phone": "9876543212", + "website": "abc.com", + "state": "Uttar Pradesh", + "zipcode": "243001", + "ipAddress": "14.5.67.21", + "last_active": "2020-02-02T00:23:09.544Z", + "country": "India", + "haspurchased": "yes", + "role": "Manager", + "subscription_status": "New", + "prospect_or_customer": "Prospect", + "address1": "Flat No 58 ABC building XYZ Area near PQRS , 354408", + "address2": "" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "lookUpField": "email", + "password": "m3dG325C51C1RPq", + "subDomainName": "ruddertest2", + "userName": "anantjain45823@gmail.com" + } + } + } + ] + } + } + } + }, + { + "name": "mautic", + "description": "Invalid user name provided in the destination configuration", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "anonymousId": "anon-id-new", + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + }, + "traits": { + "firstName": "Anant", + "lastName": "jain", + "role": "Manager", + "address": "Flat No 58 ABC building XYZ Area near PQRS , 354408", + "hasPurchased": "yes", + "email": "abc@xyz.com", + "title": "Mr", + "phone": "9876543212", + "state": "Uttar Pradesh", + "zipcode": "243001", + "prospectOrCustomer": "Prospect", + "country": "India", + "website": "abc.com", + "subscriptionStatus": "New" + } + }, + "messageId": "25ea6605-c788-4cab-8fed-2cf0b831c4a8", + "originalTimestamp": "2020-02-02T00:23:09.544Z", + "receivedAt": "2022-08-17T10:40:21.162+05:30", + "request_ip": "[::1]", + "rudderId": "daf823fb-e8d3-413a-8313-d34cd756f968", + "sentAt": "2022-08-17T10:40:21.728+05:30", + "timestamp": "2020-02-02T05:53:08.977+05:30", + "type": "identify", + "userId": "identified user id" + }, + "destination": { + "Config": { + "lookUpField": "email", + "password": "abcdefghij1234", + "subDomainName": "", + "domainName": "", + "userName": "abcdef" + } + }, + "metadata": { + "jobId": 2 + } + }] + , "destType": "mautic" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "metadata": [ + { + "jobId": 2 + } + ], + "statTags": { + "errorCategory": "dataValidation", + "errorType": "configuration", + "destType": "MAUTIC", + "feature": "router", + "implementation": "native", + "module": "destination" + }, + "destination": { + "Config": { + "domainName": "", + "lookUpField": "email", + "password": "abcdefghij1234", + "subDomainName": "", + "userName": "abcdef" + } + }, + "batched": false, + "statusCode": 400, + "error": "Please Provide either subDomain or Domain Name" + } + ] + } + } + } + }, + { + "name": "mautic", + "description": "Successfull Segment Group Call", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "userId": "user123", + "groupId": "17", + "context": { + "externalId": [ + { + "type": "mauticContactId", + "id": "246" + } + ] + }, + "traits": { + "type": "Segments" + }, + "type": "group" + }, + "destination": { + "Config": { + "lookUpField": "lastName", + "password": "m3dG325C51C1RPq", + "subDomainName": "ruddertest2", + "userName": "anantjain45823@gmail.com" + } + }, + "metadata": { + "jobId": 3 + } + }] + , "destType": "mautic" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "userId": "", + "endpoint": "https://ruddertest2.mautic.net/api/segments/17/contact/246/add", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic YW5hbnRqYWluNDU4MjNAZ21haWwuY29tOm0zZEczMjVDNTFDMVJQcQ==" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 3 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "lookUpField": "lastName", + "password": "m3dG325C51C1RPq", + "subDomainName": "ruddertest2", + "userName": "anantjain45823@gmail.com" + } + } + } + ] + } + } + } + }, +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/active_campaign/processor/data.js b/test/integrations/destinations/active_campaign/processor/data.js new file mode 100644 index 0000000000..df17a42bcc --- /dev/null +++ b/test/integrations/destinations/active_campaign/processor/data.js @@ -0,0 +1,697 @@ +const data = [ + { + name: 'active_campaign', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + userId: '123456', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + firstName: 'James', + lastName: 'Doe', + phone: '92374162212', + tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + fieldInfo: { + Office: 'Trastkiv', + Country: 'Russia', + Likes: ['Potato', 'Onion'], + Random: 'random', + }, + lists: [ + { id: 2, status: 'subscribe' }, + { id: 3, status: 'unsubscribe' }, + { id: 3, status: 'unsubscribexyz' }, + ], + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://active.campaigns.rudder.com/api/3/contact/sync', + headers: { + 'Content-Type': 'application/json', + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + }, + params: {}, + body: { + JSON: { + contact: { + email: 'jamesDoe@gmail.com', + phone: '92374162212', + firstName: 'James', + lastName: 'Doe', + fieldValues: [ + { field: '0', value: 'Trastkiv' }, + { field: '1', value: 'Russia' }, + { field: '3', value: '||Potato||Onion||' }, + { field: '4', value: 'random' }, + ], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'active_campaign', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + page: { referring_domain: 'https://www.rudderlabs.com' }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'jamesDoe@gmail.com', anonymousId: '12345' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + name: 'ApplicationLoaded', + path: '/test', + referrer: 'Rudder', + search: 'abc', + title: 'Test Page', + url: 'https://www.rudderlabs.com', + }, + integrations: { All: true }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + JSON: { siteTrackingDomain: { name: 'rudderlabs.com' } }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://active.campaigns.rudder.com/api/3/siteTrackingDomains', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'active_campaign', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'jamesDoe@gmail.com', anonymousId: '12345' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + name: 'ApplicationLoaded', + path: '/test', + referrer: 'Rudder', + search: 'abc', + title: 'Test Page', + url: 'https://www.rudderlabs.com', + }, + integrations: { All: true }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + JSON: { siteTrackingDomain: { name: 'rudderlabs.com' } }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://active.campaigns.rudder.com/api/3/siteTrackingDomains', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'active_campaign', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'jamesDoe@gmail.com', anonymousId: '12345' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + name: 'ApplicationLoaded', + path: '/test', + referrer: 'Rudder', + referring_domain: 'https://www.rudderlabs.com', + search: 'abc', + title: 'Test Page', + url: 'https://www.rudderlabs.com', + }, + integrations: { All: true }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + JSON: { siteTrackingDomain: { name: 'rudderlabs.com' } }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://active.campaigns.rudder.com/api/3/siteTrackingDomains', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'active_campaign', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'jamesDoe@gmail.com', anonymousId: '12345' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + request_ip: '1.1.1.1', + type: 'screen', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/test', + referrer: 'Rudder', + search: 'abc', + title: 'Test Page', + url: 'www.rudderlabs.com', + name: 'Rudder_Event_Screen_Test', + }, + event: 'ScreenViewed', + integrations: { All: true }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + key: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + actid: '476550467', + event: 'ScreenViewed', + visit: '{"email":"jamesDoe@gmail.com"}', + eventdata: 'Rudder_Event_Screen_Test', + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + 'Content-Type': 'application/x-www-form-urlencoded', + }, + version: '1', + endpoint: 'https://trackcmp.net/event', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'active_campaign', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + email: 'jamesDoe@gmail.com', + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'Tracking Action', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { name: 'Rudder_Event_Track_Test' }, + userId: 'test_user_id', + timestamp: '2019-09-01T15:46:51.693Z', + originalTimestamp: '2019-09-01T15:46:51.693Z', + type: 'track', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + key: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + actid: '476550467', + event: 'Tracking Action', + visit: '{"email":"jamesDoe@gmail.com"}', + eventdata: 'Rudder_Event_Track_Test', + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + 'Content-Type': 'application/x-www-form-urlencoded', + }, + version: '1', + endpoint: 'https://trackcmp.net/event', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'active_campaign', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + userId: '123456', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + phone: '92374162212', + tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + fieldInfo: { + Office: 'Trastkiv', + Country: 'Russia', + Likes: ['Potato', 'Onion'], + Random: 'random', + }, + lists: [ + { id: 2, status: 'subscribe' }, + { id: 3, status: 'unsubscribe' }, + { id: 3, status: 'unsubscribexyz' }, + ], + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + JSON: { + contact: { + email: 'jamesDoe@gmail.com', + phone: '92374162212', + fieldValues: [ + { field: '0', value: 'Trastkiv' }, + { field: '1', value: 'Russia' }, + { field: '3', value: '||Potato||Onion||' }, + { field: '4', value: 'random' }, + ], + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://active.campaigns.rudder.com/api/3/contact/sync', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; +module.exports = { + data, +}; diff --git a/test/integrations/destinations/active_campaign/router/data.js b/test/integrations/destinations/active_campaign/router/data.js new file mode 100644 index 0000000000..37a0d02e5b --- /dev/null +++ b/test/integrations/destinations/active_campaign/router/data.js @@ -0,0 +1,449 @@ +const data = [ + { + name: 'active_campaign', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + metadata: { + jobId: 2, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + userId: '123456', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + firstName: 'James', + lastName: 'Doe', + phone: '92374162212', + tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + fieldInfo: { + Office: 'Trastkiv', + Country: 'Russia', + Likes: ['Potato', 'Onion'], + Random: 'random', + }, + lists: [ + { + id: 2, + status: 'subscribe', + }, + { + id: 3, + status: 'unsubscribe', + }, + { + id: 3, + status: 'unsubscribexyz', + }, + ], + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + destType: 'active_campaign', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + JSON: { + contact: { + email: 'jamesDoe@gmail.com', + firstName: 'James', + lastName: 'Doe', + phone: '92374162212', + fieldValues: [ + { + field: '0', + value: 'Trastkiv', + }, + { + field: '1', + value: 'Russia', + }, + { + field: '3', + value: '||Potato||Onion||', + }, + { + field: '4', + value: 'random', + }, + ], + }, + }, + }, + type: 'REST', + files: {}, + userId: '', + method: 'POST', + params: {}, + headers: { + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://active.campaigns.rudder.com/api/3/contact/sync', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'active_campaign', + description: 'Test 1', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + metadata: { + jobId: 2, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'jamesDoe@gmail.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + name: 'ApplicationLoaded', + path: '/test', + referrer: 'Rudder', + search: 'abc', + title: 'Test Page', + url: 'https://www.rudderlabs.com', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + destType: 'active_campaign', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + JSON: { + siteTrackingDomain: { + name: 'rudderlabs.com', + }, + }, + }, + type: 'REST', + files: {}, + userId: '', + method: 'POST', + params: {}, + headers: { + 'Api-Token': + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://active.campaigns.rudder.com/api/3/siteTrackingDomains', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'active_campaign', + description: 'Test 2', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + name: 'home', + type: 'page', + sentAt: '2023-01-10T22:31:10.954Z', + userId: '', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '2.20.0', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'url', + path: 'path', + title: 'title', + search: 'search', + tab_url: 'https://simple-tenet.github.io/rudderstack-sample-site/', + referrer: 'referrer', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-US', + screen: { + width: 1512, + height: 982, + density: 2, + innerWidth: 846, + innerHeight: 782, + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.20.0', + }, + campaign: {}, + sessionId: 1673389635049, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36', + }, + rudderId: 'd37dd81f-5894-48ec-b312-09c590bab15c', + messageId: '2774384870943800-0b15a357-c85d-4b22-916e-ed53286b742a', + timestamp: '2023-01-10T22:31:11.601Z', + properties: { + url: 'url', + name: 'home', + path: 'path', + title: 'title', + search: 'search', + tab_url: 'https://simple-tenet.github.io/rudderstack-sample-site/', + referrer: 'referrer', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + receivedAt: '2023-01-10T22:31:11.612Z', + request_ip: '0.0.0.20', + anonymousId: '878e8f5f-9b6c-4aef-b5d3-1b970a13f17a', + integrations: { + All: true, + }, + originalTimestamp: '2023-01-10T22:31:10.943Z', + }, + destination: { + Config: { + apiKey: + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + metadata: { + jobId: 5, + }, + }, + ], + destType: 'active_campaign', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + error: 'Invalid URL: url', + statTags: { + destType: 'ACTIVE_CAMPAIGN', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + metadata: [ + { + jobId: 5, + }, + ], + batched: false, + destination: { + Config: { + apiKey: + 'fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1', + apiUrl: 'https://active.campaigns.rudder.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + }, + ], + }, + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/adj/processor/data.js b/test/integrations/destinations/adj/processor/data.js new file mode 100644 index 0000000000..0207c14958 --- /dev/null +++ b/test/integrations/destinations/adj/processor/data.js @@ -0,0 +1,2423 @@ +const data = [ + { + name: 'adj', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.38, + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'EUR', + ip_address: '[::1]', + s2s: 1, + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + error: 'Device type/id not present', + statTags: { + destType: 'ADJ', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'windows', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + error: 'Device type not valid', + statTags: { + destType: 'ADJ', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.38, + idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'EUR', + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'Second Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + error: 'No event token mapped for this event', + statTags: { + destType: 'ADJ', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'Second Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'random', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + error: 'Message type not supported', + statTags: { + destType: 'ADJ', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'Second Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + error: 'Message Type is not present. Aborting message.', + statTags: { + destType: 'ADJ', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: '20.37566', + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.38, + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'EUR', + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: '20.37566', + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.38, + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'USD', + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: '$20.37', + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.37, + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'USD', + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: '$20.37gfd', + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + error: 'Revenue is not in the correct format', + statTags: { + destType: 'ADJ', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: '$20.37', + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: false, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.37, + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'USD', + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'sandbox', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: false, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'sandbox', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'watchos', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.38, + idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'EUR', + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ipados', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'tvos', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + partnerParamsKeys: [ + { from: 'key1', to: 'partnerParamKey-1' }, + { from: 'key2', to: 'partnerParamKey-2' }, + { from: 'revenue', to: 'price' }, + { from: 'novalue', to: 'check' }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + partner_params: { + 'partnerParamKey-1': 'value1', + 'partnerParamKey-2': 'value2', + price: '20.37566', + }, + revenue: 20.38, + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'EUR', + ip_address: '[::1]', + s2s: 1, + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'adj', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + locale: 'en-US', + network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + traits: { anonymousId: '21e13f4bc7ceddad' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { All: true }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { k4: 'v4', k5: { k6: 'v6' } }, + key5: [{ k: 'v1' }, { k: 'v2' }], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }, + { from: 'First Investment', to: 'tf4gm5' }, + ], + partnerParamsKeys: [], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { Accept: '*/*' }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.38, + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'EUR', + ip_address: '[::1]', + s2s: 1, + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; +module.exports = { + data, +}; diff --git a/test/integrations/destinations/adj/router/data.js b/test/integrations/destinations/adj/router/data.js new file mode 100644 index 0000000000..fe4bbdfde7 --- /dev/null +++ b/test/integrations/destinations/adj/router/data.js @@ -0,0 +1,458 @@ +const data = [ + { + name: 'adj', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'Android', + attTrackingStatus: 3, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.6', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'Android', + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '21e13f4bc7ceddad', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { + All: true, + }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { + k4: 'v4', + k5: { + k6: 'v6', + }, + }, + key5: [ + { + k: 'v1', + }, + { + k: 'v2', + }, + ], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + metadata: { + jobId: 2, + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { + from: 'Application Installed', + to: '3fdmll', + }, + { + from: 'First Investment', + to: 'tf4gm5', + }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + destType: 'adj', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { + Accept: '*/*', + }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.38, + android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + gps_adid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'EUR', + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { + from: 'Application Installed', + to: '3fdmll', + }, + { + from: 'First Investment', + to: 'tf4gm5', + }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'adj', + description: 'Test 1', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + app: { + build: '4', + name: 'RuddCDN', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.6', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'Android', + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '21e13f4bc7ceddad', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'First Investment', + integrations: { + All: true, + }, + messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', + originalTimestamp: '2020-09-28T19:53:31.900Z', + properties: { + currency: 'EUR', + key1: 'value1', + key2: 'value2', + key3: { + k4: 'v4', + k5: { + k6: 'v6', + }, + }, + key5: [ + { + k: 'v1', + }, + { + k: 'v2', + }, + ], + revenue: 20.37566, + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + request_ip: '[::1]', + sentAt: '2020-09-28T19:53:44.998Z', + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'track', + }, + metadata: { + jobId: 2, + }, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { + from: 'Application Installed', + to: '3fdmll', + }, + { + from: 'First Investment', + to: 'tf4gm5', + }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + destType: 'adj', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://s2s.adjust.com/event', + headers: { + Accept: '*/*', + }, + params: { + callback_params: + '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', + revenue: 20.38, + idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + att_status: 3, + tracking_enabled: true, + currency: 'EUR', + s2s: 1, + ip_address: '[::1]', + app_token: 't1yurrb968zk', + event_token: 'tf4gm5', + environment: 'production', + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '21e13f4bc7ceddad', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', + Name: 'ADJ', + DestinationDefinition: { + ID: '1i3DeZo6eSUKrS3KzDUqjbBPCDJ', + Name: 'ADJ', + DisplayName: 'Adjust', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appToken', 'customMappings', 'delay', 'environment'], + ios: ['useNativeSDK'], + reactnative: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appToken', 'customMappings', 'delay'], + supportedSourceTypes: ['android', 'ios', 'reactnative', 'cloud'], + }, + }, + Config: { + appToken: 't1yurrb968zk', + customMappings: [ + { + from: 'Application Installed', + to: '3fdmll', + }, + { + from: 'First Investment', + to: 'tf4gm5', + }, + ], + environment: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/airship/processor/data.js b/test/integrations/destinations/airship/processor/data.js new file mode 100644 index 0000000000..fa39e62be7 --- /dev/null +++ b/test/integrations/destinations/airship/processor/data.js @@ -0,0 +1,2457 @@ +const data = [ + { + name: 'airship', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { text: 'New Line Sneakers', price: '$ 79.95' }, + { text: 'Old Line Sneakers', price: '$ 79.95' }, + { text: 'Blue Line Sneakers', price: '$ 79.95' }, + ], + name: 'Hugh Manbeing', + userLocation: { state: 'CO', zip: '80202' }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/custom-events', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + 'X-UA-Appkey': 'O2YARRI15I', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + occured: '2019-10-14T09:03:17.562Z', + user: { named_user_id: 'testuserId1' }, + body: { + name: 'product_clicked', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { text: 'New Line Sneakers', price: '$ 79.95' }, + { text: 'Old Line Sneakers', price: '$ 79.95' }, + { text: 'Blue Line Sneakers', price: '$ 79.95' }, + ], + name: 'Hugh Manbeing', + userLocation: { state: 'CO', zip: '80202' }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: 'testuserId1', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { text: 'New Line Sneakers', price: '$ 79.95' }, + { text: 'Old Line Sneakers', price: '$ 79.95' }, + { text: 'Blue Line Sneakers', price: '$ 79.95' }, + ], + name: 'Hugh Manbeing', + userLocation: { state: 'CO', zip: '80202' }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + error: 'event name is required for track', + statTags: { + destType: 'AIRSHIP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { text: 'New Line Sneakers', price: '$ 79.95' }, + { text: 'Old Line Sneakers', price: '$ 79.95' }, + { text: 'Blue Line Sneakers', price: '$ 79.95' }, + ], + name: 'Hugh Manbeing', + userLocation: { state: 'CO', zip: '80202' }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { apiKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: false }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { apiKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: false }, + }, + error: 'App Key is required for authorization for track events', + statTags: { + destType: 'AIRSHIP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { text: 'New Line Sneakers', price: '$ 79.95' }, + { text: 'Old Line Sneakers', price: '$ 79.95' }, + { text: 'Blue Line Sneakers', price: '$ 79.95' }, + ], + name: 'Hugh Manbeing', + userLocation: { state: 'CO', zip: '80202' }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: true, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.airship.eu/api/custom-events', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + 'X-UA-Appkey': 'O2YARRI15I', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + occured: '2019-10-14T09:03:17.562Z', + user: { named_user_id: 'testuserId1' }, + body: { + name: 'product_clicked', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { text: 'New Line Sneakers', price: '$ 79.95' }, + { text: 'Old Line Sneakers', price: '$ 79.95' }, + { text: 'Blue Line Sneakers', price: '$ 79.95' }, + ], + name: 'Hugh Manbeing', + userLocation: { state: 'CO', zip: '80202' }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + }, + type: 'identify', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'logins', value: 5, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { name: true, email: true, favColor: false }, + type: 'identify', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { named_user_id: '97980cfea0067' }, + add: { rudderstack_integration: ['name', 'email'] }, + remove: { rudderstack_integration: ['favcolor'] }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + firstName: true, + lastName: false, + favColor: true, + }, + type: 'identify', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { named_user_id: '97980cfea0067' }, + add: { rudderstack_integration: ['firstname', 'favcolor'] }, + remove: { rudderstack_integration: ['lastname'] }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'logins', value: 5, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + firstName: true, + lastName: false, + favColor: true, + }, + type: 'identify', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { apiKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: true }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.airship.eu/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { named_user_id: '97980cfea0067' }, + add: { rudderstack_integration: ['firstname', 'favcolor'] }, + remove: { rudderstack_integration: ['lastname'] }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.airship.eu/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'logins', value: 5, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: {}, + type: 'identify', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + appSecret: 'fhf', + dataCenter: true, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + appSecret: 'fhf', + dataCenter: true, + }, + }, + error: 'For identify, tags or attributes properties are required under traits', + statTags: { + destType: 'AIRSHIP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + }, + type: 'group', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { apiKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: false }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'logins', value: 5, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { name: true, email: true, favColor: false }, + type: 'group', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { apiKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: false }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { named_user_id: '97980cfea0067' }, + add: { rudderstack_integration_group: ['name', 'email'] }, + remove: { rudderstack_integration_group: ['favcolor'] }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + firstName: true, + lastName: false, + favColor: true, + }, + type: 'group', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { apiKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: false }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { named_user_id: '97980cfea0067' }, + add: { rudderstack_integration_group: ['firstname', 'favcolor'] }, + remove: { rudderstack_integration_group: ['lastname'] }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'logins', value: 5, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + firstName: true, + lastName: false, + favColor: true, + }, + type: 'group', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { apiKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: true }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.airship.eu/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { named_user_id: '97980cfea0067' }, + add: { rudderstack_integration_group: ['firstname', 'favcolor'] }, + remove: { rudderstack_integration_group: ['lastname'] }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.airship.eu/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'logins', value: 5, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: {}, + type: 'group', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + appSecret: 'fhf', + dataCenter: true, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + appSecret: 'fhf', + dataCenter: true, + }, + }, + error: 'For group, tags or attributes properties are required under traits', + statTags: { + destType: 'AIRSHIP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + firstName: true, + lastName: false, + favColor: true, + }, + type: 'group', + userId: '97980cfea0067', + version: '1', + }, + destination: { + Config: { apiKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: false }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { named_user_id: '97980cfea0067' }, + add: { rudderstack_integration_group: ['firstname', 'favcolor'] }, + remove: { rudderstack_integration_group: ['lastname'] }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { action: 'set', key: 'logins', value: 5, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'Titli Ganguly', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: '25adacdcd8c4ef4442fbdc626fbcf331-us6', + audienceId: 'df42a82d07', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + message: { + type: 'page', + sentAt: '2021-05-18T07:02:17.675Z', + userId: '', + channel: 'web', + context: { + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://app.rudderstack.com/signup?type=freetrial', + path: '/signup', + title: '', + search: '?type=freetrial', + tab_url: 'https://app.rudderstack.com/signup?type=freetrial', + referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + initial_referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + referring_domain: 'rudderstack.medium.com', + initial_referring_domain: 'rudderstack.medium.com', + }, + locale: 'en-GB', + screen: { density: 2 }, + traits: {}, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.18' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36', + }, + rudderId: '4dbe224c-6aea-4d89-8da6-09d27c0d2908', + messageId: '72df8cb0-54ab-417c-8e87-e97e9d339feb', + timestamp: '2021-05-18T07:02:18.566Z', + properties: { + url: 'https://app.rudderstack.com/signup?type=freetrial', + path: '/signup', + title: '', + search: '?type=freetrial', + tab_url: 'https://app.rudderstack.com/signup?type=freetrial', + referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + initial_referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + referring_domain: 'rudderstack.medium.com', + initial_referring_domain: 'rudderstack.medium.com', + }, + receivedAt: '2021-05-18T07:02:18.566Z', + request_ip: '162.44.150.11', + anonymousId: '58ec7b39-48f1-4d83-9d45-a48c64f96fa0', + integrations: { All: true }, + originalTimestamp: '2021-05-18T07:02:17.675Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'Titli Ganguly', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: '25adacdcd8c4ef4442fbdc626fbcf331-us6', + audienceId: 'df42a82d07', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + error: 'message type page not supported', + statTags: { + destType: 'AIRSHIP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: { value: 'dfd' }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'ffdf', + appSecret: 'fhf', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/custom-events', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + 'X-UA-Appkey': 'ffdf', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + occured: '2019-10-14T09:03:17.562Z', + user: { named_user_id: 'testuserId1' }, + body: { name: 'product_clicked', value: 'dfd' }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: {}, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'ffdf', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/custom-events', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + 'X-UA-Appkey': 'ffdf', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + occured: '2019-10-14T09:03:17.562Z', + user: { named_user_id: 'testuserId1' }, + body: { name: 'product_clicked' }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: {}, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'ffdf', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/custom-events', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + 'X-UA-Appkey': 'ffdf', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + occured: '2019-10-14T09:03:17.562Z', + user: { named_user_id: 'testuserId1' }, + body: { name: 'product_clicked' }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { name: true, email: true, favColor: false }, + type: 'identify', + userId: '97980cfea0067', + version: '1', + }, + destination: { Config: { dataCenter: false } }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { Config: { dataCenter: false } }, + error: 'API Key is required for authorization for Identify events', + statTags: { + destType: 'AIRSHIP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { All: true }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { name: true, email: true, favColor: false }, + type: 'group', + userId: '97980cfea0067', + version: '1', + }, + destination: { Config: { dataCenter: false } }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { Config: { dataCenter: false } }, + error: 'API Key is required for authorization for group events', + statTags: { + destType: 'AIRSHIP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { text: 'New Line Sneakers', price: '$ 79.95' }, + { text: 'Old Line Sneakers', price: '$ 79.95' }, + { text: 'Blue Line Sneakers', price: '$ 79.95' }, + ], + name: 'Hugh Manbeing', + userLocation: { state: 'CO', zip: '80202' }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { appKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: false }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { appKey: '34d8efa09c5b048bbacc6af157f2e687', dataCenter: false }, + }, + error: 'API Key is required for authorization for track events', + statTags: { + destType: 'AIRSHIP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'airship', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + sessionId: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: {}, + integrations: { All: true }, + }, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'ffdf', + dataCenter: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/custom-events', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + 'X-UA-Appkey': 'ffdf', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + user: { named_user_id: 'testuserId1' }, + body: { + name: 'product_clicked', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; +module.exports = { + data, +}; diff --git a/test/integrations/destinations/airship/router/data.js b/test/integrations/destinations/airship/router/data.js new file mode 100644 index 0000000000..b8b35dcbd0 --- /dev/null +++ b/test/integrations/destinations/airship/router/data.js @@ -0,0 +1,590 @@ +const data = [ + { + name: 'airship', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + metadata: { + jobId: 1, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testone@gmail.com', + firstName: 'test', + lastName: 'one', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Clicked', + userId: 'testuserId1', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { + text: 'New Line Sneakers', + price: '$ 79.95', + }, + { + text: 'Old Line Sneakers', + price: '$ 79.95', + }, + { + text: 'Blue Line Sneakers', + price: '$ 79.95', + }, + ], + name: 'Hugh Manbeing', + userLocation: { + state: 'CO', + zip: '80202', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + destType: 'airship', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/custom-events', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + 'X-UA-Appkey': 'O2YARRI15I', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + occured: '2019-10-14T09:03:17.562Z', + user: { + named_user_id: 'testuserId1', + }, + body: { + name: 'product_clicked', + properties: { + description: 'Sneaker purchase', + brand: 'Victory Sneakers', + colors: ['red', 'blue'], + items: [ + { + text: 'New Line Sneakers', + price: '$ 79.95', + }, + { + text: 'Old Line Sneakers', + price: '$ 79.95', + }, + { + text: 'Blue Line Sneakers', + price: '$ 79.95', + }, + ], + name: 'Hugh Manbeing', + userLocation: { + state: 'CO', + zip: '80202', + }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'airship', + description: 'Test 1', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + firstName: true, + lastName: false, + favColor: true, + }, + type: 'identify', + userId: '97980cfea0067', + version: '1', + }, + }, + ], + destType: 'airship', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { + named_user_id: '97980cfea0067', + }, + add: { + rudderstack_integration: ['firstname', 'favcolor'], + }, + remove: { + rudderstack_integration: ['lastname'], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'age', + value: 34, + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'logins', + value: 5, + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'airship', + description: 'Test 2', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + dataCenter: false, + }, + }, + metadata: { + jobId: 3, + }, + message: { + anonymousId: '507f191e810c19729de860ea', + channel: 'browser', + context: { + ip: '8.8.8.8', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + name: 'Peter Gibbons', + age: 34, + email: 'peter@example.com', + plan: 'premium', + logins: 5, + address: { + street: '6th St', + city: 'San Francisco', + state: 'CA', + postalCode: '94103', + country: 'USA', + }, + firstName: true, + lastName: false, + favColor: true, + }, + type: 'group', + userId: '97980cfea0067', + version: '1', + }, + }, + ], + destType: 'airship', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/tags', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + audience: { + named_user_id: '97980cfea0067', + }, + add: { + rudderstack_integration_group: ['firstname', 'favcolor'], + }, + remove: { + rudderstack_integration_group: ['lastname'], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://go.urbanairship.com/api/named_users/97980cfea0067/attributes', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/vnd.urbanairship+json; version=3', + Authorization: 'Bearer 34d8efa09c5b048bbacc6af157f2e687', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + action: 'set', + key: 'full_name', + value: 'Peter Gibbons', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'age', + value: 34, + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'email', + value: 'peter@example.com', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'plan', + value: 'premium', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'logins', + value: 5, + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'address_street', + value: '6th St', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'city', + value: 'San Francisco', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'region', + value: 'CA', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'zipcode', + value: '94103', + timestamp: '2015-02-23T22:28:55Z', + }, + { + action: 'set', + key: 'country', + value: 'USA', + timestamp: '2015-02-23T22:28:55Z', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + ], + metadata: [ + { + jobId: 3, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: '34d8efa09c5b048bbacc6af157f2e687', + dataCenter: false, + }, + }, + }, + ], + }, + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/attribution/data.js b/test/integrations/destinations/attribution/data.js new file mode 100644 index 0000000000..0eb6780c34 --- /dev/null +++ b/test/integrations/destinations/attribution/data.js @@ -0,0 +1,643 @@ +const data = [ + { + name: 'attribution', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: 'TODO', + Name: 'Attribution', + DestinationDefinition: { + ID: 'TODO', + Name: 'ATTRIBUTION', + DisplayName: 'Attribution', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + writeKey: 'abcdefghijklmnopqrstuvwxyz', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', + channel: 'web', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + }, + integrations: { + All: true, + }, + messageId: '258b77c6-442d-4bdc-8729-f0e4cef41353', + name: 'home', + originalTimestamp: '2020-04-17T14:55:31.367Z', + properties: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + receivedAt: '2020-04-17T20:25:31.381+05:30', + request_ip: '[::1]:57363', + sentAt: '2020-04-17T14:55:31.367Z', + timestamp: '2020-04-17T20:25:31.381+05:30', + type: 'page', + userId: 'user12345', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://track.attributionapp.com/v1/import', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', + }, + params: {}, + body: { + JSON: { + batch: [ + { + anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', + channel: 'web', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + }, + type: 'page', + userId: 'user12345', + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + integrations: { + All: true, + }, + messageId: '258b77c6-442d-4bdc-8729-f0e4cef41353', + name: 'home', + originalTimestamp: '2020-04-17T14:55:31.367Z', + properties: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + receivedAt: '2020-04-17T20:25:31.381+05:30', + request_ip: '[::1]:57363', + sentAt: '2020-04-17T14:55:31.367Z', + timestamp: '2020-04-17T14:55:31.367Z', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + statusCode: 200, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'attribution', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: 'TODO', + Name: 'Attribution', + DestinationDefinition: { + ID: 'TODO', + Name: 'ATTRIBUTION', + DisplayName: 'Attribution', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + writeKey: 'abcdefghijklmnopqrstuvwxyz', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', + channel: 'web', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + }, + traits: { + age: 23, + email: 'testmp@email.com', + firstname: 'Test Transformer', + }, + integrations: { + All: true, + }, + messageId: '023a3a48-190a-4968-9394-a8e99b81a3c0', + originalTimestamp: '2020-04-17T14:55:31.37Z', + receivedAt: '2020-04-17T20:25:31.401+05:30', + request_ip: '[::1]:57364', + sentAt: '2020-04-17T14:55:31.37Z', + timestamp: '2020-04-17T20:25:31.401+05:30', + type: 'identify', + userId: 'user12345', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://track.attributionapp.com/v1/import', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', + }, + params: {}, + body: { + JSON: { + batch: [ + { + anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', + channel: 'web', + type: 'identify', + userId: 'user12345', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + }, + traits: { + age: 23, + email: 'testmp@email.com', + firstname: 'Test Transformer', + }, + integrations: { + All: true, + }, + messageId: '023a3a48-190a-4968-9394-a8e99b81a3c0', + originalTimestamp: '2020-04-17T14:55:31.37Z', + receivedAt: '2020-04-17T20:25:31.401+05:30', + request_ip: '[::1]:57364', + sentAt: '2020-04-17T14:55:31.37Z', + timestamp: '2020-04-17T14:55:31.37Z', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + statusCode: 200, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'attribution', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: 'TODO', + Name: 'Attribution', + DestinationDefinition: { + ID: 'TODO', + Name: 'ATTRIBUTION', + DisplayName: 'Attribution', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + writeKey: 'abcdefghijklmnopqrstuvwxyz', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', + channel: 'web', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + }, + event: 'test track with property', + integrations: { + All: true, + }, + messageId: '584fde02-901a-4964-a4a0-4078b999d5b2', + originalTimestamp: '2020-04-17T14:55:31.372Z', + properties: { + test_prop_1: 'test prop', + test_prop_2: 1232, + }, + receivedAt: '2020-04-17T20:25:31.401+05:30', + request_ip: '[::1]:57365', + sentAt: '2020-04-17T14:55:31.372Z', + timestamp: '2020-04-17T20:25:31.401+05:30', + type: 'track', + userId: 'user12345', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://track.attributionapp.com/v1/import', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', + }, + params: {}, + body: { + JSON: { + batch: [ + { + anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', + channel: 'web', + type: 'track', + userId: 'user12345', + event: 'test track with property', + integrations: { + All: true, + }, + messageId: '584fde02-901a-4964-a4a0-4078b999d5b2', + originalTimestamp: '2020-04-17T14:55:31.372Z', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + }, + properties: { test_prop_1: 'test prop', test_prop_2: 1232 }, + receivedAt: '2020-04-17T20:25:31.401+05:30', + request_ip: '[::1]:57365', + sentAt: '2020-04-17T14:55:31.372Z', + timestamp: '2020-04-17T14:55:31.372Z', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + statusCode: 200, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'attribution', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: 'TODO', + Name: 'Attribution', + DestinationDefinition: { + ID: 'TODO', + Name: 'ATTRIBUTION', + DisplayName: 'Attribution', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + writeKey: 'abcdefghijklmnopqrstuvwxyz', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + channel: 'web', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + }, + integrations: { + All: true, + }, + messageId: '258b77c6-442d-4bdc-8729-f0e4cef41353', + name: 'home', + originalTimestamp: '2020-04-17T14:55:31.367Z', + properties: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + receivedAt: '2020-04-17T20:25:31.381+05:30', + request_ip: '[::1]:57363', + sentAt: '2020-04-17T14:55:31.367Z', + timestamp: '2020-04-17T20:25:31.381+05:30', + type: 'page', + userId: 'user12345', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://track.attributionapp.com/v1/import', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', + }, + params: {}, + body: { + JSON: { + batch: [ + { + type: 'page', + userId: 'user12345', + channel: 'web', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + }, + integrations: { + All: true, + }, + messageId: '258b77c6-442d-4bdc-8729-f0e4cef41353', + name: 'home', + originalTimestamp: '2020-04-17T14:55:31.367Z', + properties: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + receivedAt: '2020-04-17T20:25:31.381+05:30', + request_ip: '[::1]:57363', + sentAt: '2020-04-17T14:55:31.367Z', + timestamp: '2020-04-17T14:55:31.367Z', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + statusCode: 200, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'attribution', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: 'TODO', + Name: 'Attribution', + DestinationDefinition: { + ID: 'TODO', + Name: 'ATTRIBUTION', + DisplayName: 'Attribution', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + writeKey: 'abcdefghijklmnopqrstuvwxyz', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', + channel: 'web', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + }, + event: 'test track with property', + integrations: { + All: true, + }, + messageId: '584fde02-901a-4964-a4a0-4078b999d5b2', + originalTimestamp: '2020-04-17T14:55:31.372Z', + properties: { + test_prop_1: 'test prop', + test_prop_2: 1232, + }, + receivedAt: '2020-04-17T20:25:31.401+05:30', + request_ip: '[::1]:57365', + sentAt: '2020-04-17T14:55:31.372Z', + timestamp: '2020-04-17T20:25:31.401+05:30', + type: 'track', + userId: 'user12345', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://track.attributionapp.com/v1/import', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', + }, + params: {}, + body: { + JSON: { + batch: [ + { + anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', + channel: 'web', + context: { + ip: '12.12.12.12', + library: { + name: 'SomeLib', + version: '1.0', + }, + }, + type: 'track', + userId: 'user12345', + event: 'test track with property', + integrations: { + All: true, + }, + messageId: '584fde02-901a-4964-a4a0-4078b999d5b2', + originalTimestamp: '2020-04-17T14:55:31.372Z', + properties: { + test_prop_1: 'test prop', + test_prop_2: 1232, + }, + receivedAt: '2020-04-17T20:25:31.401+05:30', + request_ip: '[::1]:57365', + sentAt: '2020-04-17T14:55:31.372Z', + timestamp: '2020-04-17T14:55:31.372Z', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + statusCode: 200, + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/bqstream/processor/data.js b/test/integrations/destinations/bqstream/processor/data.js new file mode 100644 index 0000000000..7abe88d08a --- /dev/null +++ b/test/integrations/destinations/bqstream/processor/data.js @@ -0,0 +1,303 @@ +const data = [ + { + name: 'bqstream', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-', + projectId: 'gc-project-id', + datasetId: 'gc_dataset', + tableId: 'gc_table', + authStatus: 'active', + eventDelivery: true, + eventDeliveryTS: 1636965406397, + }, + DestinationDefinition: { + Name: 'BQSTREAM', + ID: '1xo8AlGqhz79yY4IzE01qJAcb0R', + DisplayName: 'BigQuery Stream', + Config: { + destConfig: { + defaultConfig: [ + 'rudderAccountId', + 'datasetId', + 'tableId', + 'projectId', + 'insertId', + ], + }, + secretKeys: [], + excludeKeys: [], + includeKeys: [], + transformAt: 'router', + transformAtV1: 'router', + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'cloudSource', + 'flutter', + 'cordova', + ], + saveDestinationResponse: true, + }, + }, + Enabled: true, + ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR', + Name: 'bqstream test', + Transformations: [], + }, + metadata: {}, + message: { + type: 'track', + event: 'insert product', + sentAt: '2021-09-08T11:10:45.466Z', + userId: 'user12345', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:5500/index.html', + path: '/index.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:5500/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1536, + height: 960, + density: 2, + innerWidth: 1536, + innerHeight: 776, + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: 'fa2994a5-2a81-45fd-9919-fcf5596ad380', + messageId: 'e2d1a383-d9a2-4e03-a9dc-131d153c4d95', + timestamp: '2021-11-15T14:06:42.497+05:30', + properties: { + count: 25, + productId: 6, + productName: 'Product-5', + }, + receivedAt: '2021-11-15T14:06:42.497+05:30', + request_ip: '[::1]', + anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', + integrations: { + All: true, + }, + originalTimestamp: '2021-09-08T11:10:45.466Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + metadata: {}, + output: { + datasetId: 'gc_dataset', + projectId: 'gc-project-id', + properties: { count: 25, productId: 6, productName: 'Product-5' }, + tableId: 'gc_table', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bqstream', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-', + projectId: 'gc-project-id', + datasetId: 'gc_dataset', + tableId: 'gc_table', + insertId: 'productId', + eventDelivery: true, + eventDeliveryTS: 1636965406397, + }, + DestinationDefinition: { + Name: 'BQSTREAM', + ID: '1xo8AlGqhz79yY4IzE01qJAcb0R', + DisplayName: 'BigQuery Stream', + Config: { + destConfig: { + defaultConfig: [ + 'rudderAccountId', + 'datasetId', + 'tableId', + 'projectId', + 'insertId', + ], + }, + secretKeys: [], + excludeKeys: [], + includeKeys: [], + transformAt: 'router', + transformAtV1: 'router', + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'cloudSource', + 'flutter', + 'cordova', + ], + saveDestinationResponse: true, + }, + }, + Enabled: true, + ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR', + Name: 'bqstream test', + Transformations: [], + }, + metadata: {}, + message: { + type: 'track', + event: 'insert product', + sentAt: '2021-09-08T11:10:45.466Z', + userId: 'user12345', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:5500/index.html', + path: '/index.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:5500/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1536, + height: 960, + density: 2, + innerWidth: 1536, + innerHeight: 776, + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: 'fa2994a5-2a81-45fd-9919-fcf5596ad380', + messageId: 'e2d1a383-d9a2-4e03-a9dc-131d153c4d95', + timestamp: '2021-11-15T14:06:42.497+05:30', + properties: { + count: 25, + productId: 6, + productName: 'Product-5', + }, + receivedAt: '2021-11-15T14:06:42.497+05:30', + request_ip: '[::1]', + anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', + integrations: { + All: true, + }, + originalTimestamp: '2021-09-08T11:10:45.466Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + metadata: {}, + output: { + datasetId: 'gc_dataset', + projectId: 'gc-project-id', + properties: { + count: 25, + productId: 6, + productName: 'Product-5', + insertId: '6', + }, + tableId: 'gc_table', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/bqstream/router/data.js b/test/integrations/destinations/bqstream/router/data.js new file mode 100644 index 0000000000..5483bc38ab --- /dev/null +++ b/test/integrations/destinations/bqstream/router/data.js @@ -0,0 +1,239 @@ +const data = [ + { + name: 'dicord', + description: 'Discord batch events', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'track', + event: 'insert product', + sentAt: '2021-09-08T11:10:45.466Z', + userId: 'user12345', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:5500/index.html', + path: '/index.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:5500/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1536, + height: 960, + density: 2, + innerWidth: 1536, + innerHeight: 776, + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: 'fa2994a5-2a81-45fd-9919-fcf5596ad380', + messageId: 'e2d1a383-d9a2-4e03-a9dc-131d153c4d95', + timestamp: '2021-11-15T14:06:42.497+05:30', + properties: { + count: 10, + productId: 10, + productName: 'Product-10', + }, + receivedAt: '2021-11-15T14:06:42.497+05:30', + request_ip: '[::1]', + anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', + integrations: { + All: true, + }, + originalTimestamp: '2021-09-08T11:10:45.466Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-', + projectId: 'gc-project-id', + datasetId: 'gc_dataset', + tableId: 'gc_table', + insertId: 'productId', + eventDelivery: true, + eventDeliveryTS: 1636965406397, + }, + Enabled: true, + ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR', + Name: 'bqstream test', + }, + }, + { + message: { + type: 'track', + event: 'insert product', + sentAt: '2021-09-08T11:10:45.466Z', + userId: 'user12345', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:5500/index.html', + path: '/index.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:5500/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1536, + height: 960, + density: 2, + innerWidth: 1536, + innerHeight: 776, + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: 'fa2994a5-2a81-45fd-9919-fcf5596ad380', + messageId: 'e2d1a383-d9a2-4e03-a9dc-131d153c4d95', + timestamp: '2021-11-15T14:06:42.497+05:30', + properties: { + count: 20, + productId: 20, + productName: 'Product-20', + }, + receivedAt: '2021-11-15T14:06:42.497+05:30', + request_ip: '[::1]', + anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', + integrations: { + All: true, + }, + originalTimestamp: '2021-09-08T11:10:45.466Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-', + projectId: 'gc-project-id', + datasetId: 'gc_dataset', + tableId: 'gc_table', + insertId: 'productId', + eventDelivery: true, + eventDeliveryTS: 1636965406397, + }, + Enabled: true, + ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR', + Name: 'bqstream test', + }, + }, + ], + destType: 'bqstream', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + datasetId: 'gc_dataset', + projectId: 'gc-project-id', + properties: [ + { + count: 10, + productId: 10, + productName: 'Product-10', + insertId: '10', + }, + { + count: 20, + productId: 20, + productName: 'Product-20', + insertId: '20', + }, + ], + tableId: 'gc_table', + userId: '', + }, + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '1z8LpaSAuFR9TPWL6fECZfjmRa-', + projectId: 'gc-project-id', + datasetId: 'gc_dataset', + tableId: 'gc_table', + insertId: 'productId', + eventDelivery: true, + eventDeliveryTS: 1636965406397, + }, + Enabled: true, + ID: '1WXjIHpu7ETXgjfiGPW3kCUgZFR', + Name: 'bqstream test', + }, + }, + ], + }, + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/engage/processor/data.js b/test/integrations/destinations/engage/processor/data.js new file mode 100644 index 0000000000..aca4bcdcb4 --- /dev/null +++ b/test/integrations/destinations/engage/processor/data.js @@ -0,0 +1,261 @@ +const data = [{ + "name": "engage", + "description": "[IDENTIFY]: Neither externalId or userId is given.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"1","traits":{"firstName":"Anant","lastName":"jain","email":"anant@r.com","hasPurchased":"yes"},"type":"identify"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff"}}, + "error": "Neither externalId or userId is available.", "statTags": { + "destType": "ENGAGE", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "engage", + "description": "[IDENTIFY]: Create a new User with Metadata and lists from externalId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"userId":"1","context":{"externalId":[{"type":"engageListId","id":"100c983ry8934hf3094yfh348gf1"},{"type":"engageListId","id":"4r40hfio3rbfln"}]},"originalTimestamp":"2020-09-28T19:53:31.900Z","traits":{"firstName":"Anant","lastName":"jain","email":"anant@r.com","hasPurchased":"yes","address":{"Home":{"city":"iudcb"},"Office":{"abc":"jbc"}},"state":"Delhi","title":"Mr"},"timestamp":"2020-09-29T14:50:29.907+05:30","type":"identify"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff","listIds":[{"listId":"9834trg3rgy3g08oi9893rgfb"},{"listId":"f39487tyh49go3h093gh2if2f2"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"meta":{"abc":"jbc","city":"iudcb","state":"Delhi","title":"Mr","hasPurchased":"yes"},"email":"anant@r.com","lists":["100c983ry8934hf3094yfh348gf1","4r40hfio3rbfln"],"last_name":"jain","created_at":"2020-09-28T19:53:31.900Z","first_name":"Anant"},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"PUT","params":{},"headers":{"Content-Type":"application/json","Authorization":"Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm"},"version":"1","endpoint":"https://api.engage.so/v1/users/1","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "engage", + "description": "[IDENTIFY]: Update a User with UID and lists from Config", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"userId":"1","context":{},"originalTimestamp":"2020-09-28T19:53:31.900Z","traits":{"firstName":"Anant","lastName":"jain","email":"abc@xyz.com","hasPurchased":"yes","address":{"Home":{"city":"iudcb"},"Office":{"abc":"jbc"}},"state":"Delhi","title":"Mr"},"timestamp":"2020-09-29T14:50:29.907+05:30","type":"identify"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff","listIds":[{"listId":"9834trg3rgy3g08oi9893rgfb"},{"listId":"f39487tyh49go3h093gh2if2f2"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"meta":{"abc":"jbc","city":"iudcb","state":"Delhi","title":"Mr","hasPurchased":"yes"},"email":"abc@xyz.com","lists":["9834trg3rgy3g08oi9893rgfb","f39487tyh49go3h093gh2if2f2"],"last_name":"jain","created_at":"2020-09-28T19:53:31.900Z","first_name":"Anant"},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"PUT","params":{},"headers":{"Content-Type":"application/json","Authorization":"Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm"},"version":"1","endpoint":"https://api.engage.so/v1/users/1","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "engage", + "description": "[IDENTIFY]: Update a User with userId inside traits and no listIds.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":3131,"originalTimestamp":"2020-09-28T19:53:31.900Z","traits":{"userId":"1","firstName":"Anant","lastName":"jain","email":"anant@r.com","hasPurchased":"yes","address":{"Home":{"city":"iudcb"},"Office":{"abc":"jbc"}},"state":"Lucknow","title":"Mr"},"timestamp":"2020-09-29T14:50:29.907+05:30","type":"identify"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"meta":{"abc":"jbc","city":"iudcb","state":"Lucknow","title":"Mr","userId":"1","hasPurchased":"yes"},"email":"anant@r.com","last_name":"jain","created_at":"2020-09-28T19:53:31.900Z","first_name":"Anant"},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"PUT","params":{},"headers":{"Content-Type":"application/json","Authorization":"Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm"},"version":"1","endpoint":"https://api.engage.so/v1/users/1","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "engage", + "description": "[TRACK]: Send an Event with userId inside externalID.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":3131,"context":{"externalId":[{"type":"engageId","id":"1"}]},"originalTimestamp":"2020-09-28T19:53:31.900Z","event":"First Investment","properties":{"currency":"EUR","revenue":20.37566},"type":"track"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"event":"First Investment","timestamp":"2020-09-28T19:53:31.900Z","properties":{"revenue":20.37566,"currency":"EUR"}},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"POST","params":{},"headers":{"Content-Type":"application/json","Authorization":"Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm"},"version":"1","endpoint":"https://api.engage.so/v1/users/1/events","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "engage", + "description": "[PAGE]: Send an Event with userId not inside externalID and no originalTimestamp and properties.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"userId":1,"name":"Contact Customer Care","category":"Help","type":"page"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"event":"Viewed Help Contact Custom Page","properties":{}},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"POST","params":{},"headers":{"Content-Type":"application/json","Authorization":"Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm"},"version":"1","endpoint":"https://api.engage.so/v1/users/1/events","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "engage", + "description": "[ GROUP ]: Group user with list with engageID given inside externalId and operation not given.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"user123","groupId":"17","context":{"traits":{"subscriberStatus":"false"},"externalId":[{"type":"engageId","id":"246"}]},"traits":{"lastName":"garwal"},"type":"group"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff","listIds":[{"listId":"9834trg3rgy3g08oi9893rgfb"},{"listId":"f39487tyh49go3h093gh2if2f2"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"PUT","endpoint":"https://api.engage.so/v1/lists/17/subscribers/246","headers":{"Content-Type":"application/json","Authorization":"Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm"},"params":{},"body":{"JSON":{"subscribed":"false"},"JSON_ARRAY":{},"XML":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "engage", + "description": "[ GROUP ]:No ExternalId and operation as remove.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"groupId":"17","traits":{"lastName":"garwal","operation":"remove","email":"abc@xyz.com"},"type":"group"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff","listIds":[{"listId":"9834trg3rgy3g08oi9893rgfb"},{"listId":"f39487tyh49go3h093gh2if2f2"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff","listIds":[{"listId":"9834trg3rgy3g08oi9893rgfb"},{"listId":"f39487tyh49go3h093gh2if2f2"}]}}, + "error": "engageID is required for remove operation.", "statTags": { + "destType": "ENGAGE", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "engage", + "description": "[ GROUP ]: Create or update user with payload and link it with list.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"groupId":"17","traits":{"lastName":"Agarwal","firstName":"Lalu","email":"lalu@xyz.com","phone":"634189314","customField":"customValue"},"type":"group"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff","listIds":[{"listId":"9834trg3rgy3g08oi9893rgfb"},{"listId":"f39487tyh49go3h093gh2if2f2"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"meta":{"customField":"customValue"},"email":"lalu@xyz.com","number":"634189314","last_name":"Agarwal","first_name":"Lalu","subscribed":true},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"POST","params":{},"headers":{"Content-Type":"application/json","Authorization":"Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm"},"version":"1","endpoint":"https://api.engage.so/v1/lists/17/subscribers","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "engage", + "description": "[ GROUP ]: Remove user from List with externalID.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"anonymousId":3,"message":{"context":{"externalId":[{"type":"engageId","id":"1"}]},"userId":"user123","groupId":"17","traits":{"operation":"remove"},"type":"group"},"destination":{"Config":{"publicKey":"49ur490rjfo34gi04y38r9go","privateKey":"n89g389yr389fgbef0u2rff","listIds":[{"listId":"9834trg3rgy3g08oi9893rgfb"},{"listId":"f39487tyh49go3h093gh2if2f2"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"subscribed":true},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"DELETE","params":{},"headers":{"Content-Type":"application/json","Authorization":"Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm"},"version":"1","endpoint":"https://api.engage.so/v1/lists/17/subscribers/1","userId":""}, + "statusCode": 200}] + } + } + }]; module.exports = { + data + } \ No newline at end of file diff --git a/test/integrations/destinations/engage/router/data.js b/test/integrations/destinations/engage/router/data.js new file mode 100644 index 0000000000..5ef1ab2469 --- /dev/null +++ b/test/integrations/destinations/engage/router/data.js @@ -0,0 +1,336 @@ +const data = [ + { + "name": "engage", + "description": "Successfull Remove Group Call ", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "groupId": "17", + "context": { + "externalId": [ + { + "type": "engageId", + "id": "246" + } + ] + }, + "traits": { + "lastName": "garwal", + "type": "Segments", + "operation": "remove" + }, + "type": "group" + }, + "destination": { + "Config": { + "publicKey": "49ur490rjfo34gi04y38r9go", + "privateKey": "n89g389yr389fgbef0u2rff", + "listIds": [ + { + "listId": "9834trg3rgy3g08oi9893rgfb" + }, + { + "listId": "f39487tyh49go3h093gh2if2f2" + } + ] + } + }, + "metadata": { + "jobId": 1 + } + },] + , "destType": "engage" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "DELETE", + "endpoint": "https://api.engage.so/v1/lists/17/subscribers/246", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm" + }, + "params": {}, + "userId": "", + "body": { + "JSON": { + "subscribed": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "destination": { + "Config": { + "publicKey": "49ur490rjfo34gi04y38r9go", + "privateKey": "n89g389yr389fgbef0u2rff", + "listIds": [ + { + "listId": "9834trg3rgy3g08oi9893rgfb" + }, + { + "listId": "f39487tyh49go3h093gh2if2f2" + } + ] + } + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200 + } + ] + } + } + } + }, + { + "name": "engage", + "description": "Successfull Identify Call with userDi in externalId", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "userId": "1", + "context": { + "externalId": [ + { + "type": "engageListId", + "id": "100c983ry8934hf3094yfh348gf1" + }, + { + "type": "engageListId", + "id": "4r40hfio3rbfln" + } + ] + }, + "originalTimestamp": "2020-09-28T19:53:31.900Z", + "traits": { + "firstName": "Anant", + "lastName": "jain", + "email": "anant@r.com", + "hasPurchased": "yes", + "address": { + "Home": { + "city": "iudcb" + }, + "Office": { + "abc": "jbc" + } + }, + "state": "Delhi", + "title": "Mr" + }, + "timestamp": "2020-09-29T14:50:29.907+05:30", + "type": "identify" + }, + "destination": { + "Config": { + "publicKey": "49ur490rjfo34gi04y38r9go", + "privateKey": "n89g389yr389fgbef0u2rff", + "listIds": [ + { + "listId": "9834trg3rgy3g08oi9893rgfb" + }, + { + "listId": "f39487tyh49go3h093gh2if2f2" + } + ] + } + }, + "metadata": { + "jobId": 2 + } + }] + , "destType": "engage" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "meta": { + "abc": "jbc", + "city": "iudcb", + "state": "Delhi", + "title": "Mr", + "hasPurchased": "yes" + }, + "email": "anant@r.com", + "lists": ["100c983ry8934hf3094yfh348gf1", "4r40hfio3rbfln"], + "last_name": "jain", + "created_at": "2020-09-28T19:53:31.900Z", + "first_name": "Anant" + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "PUT", + "userId": "", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm" + }, + "version": "1", + "endpoint": "https://api.engage.so/v1/users/1" + }, + "destination": { + "Config": { + "publicKey": "49ur490rjfo34gi04y38r9go", + "privateKey": "n89g389yr389fgbef0u2rff", + "listIds": [ + { + "listId": "9834trg3rgy3g08oi9893rgfb" + }, + { + "listId": "f39487tyh49go3h093gh2if2f2" + } + ] + } + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200 + } + ] + } + } + } + }, + { + "name": "engage", + "description": "Error: engageID is required for remove operation", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "anonymousId": "user123", + "groupId": "17", + "traits": { + "lastName": "garwal", + "operation": "remove", + "email": "abc@xyz.com" + }, + "type": "group" + }, + "destination": { + "Config": { + "publicKey": "49ur490rjfo34gi04y38r9go", + "privateKey": "n89g389yr389fgbef0u2rff", + "listIds": [ + { + "listId": "9834trg3rgy3g08oi9893rgfb" + }, + { + "listId": "f39487tyh49go3h093gh2if2f2" + } + ] + } + }, + "metadata": { + "jobId": 3 + } + }] + , "destType": "engage" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "metadata": [ + { + "jobId": 3 + } + ], + "destination": { + "Config": { + "publicKey": "49ur490rjfo34gi04y38r9go", + "privateKey": "n89g389yr389fgbef0u2rff", + "listIds": [ + { + "listId": "9834trg3rgy3g08oi9893rgfb" + }, + { + "listId": "f39487tyh49go3h093gh2if2f2" + } + ] + } + }, + "statTags": { + "errorCategory": "dataValidation", + "feature": "router", + "implementation": "native", + "module": "destination", + "destType": "ENGAGE", + "errorType": "instrumentation" + }, + "batched": false, + "statusCode": 400, + "error": "engageID is required for remove operation." + } + ] + } + } + } + }, +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/eventbridge/data.js b/test/integrations/destinations/eventbridge/data.js new file mode 100644 index 0000000000..1359373ce5 --- /dev/null +++ b/test/integrations/destinations/eventbridge/data.js @@ -0,0 +1,470 @@ +const data = [ + { + name: 'eventbridge', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.2', + }, + traits: { + abc: '1234', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.2', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/tests/html/ecomm_test.html', + referrer: 'http://0.0.0.0:1112/tests/html/', + search: '', + title: 'GA Ecommerce Test', + url: 'http://0.0.0.0:1112/tests/html/ecomm_test.html', + }, + }, + type: 'track', + messageId: '9116b734-7e6b-4497-ab51-c16744d4487e', + originalTimestamp: '2020-06-24T12:05:19.394Z', + anonymousId: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', + userId: '123', + event: 'Checkout Started', + properties: { + order_id: '5241735', + value: 31.98, + revenue: 31.98, + shipping: 4, + coupon: 'APPARELSALE', + currency: 'GBP', + products: [ + { + id: 'product-bacon-jam', + sku: 'sku-1', + category: 'Merch', + name: 'Food/Drink', + brand: '', + variant: 'Extra topped', + price: 3, + quantity: 2, + currency: 'GBP', + position: 1, + value: 6, + typeOfProduct: 'Food', + url: 'https://www.example.com/product/bacon-jam', + image_url: 'https://www.example.com/product/bacon-jam.jpg', + }, + { + id: 'product-t-shirt', + sku: 'sku-2', + category: 'Merch', + name: 'T-Shirt', + brand: 'Levis', + variant: 'White', + price: 12.99, + quantity: 1, + currency: 'GBP', + position: 2, + value: 12.99, + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/t-shirt', + image_url: 'https://www.example.com/product/t-shirt.jpg', + }, + { + id: 'offer-t-shirt', + sku: 'sku-3', + category: 'Merch', + name: 'T-Shirt-on-offer', + brand: 'Levis', + variant: 'Black', + price: 12.99, + quantity: 1, + currency: 'GBP', + value: 12.99, + coupon: 'APPARELSALE', + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/offer-t-shirt', + image_url: 'https://www.example.com/product/offer-t-shirt.jpg', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2020-06-24T12:05:19.395Z', + }, + destination: { + Config: { + region: '*****', + accessKeyID: '*****', + accessKey: '*****', + eventBusName: 'rudder-test1', + detailType: 'newDetailType', + resourceID: [ + { + arn: 'arn:aws:events:*****:*****:event-bus/rudder-test1', + }, + { + arn: 'arn:aws:events:*****:*****:event-bus/rudder-test2', + }, + ], + }, + Enabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + DetailType: 'newDetailType', + Detail: + '{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.2"},"traits":{"abc":"1234"},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.2"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36","locale":"en-GB","os":{"name":"","version":""},"screen":{"density":2},"page":{"path":"/tests/html/ecomm_test.html","referrer":"http://0.0.0.0:1112/tests/html/","search":"","title":"GA Ecommerce Test","url":"http://0.0.0.0:1112/tests/html/ecomm_test.html"}},"type":"track","messageId":"9116b734-7e6b-4497-ab51-c16744d4487e","originalTimestamp":"2020-06-24T12:05:19.394Z","anonymousId":"38e169a1-3234-46f7-9ceb-c1a6a69005fe","userId":"123","event":"Checkout Started","properties":{"order_id":"5241735","value":31.98,"revenue":31.98,"shipping":4,"coupon":"APPARELSALE","currency":"GBP","products":[{"id":"product-bacon-jam","sku":"sku-1","category":"Merch","name":"Food/Drink","brand":"","variant":"Extra topped","price":3,"quantity":2,"currency":"GBP","position":1,"value":6,"typeOfProduct":"Food","url":"https://www.example.com/product/bacon-jam","image_url":"https://www.example.com/product/bacon-jam.jpg"},{"id":"product-t-shirt","sku":"sku-2","category":"Merch","name":"T-Shirt","brand":"Levis","variant":"White","price":12.99,"quantity":1,"currency":"GBP","position":2,"value":12.99,"typeOfProduct":"Shirt","url":"https://www.example.com/product/t-shirt","image_url":"https://www.example.com/product/t-shirt.jpg"},{"id":"offer-t-shirt","sku":"sku-3","category":"Merch","name":"T-Shirt-on-offer","brand":"Levis","variant":"Black","price":12.99,"quantity":1,"currency":"GBP","value":12.99,"coupon":"APPARELSALE","typeOfProduct":"Shirt","url":"https://www.example.com/product/offer-t-shirt","image_url":"https://www.example.com/product/offer-t-shirt.jpg"}]},"integrations":{"All":true},"sentAt":"2020-06-24T12:05:19.395Z"}', + EventBusName: 'rudder-test1', + Resources: [ + 'arn:aws:events:*****:*****:event-bus/rudder-test1', + 'arn:aws:events:*****:*****:event-bus/rudder-test2', + ], + Source: 'rudderstack', + userId: '123', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'eventbridge', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.2', + }, + traits: { + abc: '1234', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.2', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/tests/html/ecomm_test.html', + referrer: 'http://0.0.0.0:1112/tests/html/', + search: '', + title: 'GA Ecommerce Test', + url: 'http://0.0.0.0:1112/tests/html/ecomm_test.html', + }, + }, + type: 'track', + messageId: '9116b734-7e6b-4497-ab51-c16744d4487e', + originalTimestamp: '2020-06-24T12:05:19.394Z', + anonymousId: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', + event: 'Checkout Started', + properties: { + order_id: '5241735', + value: 31.98, + revenue: 31.98, + shipping: 4, + coupon: 'APPARELSALE', + currency: 'GBP', + products: [ + { + id: 'product-bacon-jam', + sku: 'sku-1', + category: 'Merch', + name: 'Food/Drink', + brand: '', + variant: 'Extra topped', + price: 3, + quantity: 2, + currency: 'GBP', + position: 1, + value: 6, + typeOfProduct: 'Food', + url: 'https://www.example.com/product/bacon-jam', + image_url: 'https://www.example.com/product/bacon-jam.jpg', + }, + { + id: 'product-t-shirt', + sku: 'sku-2', + category: 'Merch', + name: 'T-Shirt', + brand: 'Levis', + variant: 'White', + price: 12.99, + quantity: 1, + currency: 'GBP', + position: 2, + value: 12.99, + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/t-shirt', + image_url: 'https://www.example.com/product/t-shirt.jpg', + }, + { + id: 'offer-t-shirt', + sku: 'sku-3', + category: 'Merch', + name: 'T-Shirt-on-offer', + brand: 'Levis', + variant: 'Black', + price: 12.99, + quantity: 1, + currency: 'GBP', + value: 12.99, + coupon: 'APPARELSALE', + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/offer-t-shirt', + image_url: 'https://www.example.com/product/offer-t-shirt.jpg', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2020-06-24T12:05:19.395Z', + }, + destination: { + Config: { + region: '*****', + accessKeyID: '*****', + accessKey: '*****', + eventBusName: 'rudder-test1', + detailType: 'newDetailType', + resourceID: [ + { + arn: 'arn:aws:events:*****:*****:event-bus/rudder-test1', + }, + { + arn: 'arn:aws:events:*****:*****:event-bus/rudder-test2', + }, + ], + }, + Enabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + DetailType: 'newDetailType', + Detail: + '{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.2"},"traits":{"abc":"1234"},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.2"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36","locale":"en-GB","os":{"name":"","version":""},"screen":{"density":2},"page":{"path":"/tests/html/ecomm_test.html","referrer":"http://0.0.0.0:1112/tests/html/","search":"","title":"GA Ecommerce Test","url":"http://0.0.0.0:1112/tests/html/ecomm_test.html"}},"type":"track","messageId":"9116b734-7e6b-4497-ab51-c16744d4487e","originalTimestamp":"2020-06-24T12:05:19.394Z","anonymousId":"38e169a1-3234-46f7-9ceb-c1a6a69005fe","event":"Checkout Started","properties":{"order_id":"5241735","value":31.98,"revenue":31.98,"shipping":4,"coupon":"APPARELSALE","currency":"GBP","products":[{"id":"product-bacon-jam","sku":"sku-1","category":"Merch","name":"Food/Drink","brand":"","variant":"Extra topped","price":3,"quantity":2,"currency":"GBP","position":1,"value":6,"typeOfProduct":"Food","url":"https://www.example.com/product/bacon-jam","image_url":"https://www.example.com/product/bacon-jam.jpg"},{"id":"product-t-shirt","sku":"sku-2","category":"Merch","name":"T-Shirt","brand":"Levis","variant":"White","price":12.99,"quantity":1,"currency":"GBP","position":2,"value":12.99,"typeOfProduct":"Shirt","url":"https://www.example.com/product/t-shirt","image_url":"https://www.example.com/product/t-shirt.jpg"},{"id":"offer-t-shirt","sku":"sku-3","category":"Merch","name":"T-Shirt-on-offer","brand":"Levis","variant":"Black","price":12.99,"quantity":1,"currency":"GBP","value":12.99,"coupon":"APPARELSALE","typeOfProduct":"Shirt","url":"https://www.example.com/product/offer-t-shirt","image_url":"https://www.example.com/product/offer-t-shirt.jpg"}]},"integrations":{"All":true},"sentAt":"2020-06-24T12:05:19.395Z"}', + EventBusName: 'rudder-test1', + Resources: [ + 'arn:aws:events:*****:*****:event-bus/rudder-test1', + 'arn:aws:events:*****:*****:event-bus/rudder-test2', + ], + Source: 'rudderstack', + userId: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'eventbridge', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.2', + }, + traits: { + abc: '1234', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.2', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/tests/html/ecomm_test.html', + referrer: 'http://0.0.0.0:1112/tests/html/', + search: '', + title: 'GA Ecommerce Test', + url: 'http://0.0.0.0:1112/tests/html/ecomm_test.html', + }, + }, + type: 'track', + messageId: '9116b734-7e6b-4497-ab51-c16744d4487e', + originalTimestamp: '2020-06-24T12:05:19.394Z', + anonymousId: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', + userId: '123', + event: 'Checkout Started', + properties: { + order_id: '5241735', + value: 31.98, + revenue: 31.98, + shipping: 4, + coupon: 'APPARELSALE', + currency: 'GBP', + products: [ + { + id: 'product-bacon-jam', + sku: 'sku-1', + category: 'Merch', + name: 'Food/Drink', + brand: '', + variant: 'Extra topped', + price: 3, + quantity: 2, + currency: 'GBP', + position: 1, + value: 6, + typeOfProduct: 'Food', + url: 'https://www.example.com/product/bacon-jam', + image_url: 'https://www.example.com/product/bacon-jam.jpg', + }, + { + id: 'product-t-shirt', + sku: 'sku-2', + category: 'Merch', + name: 'T-Shirt', + brand: 'Levis', + variant: 'White', + price: 12.99, + quantity: 1, + currency: 'GBP', + position: 2, + value: 12.99, + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/t-shirt', + image_url: 'https://www.example.com/product/t-shirt.jpg', + }, + { + id: 'offer-t-shirt', + sku: 'sku-3', + category: 'Merch', + name: 'T-Shirt-on-offer', + brand: 'Levis', + variant: 'Black', + price: 12.99, + quantity: 1, + currency: 'GBP', + value: 12.99, + coupon: 'APPARELSALE', + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/offer-t-shirt', + image_url: 'https://www.example.com/product/offer-t-shirt.jpg', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2020-06-24T12:05:19.395Z', + }, + destination: { + Enabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Enabled: true, + }, + error: 'EventBridge: received empty config, dropping event', + statTags: { + destType: 'EVENTBRIDGE', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/kinesis/data.js b/test/integrations/destinations/kinesis/data.js new file mode 100644 index 0000000000..f8fc635129 --- /dev/null +++ b/test/integrations/destinations/kinesis/data.js @@ -0,0 +1,851 @@ +const data = [ + { + name: 'kinesis', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + Name: 'Kinesis', + DestinationDefinition: { + ID: '1aA9lTsbB5ZZs4Lj2uIqCSYxYn4', + Name: 'KINESIS', + DisplayName: 'Amazon Kinesis', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: null, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + event: 'Purchase', + integrations: { + All: true, + }, + messageId: '09a85770-e2ab-47ae-8fd7-5770080fd4ab', + originalTimestamp: '2020-04-15T08:31:42.174Z', + properties: { + currency: 'USD', + revenue: 100, + }, + receivedAt: '2020-04-15T14:01:42.198+05:30', + request_ip: '[::1]:58872', + sentAt: '2020-04-15T08:31:42.174Z', + timestamp: '2020-04-15T14:01:42.198+05:30', + type: 'track', + userId: 'user12345', + }, + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 1, + messageId: '09a85770-e2ab-47ae-8fd7-5770080fd4ab', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 1, + messageId: '09a85770-e2ab-47ae-8fd7-5770080fd4ab', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + output: { + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + event: 'Purchase', + integrations: { + All: true, + }, + messageId: '09a85770-e2ab-47ae-8fd7-5770080fd4ab', + originalTimestamp: '2020-04-15T08:31:42.174Z', + properties: { + currency: 'USD', + revenue: 100, + }, + receivedAt: '2020-04-15T14:01:42.198+05:30', + request_ip: '[::1]:58872', + sentAt: '2020-04-15T08:31:42.174Z', + timestamp: '2020-04-15T14:01:42.198+05:30', + type: 'track', + userId: 'user12345', + }, + userId: 'user12345', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kinesis', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + Name: 'Kinesis', + DestinationDefinition: { + ID: '1aA9lTsbB5ZZs4Lj2uIqCSYxYn4', + Name: 'KINESIS', + DisplayName: 'Amazon Kinesis', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: null, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '9e4aad09-7611-4162-9f5b-1150e53e0267', + name: 'home', + originalTimestamp: '2020-04-15T08:31:42.166Z', + properties: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + receivedAt: '2020-04-15T14:01:42.199+05:30', + request_ip: '[::1]:58873', + sentAt: '2020-04-15T08:31:42.167Z', + timestamp: '2020-04-15T14:01:42.198+05:30', + type: 'page', + userId: 'user12345', + }, + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 2, + messageId: '9e4aad09-7611-4162-9f5b-1150e53e0267', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 2, + messageId: '9e4aad09-7611-4162-9f5b-1150e53e0267', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + output: { + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '9e4aad09-7611-4162-9f5b-1150e53e0267', + name: 'home', + originalTimestamp: '2020-04-15T08:31:42.166Z', + properties: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + receivedAt: '2020-04-15T14:01:42.199+05:30', + request_ip: '[::1]:58873', + sentAt: '2020-04-15T08:31:42.167Z', + timestamp: '2020-04-15T14:01:42.198+05:30', + type: 'page', + userId: 'user12345', + }, + userId: 'user12345', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kinesis', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + Name: 'Kinesis', + DestinationDefinition: { + ID: '1aA9lTsbB5ZZs4Lj2uIqCSYxYn4', + Name: 'KINESIS', + DisplayName: 'Amazon Kinesis', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: null, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '89031a1e-29a9-40fd-82b5-37dab7190699', + originalTimestamp: '2020-04-15T08:31:42.169Z', + receivedAt: '2020-04-15T14:01:42.199+05:30', + request_ip: '[::1]:58874', + sentAt: '2020-04-15T08:31:42.169Z', + timestamp: '2020-04-15T14:01:42.199+05:30', + type: 'identify', + userId: 'user12345', + }, + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 3, + messageId: '89031a1e-29a9-40fd-82b5-37dab7190699', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 3, + messageId: '89031a1e-29a9-40fd-82b5-37dab7190699', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + output: { + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '89031a1e-29a9-40fd-82b5-37dab7190699', + originalTimestamp: '2020-04-15T08:31:42.169Z', + receivedAt: '2020-04-15T14:01:42.199+05:30', + request_ip: '[::1]:58874', + sentAt: '2020-04-15T08:31:42.169Z', + timestamp: '2020-04-15T14:01:42.199+05:30', + type: 'identify', + userId: 'user12345', + }, + userId: 'user12345', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kinesis', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + Name: 'Kinesis', + DestinationDefinition: { + ID: '1aA9lTsbB5ZZs4Lj2uIqCSYxYn4', + Name: 'KINESIS', + DisplayName: 'Amazon Kinesis', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: null, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + event: 'test track without property', + integrations: { + All: true, + }, + messageId: '2d165402-c301-4c4f-8f17-c3c2f5a83725', + originalTimestamp: '2020-04-15T08:31:42.17Z', + properties: {}, + receivedAt: '2020-04-15T14:01:42.199+05:30', + request_ip: '[::1]:58875', + sentAt: '2020-04-15T08:31:42.171Z', + timestamp: '2020-04-15T14:01:42.198+05:30', + type: 'track', + userId: 'user12345', + }, + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 4, + messageId: '2d165402-c301-4c4f-8f17-c3c2f5a83725', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 4, + messageId: '2d165402-c301-4c4f-8f17-c3c2f5a83725', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + output: { + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + event: 'test track without property', + integrations: { + All: true, + }, + messageId: '2d165402-c301-4c4f-8f17-c3c2f5a83725', + originalTimestamp: '2020-04-15T08:31:42.17Z', + properties: {}, + receivedAt: '2020-04-15T14:01:42.199+05:30', + request_ip: '[::1]:58875', + sentAt: '2020-04-15T08:31:42.171Z', + timestamp: '2020-04-15T14:01:42.198+05:30', + type: 'track', + userId: 'user12345', + }, + userId: 'user12345', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kinesis', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + Name: 'Kinesis', + DestinationDefinition: { + ID: '1aA9lTsbB5ZZs4Lj2uIqCSYxYn4', + Name: 'KINESIS', + DisplayName: 'Amazon Kinesis', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: null, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + event: 'test track with property', + integrations: { + All: true, + }, + messageId: 'c122dbd5-43cc-4636-9baf-b724be86ad10', + originalTimestamp: '2020-04-15T08:31:42.172Z', + properties: { + test_prop_1: 'test prop', + test_prop_2: 1232, + }, + receivedAt: '2020-04-15T14:01:42.199+05:30', + request_ip: '[::1]:58876', + sentAt: '2020-04-15T08:31:42.172Z', + timestamp: '2020-04-15T14:01:42.199+05:30', + type: 'track', + userId: 'user12345', + }, + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 5, + messageId: 'c122dbd5-43cc-4636-9baf-b724be86ad10', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + destinationId: '1aAAvbZ2FMoxM0LuxXdqimZ9HEp', + destinationType: 'KINESIS', + jobId: 5, + messageId: 'c122dbd5-43cc-4636-9baf-b724be86ad10', + sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', + }, + output: { + message: { + anonymousId: 'c063778b-8477-4c28-a07d-cae9ab3f8e7b', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/index4.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index4.html', + }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', + }, + event: 'test track with property', + integrations: { + All: true, + }, + messageId: 'c122dbd5-43cc-4636-9baf-b724be86ad10', + originalTimestamp: '2020-04-15T08:31:42.172Z', + properties: { + test_prop_1: 'test prop', + test_prop_2: 1232, + }, + receivedAt: '2020-04-15T14:01:42.199+05:30', + request_ip: '[::1]:58876', + sentAt: '2020-04-15T08:31:42.172Z', + timestamp: '2020-04-15T14:01:42.199+05:30', + type: 'track', + userId: 'user12345', + }, + userId: 'user12345', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/pipedream/processor/data.js b/test/integrations/destinations/pipedream/processor/data.js new file mode 100644 index 0000000000..cbb4a668a6 --- /dev/null +++ b/test/integrations/destinations/pipedream/processor/data.js @@ -0,0 +1,51 @@ +const data = [{ + "name": "pipedream", + "description": "Dynamic Header and Append Header", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","context":{"device":{"id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","manufacturer":"Xiaomi","model":"Redmi 6","name":"xiaomi"},"network":{"carrier":"Banglalink"},"os":{"name":"android","version":"8.1.0"},"traits":{"address":{"city":"Dhaka","country":"Bangladesh"},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"}},"event":"spin_result","integrations":{"All":true},"message_id":"a80f82be-9bdc-4a9f-b2a5-15621ee41df8","properties":{"additional_bet_index":0,"battle_id":"N/A","featureGameType":"N/A","win_amount":0},"timestamp":"2019-09-01T15:46:51.693229+05:30","type":"track","header":{"dynamic_header_key_string":"dynamic_header_value_string","dynamic_header_key_num":10,"dynamic_header_key_object":{"k1":"v1"}},"appendPath":"/product/search?string=value"},"destination":{"Config":{"pipedreamUrl":"http://6b0e6a60.ngrok.io","headers":[{"from":"","to":""},{"from":"test2","to":"value2"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"JSON_ARRAY":{},"JSON":{"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","context":{"device":{"id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","manufacturer":"Xiaomi","model":"Redmi 6","name":"xiaomi"},"network":{"carrier":"Banglalink"},"os":{"name":"android","version":"8.1.0"},"traits":{"address":{"city":"Dhaka","country":"Bangladesh"},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"}},"event":"spin_result","integrations":{"All":true},"message_id":"a80f82be-9bdc-4a9f-b2a5-15621ee41df8","properties":{"additional_bet_index":0,"battle_id":"N/A","featureGameType":"N/A","win_amount":0},"timestamp":"2019-09-01T15:46:51.693229+05:30","type":"track"},"FORM":{}},"files":{},"endpoint":"http://6b0e6a60.ngrok.io/product/search?string=value","userId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","headers":{"content-type":"application/json","test2":"value2","dynamic_header_key_string":"dynamic_header_value_string"},"version":"1","params":{},"type":"REST","method":"POST"}, + "statusCode": 200}] + } + } + },{ + "name": "pipedream", + "description": "Dynamic Header", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","context":{"device":{"id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","manufacturer":"Xiaomi","model":"Redmi 6","name":"xiaomi"},"network":{"carrier":"Banglalink"},"os":{"name":"android","version":"8.1.0"},"traits":{"address":{"city":"Dhaka","country":"Bangladesh"},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"}},"event":"spin_result","integrations":{"All":true},"message_id":"a80f82be-9bdc-4a9f-b2a5-15621ee41df8","properties":{"additional_bet_index":0,"battle_id":"N/A","featureGameType":"N/A","win_amount":0},"timestamp":"2019-09-01T15:46:51.693229+05:30","type":"track","header":{"dynamic_header_key_string":"dynamic_header_value_string","dynamic_header_key_num":10,"dynamic_header_key_object":{"k1":"v1"}}},"destination":{"Config":{"pipedreamUrl":"http://6b0e6a60.ngrok.io","pipedreamMethod":"PUT","headers":[{"from":"","to":""},{"from":"test2","to":"value2"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"JSON_ARRAY":{},"JSON":{"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","context":{"device":{"id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","manufacturer":"Xiaomi","model":"Redmi 6","name":"xiaomi"},"network":{"carrier":"Banglalink"},"os":{"name":"android","version":"8.1.0"},"traits":{"address":{"city":"Dhaka","country":"Bangladesh"},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"}},"event":"spin_result","integrations":{"All":true},"message_id":"a80f82be-9bdc-4a9f-b2a5-15621ee41df8","properties":{"additional_bet_index":0,"battle_id":"N/A","featureGameType":"N/A","win_amount":0},"timestamp":"2019-09-01T15:46:51.693229+05:30","type":"track"},"FORM":{}},"files":{},"endpoint":"http://6b0e6a60.ngrok.io","userId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","headers":{"content-type":"application/json","test2":"value2","dynamic_header_key_string":"dynamic_header_value_string"},"version":"1","params":{},"type":"REST","method":"PUT"}, + "statusCode": 200}] + } + } + }]; module.exports = { + data + } \ No newline at end of file diff --git a/test/integrations/destinations/pipedream/router/data.js b/test/integrations/destinations/pipedream/router/data.js new file mode 100644 index 0000000000..2ab4b77012 --- /dev/null +++ b/test/integrations/destinations/pipedream/router/data.js @@ -0,0 +1,523 @@ +const data = [ + { + "name": "pipedream", + "description": "Track Sucessfull Call with Headers from Config", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "pipedreamUrl": "http://6b0e6a60.ngrok.io", + "headers": [ + { + "from": "", + "to": "" + }, + { + "from": "test2", + "to": "value2" + } + ] + } + } + }] + , "destType": "pipedream" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "JSON": { + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "user_properties": { + "total_payments": 0, + "internetReachability": "ReachableViaLocalAreaNetwork", + "level": 6, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "coin_balance": 9466052, + "player_total_shields": 0, + "isLowEndDevice": false, + "game_fps": 30, + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "graphicsQuality": "HD", + "current_module_name": "CasinoGameModule", + "player_total_battles": 0, + "lifetime_gem_balance": 0, + "gem_balance": 0, + "fb_profile": "0", + "start_date": "2019-08-01", + "versionSessionCount": 2, + "game_name": "FireEagleSlots" + }, + "integrations": { + "All": true + }, + "event": "spin_result", + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "model": "Redmi 6", + "manufacturer": "Xiaomi", + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "name": "xiaomi" + }, + "traits": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "address": { + "city": "Dhaka", + "country": "Bangladesh" + } + }, + "os": { + "version": "8.1.0", + "name": "android" + }, + "network": { + "carrier": "Banglalink" + } + }, + "type": "track", + "properties": { + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "jackpot_win_type": "Silver", + "coin_balance": 9466052, + "bet_level": 1, + "ishighroller": "False", + "tournament_id": "T1561970819", + "battle_id": "N/A", + "bet_amount": 9, + "fb_profile": "0", + "player_total_shields": 0, + "is_turbo": "False", + "player_total_battles": 0, + "bet_multiplier": 1, + "start_date": "2019-08-01", + "versionSessionCount": 2, + "graphicsQuality": "HD", + "is_auto_spin": "False", + "days_in_game": 0, + "additional_bet_index": 0, + "isLowEndDevice": "False", + "game_fps": 30, + "extra_param": "N/A", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "current_module_name": "CasinoGameModule", + "game_id": "fireEagleBase", + "featureGameType": "N/A", + "gem_balance": 0, + "internetReachability": "ReachableViaLocalAreaNetwork", + "total_payments": 0, + "level": 6, + "win_amount": 0, + "no_of_spin": 1, + "game_name": "FireEagleSlots", + "jackpot_win_amount": 90, + "lifetime_gem_balance": 0, + "isf": "False" + } + }, + "FORM": {} + }, + "files": {}, + "endpoint": "http://6b0e6a60.ngrok.io", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "headers": { + "content-type": "application/json", + "test2": "value2" + }, + "version": "1", + "params": {}, + "type": "REST", + "method": "POST" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "pipedreamUrl": "http://6b0e6a60.ngrok.io", + "headers": [ + { + "from": "", + "to": "" + }, + { + "from": "test2", + "to": "value2" + } + ] + } + } + } + ] + } + } + } + }, + { + "name": "pipedream", + "description": "Track Call without extra Headers", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "pipedreamUrl": "https://6b0e6a60.ngrok.io/n" + } + } + }] + , "destType": "pipedream" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "JSON": { + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "user_properties": { + "total_payments": 0, + "internetReachability": "ReachableViaLocalAreaNetwork", + "level": 6, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "coin_balance": 9466052, + "player_total_shields": 0, + "isLowEndDevice": false, + "game_fps": 30, + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "graphicsQuality": "HD", + "current_module_name": "CasinoGameModule", + "player_total_battles": 0, + "lifetime_gem_balance": 0, + "gem_balance": 0, + "fb_profile": "0", + "start_date": "2019-08-01", + "versionSessionCount": 2, + "game_name": "FireEagleSlots" + }, + "integrations": { + "All": true + }, + "event": "spin_result", + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "model": "Redmi 6", + "manufacturer": "Xiaomi", + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "name": "xiaomi" + }, + "traits": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "address": { + "city": "Dhaka", + "country": "Bangladesh" + } + }, + "os": { + "version": "8.1.0", + "name": "android" + }, + "network": { + "carrier": "Banglalink" + } + }, + "type": "track", + "properties": { + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "jackpot_win_type": "Silver", + "coin_balance": 9466052, + "bet_level": 1, + "ishighroller": "False", + "tournament_id": "T1561970819", + "battle_id": "N/A", + "bet_amount": 9, + "fb_profile": "0", + "player_total_shields": 0, + "is_turbo": "False", + "player_total_battles": 0, + "bet_multiplier": 1, + "start_date": "2019-08-01", + "versionSessionCount": 2, + "graphicsQuality": "HD", + "is_auto_spin": "False", + "days_in_game": 0, + "additional_bet_index": 0, + "isLowEndDevice": "False", + "game_fps": 30, + "extra_param": "N/A", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "current_module_name": "CasinoGameModule", + "game_id": "fireEagleBase", + "featureGameType": "N/A", + "gem_balance": 0, + "internetReachability": "ReachableViaLocalAreaNetwork", + "total_payments": 0, + "level": 6, + "win_amount": 0, + "no_of_spin": 1, + "game_name": "FireEagleSlots", + "jackpot_win_amount": 90, + "lifetime_gem_balance": 0, + "isf": "False" + } + }, + "FORM": {} + }, + "files": {}, + "endpoint": "https://6b0e6a60.ngrok.io/n", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "headers": { + "content-type": "application/json" + }, + "version": "1", + "params": {}, + "type": "REST", + "method": "POST" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "pipedreamUrl": "https://6b0e6a60.ngrok.io/n" + } + } + } + ] + } + } + } + } +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/posthog/processor/data.js b/test/integrations/destinations/posthog/processor/data.js new file mode 100644 index 0000000000..274c0c4139 --- /dev/null +++ b/test/integrations/destinations/posthog/processor/data.js @@ -0,0 +1,291 @@ +const data = [{ + "name": "posthog", + "description": "PostHog alias call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com/"}},"message":{"event":"event-alias","context":{"ip":"0.0.0.0","device":{"id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","manufacturer":"Xiaomi","model":"Redmi 6","name":"xiaomi"},"network":{"carrier":"Banglalink"},"os":{"name":"android","version":"8.1.0"},"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.7"},"traits":{"address":{"city":"Dhaka","country":"Bangladesh"},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"}},"type":"alias","timestamp":"2020-11-04T13:21:09.712Z","userId":"uid-1","previousId":"prevId_1","anonymousId":"f3cf54d8-f237-45d2-89f7-ccd70d42cf31"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"properties":{"$set":{"address":{"city":"Dhaka","country":"Bangladesh"},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"},"$os":"android","$time":"2020-11-04T13:21:09.712Z","$device_id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","$ip":"0.0.0.0","$timestamp":"2020-11-04T13:21:09.712Z","$anon_distinct_id":"f3cf54d8-f237-45d2-89f7-ccd70d42cf31","distinct_id":"prevId_1","$device_manufacturer":"Xiaomi","$os_version":"8.1.0","$app_version":"1.1.7","$device_name":"xiaomi","$network_carrier":"Banglalink","$app_name":"RudderLabs JavaScript SDK","$device_model":"Redmi 6","$app_namespace":"com.rudderlabs.javascript","$app_build":"1.0.0","alias":"uid-1"},"timestamp":"2020-11-04T13:21:09.712Z","event":"$create_alias","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"alias"},"XML":{},"JSON_ARRAY":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog track call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE"}},"message":{"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","event":"Product Brought","context":{"ip":"0.0.0.0","device":{"id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","manufacturer":"Xiaomi","model":"Redmi 6","name":"xiaomi"},"network":{"carrier":"Banglalink"},"os":{"name":"android","version":"8.1.0"},"traits":{"address":{"city":"Dhaka","country":"Bangladesh"},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"}},"type":"track","properties":{"additional_bet_index":0,"battle_id":"N/A","bet_amount":9,"bet_level":1,"bet_multiplier":1,"coin_balance":9466052,"current_module_name":"CasinoGameModule","days_in_game":0,"extra_param":"N/A","fb_profile":"0","featureGameType":"N/A","game_fps":30,"game_id":"fireEagleBase","game_name":"FireEagleSlots","gem_balance":0,"graphicsQuality":"HD","idfa":"2bf99787-33d2-4ae2-a76a-c49672f97252","internetReachability":"ReachableViaLocalAreaNetwork","isLowEndDevice":"False","is_auto_spin":"False","is_turbo":"False","isf":"False","ishighroller":"False","jackpot_win_amount":90,"jackpot_win_type":"Silver","level":6,"lifetime_gem_balance":0,"no_of_spin":1,"player_total_battles":0,"player_total_shields":0,"start_date":"2019-08-01","total_payments":0,"tournament_id":"T1561970819","versionSessionCount":2,"win_amount":0},"timestamp":"2020-11-04T13:21:09.712Z","userId":"uid-2","messageId":"e4408cb8-16dd-41e9-a313-a7a9cdc4bac5"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"distinct_id":"uid-2","event":"Product Brought","messageId":"e4408cb8-16dd-41e9-a313-a7a9cdc4bac5","properties":{"$set":{"address":{"city":"Dhaka","country":"Bangladesh"},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"},"$os":"android","$time":"2020-11-04T13:21:09.712Z","$device_id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","$ip":"0.0.0.0","$timestamp":"2020-11-04T13:21:09.712Z","$anon_distinct_id":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","distinct_id":"uid-2","$device_manufacturer":"Xiaomi","$os_version":"8.1.0","$device_name":"xiaomi","$network_carrier":"Banglalink","$device_model":"Redmi 6","additional_bet_index":0,"battle_id":"N/A","bet_amount":9,"bet_level":1,"bet_multiplier":1,"coin_balance":9466052,"current_module_name":"CasinoGameModule","days_in_game":0,"extra_param":"N/A","fb_profile":"0","featureGameType":"N/A","game_fps":30,"game_id":"fireEagleBase","game_name":"FireEagleSlots","gem_balance":0,"graphicsQuality":"HD","idfa":"2bf99787-33d2-4ae2-a76a-c49672f97252","internetReachability":"ReachableViaLocalAreaNetwork","isLowEndDevice":"False","is_auto_spin":"False","is_turbo":"False","isf":"False","ishighroller":"False","jackpot_win_amount":90,"jackpot_win_type":"Silver","level":6,"lifetime_gem_balance":0,"no_of_spin":1,"player_total_battles":0,"player_total_shields":0,"start_date":"2019-08-01","total_payments":0,"tournament_id":"T1561970819","versionSessionCount":2,"win_amount":0},"timestamp":"2020-11-04T13:21:09.712Z","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"capture"},"XML":{},"JSON_ARRAY":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog track call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com"}},"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.7"},"traits":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r1@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.7"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","locale":"en-GB","os":{"name":"","version":""},"screen":{"density":2},"campaign":{},"page":{"path":"/Rectified.html","referrer":"http://localhost:1112/","search":"","title":"","url":"http://localhost:1112/Rectified.html"},"ip":"0.0.0.0","userID":"sampleUserOption"},"type":"track","messageId":"07cd68e5-9ad9-4a79-af51-f7118bc9ed71","originalTimestamp":"2020-11-04T13:21:09.712Z","anonymousId":"a47b753d-c7d3-40ca-88dc-a1bb79e997e8","userId":"uid-3","event":"order completed","properties":{"path":"path","referrer":"referrer","search":"search","KEY_3":{"CHILD_KEY_4":"value_3","CHILD_KEY_5":"value_4"},"title":"title","url":"url","total":1009,"products":[{"product_id":"507f1f77bcf86cd79943901ghh1","sku":"45790-38","name":"Monopoly: 7rd Edition","price":19,"position":"1","category":"Cars","quantity":4,"currency":"USD","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"},{"product_id":"507f1f77bcf86cd79943901gth1","sku":"45790-39","name":"Monopoly: 8th Edition","price":19,"quantity":2,"position":"1","currency":"USD","category":"Cars","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"}]},"integrations":{"All":true},"sentAt":"2020-11-04T13:21:09.712Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"distinct_id":"uid-3","event":"order completed","messageId":"07cd68e5-9ad9-4a79-af51-f7118bc9ed71","properties":{"$set":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r1@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"$current_url":"http://localhost:1112/Rectified.html","$pathname":"/Rectified.html","$lib":"RudderLabs JavaScript SDK","$lib_version":"1.1.7","$time":"2020-11-04T13:21:09.712Z","$ip":"0.0.0.0","$timestamp":"2020-11-04T13:21:09.712Z","$anon_distinct_id":"a47b753d-c7d3-40ca-88dc-a1bb79e997e8","distinct_id":"uid-3","$screen_density":2,"$locale":"en-GB","$useragent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","$app_version":"1.1.7","$app_name":"RudderLabs JavaScript SDK","$app_namespace":"com.rudderlabs.javascript","$app_build":"1.0.0","$os":"Mac OS","$browser":"Chrome","$browser_version":"86.0.4240.111","$host":"localhost:1112","path":"path","referrer":"referrer","search":"search","KEY_3":{"CHILD_KEY_4":"value_3","CHILD_KEY_5":"value_4"},"title":"title","url":"url","total":1009,"products":[{"product_id":"507f1f77bcf86cd79943901ghh1","sku":"45790-38","name":"Monopoly: 7rd Edition","price":19,"position":"1","category":"Cars","quantity":4,"currency":"USD","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"},{"product_id":"507f1f77bcf86cd79943901gth1","sku":"45790-39","name":"Monopoly: 8th Edition","price":19,"quantity":2,"position":"1","currency":"USD","category":"Cars","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"}]},"timestamp":"2020-11-04T13:21:09.712Z","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"capture"},"XML":{},"JSON_ARRAY":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com/"}},"message":{"type":"screen","event":"HomePage","sentAt":"2020-11-12T21:12:54.117Z","userId":"sajal","channel":"mobile","context":{"os":{"name":"Android","version":"10"},"app":{"name":"AMTestProject","build":"1","version":"1.0","namespace":"com.rudderstack.android.rudderstack.sampleAndroidApp"},"device":{"id":"9c6bd77ea9da3e68","name":"raphaelin","type":"Android","model":"Redmi K20 Pro","manufacturer":"Xiaomi"},"locale":"en-IN","screen":{"width":1080,"height":2210,"density":440},"traits":{"id":"sajal","age":"30","name":"User_id_identify","email":"identify@test.com","phone":"9112340345","price":"56.0","userId":"sajal","address":{"city":"KOlkata","state":"West bengal","street":"Park Street","country":"India","postalcode":"700096"},"birthday":"2020-11-13","lastname":"Mohanta","quantity":"5","username":"Samle_putUserName","createdat":"18th March 2020","firstname":"Sajal","anonymousId":"9c6bd77ea9da3e68","description":"Sample description"},"library":{"name":"com.rudderstack.android.sdk.core","version":"1.0.8"},"network":{"wifi":true,"carrier":"airtel","cellular":true,"bluetooth":false},"timezone":"Asia/Kolkata","userAgent":"Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.3.0.QFKINXM)"},"messageId":"1605215561320-917a2554-87fd-4f9e-881d-9d29e8f30490","properties":{"name":"HomePage"},"anonymousId":"9c6bd77ea9da3e68","integrations":{"All":true},"originalTimestamp":"2020-11-12T21:12:41.320Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"properties":{"$set":{"id":"sajal","age":"30","name":"User_id_identify","email":"identify@test.com","phone":"9112340345","price":"56.0","userId":"sajal","address":{"city":"KOlkata","state":"West bengal","street":"Park Street","country":"India","postalcode":"700096"},"birthday":"2020-11-13","lastname":"Mohanta","quantity":"5","username":"Samle_putUserName","createdat":"18th March 2020","firstname":"Sajal","anonymousId":"9c6bd77ea9da3e68","description":"Sample description"},"$os":"Android","$screen_height":2210,"$screen_width":1080,"$lib":"com.rudderstack.android.sdk.core","$lib_version":"1.0.8","$time":"2020-11-12T21:12:41.320Z","$device_id":"9c6bd77ea9da3e68","$timestamp":"2020-11-12T21:12:41.320Z","$anon_distinct_id":"9c6bd77ea9da3e68","distinct_id":"sajal","$screen_density":440,"$device_manufacturer":"Xiaomi","$os_version":"10","$timezone":"Asia/Kolkata","$locale":"en-IN","$useragent":"Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.3.0.QFKINXM)","$app_version":"1.0","$device_name":"raphaelin","$network_carrier":"airtel","$app_name":"AMTestProject","$device_model":"Redmi K20 Pro","$app_namespace":"com.rudderstack.android.rudderstack.sampleAndroidApp","$app_build":"1","$screen_name":"HomePage","name":"HomePage"},"timestamp":"2020-11-12T21:12:41.320Z","distinct_id":"sajal","messageId":"1605215561320-917a2554-87fd-4f9e-881d-9d29e8f30490","event":"$screen","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"screen"},"XML":{},"JSON_ARRAY":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog identify call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com/"}},"message":{"type":"identify","event":"identify","sentAt":"2020-11-12T21:12:54.117Z","userId":"sajal","channel":"mobile","context":{"os":{"name":"Android","version":"10"},"app":{"name":"AMTestProject","build":"1","version":"1.0","namespace":"com.rudderstack.android.rudderstack.sampleAndroidApp"},"device":{"id":"9c6bd77ea9da3e68","name":"raphaelin","type":"Android","model":"Redmi K20 Pro","manufacturer":"Xiaomi"},"locale":"en-IN","screen":{"width":1080,"height":2210,"density":440},"traits":{"id":"sajal","age":"30","name":"User_id_identify","email":"identify@test.com","phone":"9112340345","price":"56.0","userId":"sajal","address":{"city":"KOlkata","state":"West bengal","street":"Park Street","country":"India","postalcode":"700096"},"birthday":"2020-11-13","lastname":"Mohanta","quantity":"5","username":"Samle_putUserName","createdat":"18th March 2020","firstname":"Sajal","anonymousId":"9c6bd77ea9da3e68","description":"Sample description"},"library":{"name":"com.rudderstack.android.sdk.core","version":"1.0.8"},"network":{"wifi":true,"carrier":"airtel","cellular":true,"bluetooth":false},"timezone":"Asia/Kolkata","userAgent":"Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.3.0.QFKINXM)"},"messageId":"1605215561266-084c95fb-aaf6-4abf-9b3b-7ac449a2d4fb","anonymousId":"9c6bd77ea9da3e68","integrations":{"All":true},"originalTimestamp":"2020-11-12T21:12:41.266Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"distinct_id":"sajal","timestamp":"2020-11-12T21:12:41.266Z","messageId":"1605215561266-084c95fb-aaf6-4abf-9b3b-7ac449a2d4fb","$set":{"id":"sajal","age":"30","name":"User_id_identify","email":"identify@test.com","phone":"9112340345","price":"56.0","userId":"sajal","address":{"city":"KOlkata","state":"West bengal","street":"Park Street","country":"India","postalcode":"700096"},"birthday":"2020-11-13","lastname":"Mohanta","quantity":"5","username":"Samle_putUserName","createdat":"18th March 2020","firstname":"Sajal","anonymousId":"9c6bd77ea9da3e68","description":"Sample description"},"properties":{"$os":"Android","$screen_height":2210,"$screen_width":1080,"$lib":"com.rudderstack.android.sdk.core","$lib_version":"1.0.8","$time":"2020-11-12T21:12:41.266Z","$device_id":"9c6bd77ea9da3e68","$timestamp":"2020-11-12T21:12:41.266Z","$anon_distinct_id":"9c6bd77ea9da3e68","distinct_id":"sajal","$screen_density":440,"$device_manufacturer":"Xiaomi","$os_version":"10","$timezone":"Asia/Kolkata","$locale":"en-IN","$useragent":"Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.3.0.QFKINXM)","$app_version":"1.0","$device_name":"raphaelin","$network_carrier":"airtel","$app_name":"AMTestProject","$device_model":"Redmi K20 Pro","$app_namespace":"com.rudderstack.android.rudderstack.sampleAndroidApp","$app_build":"1"},"event":"$identify","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"identify"},"XML":{},"JSON_ARRAY":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog track call with custom event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com"}},"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.7"},"traits":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r1@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.7"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","locale":"en-GB","os":{"name":"","version":""},"screen":{"density":2},"campaign":{},"page":{"path":"/Rectified.html","referrer":"http://localhost:1112/","search":"","title":"","url":"http://localhost:1112/Rectified.html"},"ip":"0.0.0.0","userID":"sampleUserOption"},"type":"track","messageId":"07cd68e5-9ad9-4a79-af51-f7118bc9ed71","originalTimestamp":"2020-11-04T13:21:09.712Z","anonymousId":"a47b753d-c7d3-40ca-88dc-a1bb79e997e8","userId":null,"event":"order completed","properties":{"path":"path","referrer":"referrer","search":"search","KEY_3":{"CHILD_KEY_4":"value_3","CHILD_KEY_5":"value_4"},"title":"title","url":"url","total":1009,"products":[{"product_id":"507f1f77bcf86cd79943901ghh1","sku":"45790-38","name":"Monopoly: 7rd Edition","price":19,"position":"1","category":"Cars","quantity":4,"currency":"USD","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"},{"product_id":"507f1f77bcf86cd79943901gth1","sku":"45790-39","name":"Monopoly: 8th Edition","price":19,"quantity":2,"position":"1","currency":"USD","category":"Cars","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"}]},"integrations":{"All":true},"sentAt":"2020-11-04T13:21:09.712Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"distinct_id":"a47b753d-c7d3-40ca-88dc-a1bb79e997e8","event":"order completed","messageId":"07cd68e5-9ad9-4a79-af51-f7118bc9ed71","properties":{"$set":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r1@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"$current_url":"http://localhost:1112/Rectified.html","$pathname":"/Rectified.html","$lib":"RudderLabs JavaScript SDK","$lib_version":"1.1.7","$time":"2020-11-04T13:21:09.712Z","$ip":"0.0.0.0","$timestamp":"2020-11-04T13:21:09.712Z","$anon_distinct_id":"a47b753d-c7d3-40ca-88dc-a1bb79e997e8","distinct_id":"a47b753d-c7d3-40ca-88dc-a1bb79e997e8","$screen_density":2,"$locale":"en-GB","$useragent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","$app_version":"1.1.7","$app_name":"RudderLabs JavaScript SDK","$app_namespace":"com.rudderlabs.javascript","$app_build":"1.0.0","$os":"Mac OS","$browser":"Chrome","$browser_version":"86.0.4240.111","$host":"localhost:1112","path":"path","referrer":"referrer","search":"search","KEY_3":{"CHILD_KEY_4":"value_3","CHILD_KEY_5":"value_4"},"title":"title","url":"url","total":1009,"products":[{"product_id":"507f1f77bcf86cd79943901ghh1","sku":"45790-38","name":"Monopoly: 7rd Edition","price":19,"position":"1","category":"Cars","quantity":4,"currency":"USD","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"},{"product_id":"507f1f77bcf86cd79943901gth1","sku":"45790-39","name":"Monopoly: 8th Edition","price":19,"quantity":2,"position":"1","currency":"USD","category":"Cars","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"}]},"timestamp":"2020-11-04T13:21:09.712Z","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"capture"},"XML":{},"JSON_ARRAY":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog track call with custom event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com"}},"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.7"},"traits":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r1@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.7"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","locale":"en-GB","os":{"name":"","version":""},"screen":{"density":2},"campaign":{},"page":{"path":"/Rectified.html","referrer":"http://localhost:1112/","search":"","title":"","url":"http://localhost:1112/Rectified.html"},"ip":"0.0.0.0","userID":"sampleUserOption"},"type":"track","messageId":"07cd68e5-9ad9-4a79-af51-f7118bc9ed71","originalTimestamp":"2020-11-04T13:21:09.712Z","anonymousId":"a47b753d-c7d3-40ca-88dc-a1bb79e997e8","userId":123,"event":"order completed","properties":{"path":"path","referrer":"referrer","search":"search","KEY_3":{"CHILD_KEY_4":"value_3","CHILD_KEY_5":"value_4"},"title":"title","url":"url","total":1009,"products":[{"product_id":"507f1f77bcf86cd79943901ghh1","sku":"45790-38","name":"Monopoly: 7rd Edition","price":19,"position":"1","category":"Cars","quantity":4,"currency":"USD","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"},{"product_id":"507f1f77bcf86cd79943901gth1","sku":"45790-39","name":"Monopoly: 8th Edition","price":19,"quantity":2,"position":"1","currency":"USD","category":"Cars","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"}]},"integrations":{"All":true},"sentAt":"2020-11-04T13:21:09.712Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"distinct_id":"123","event":"order completed","messageId":"07cd68e5-9ad9-4a79-af51-f7118bc9ed71","properties":{"$set":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r1@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"$current_url":"http://localhost:1112/Rectified.html","$pathname":"/Rectified.html","$lib":"RudderLabs JavaScript SDK","$lib_version":"1.1.7","$time":"2020-11-04T13:21:09.712Z","$ip":"0.0.0.0","$timestamp":"2020-11-04T13:21:09.712Z","$anon_distinct_id":"a47b753d-c7d3-40ca-88dc-a1bb79e997e8","distinct_id":"123","$screen_density":2,"$locale":"en-GB","$useragent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","$app_version":"1.1.7","$app_name":"RudderLabs JavaScript SDK","$app_namespace":"com.rudderlabs.javascript","$app_build":"1.0.0","$os":"Mac OS","$browser":"Chrome","$browser_version":"86.0.4240.111","$host":"localhost:1112","path":"path","referrer":"referrer","search":"search","KEY_3":{"CHILD_KEY_4":"value_3","CHILD_KEY_5":"value_4"},"title":"title","url":"url","total":1009,"products":[{"product_id":"507f1f77bcf86cd79943901ghh1","sku":"45790-38","name":"Monopoly: 7rd Edition","price":19,"position":"1","category":"Cars","quantity":4,"currency":"USD","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"},{"product_id":"507f1f77bcf86cd79943901gth1","sku":"45790-39","name":"Monopoly: 8th Edition","price":19,"quantity":2,"position":"1","currency":"USD","category":"Cars","url":"https://www.example.com/product/path","image_url":"https://www.example.com/product/path.jpg"}]},"timestamp":"2020-11-04T13:21:09.712Z","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"capture"},"XML":{},"JSON_ARRAY":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog group call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com/","useV2Group":false}},"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.5"},"traits":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.5"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","locale":"en-US","os":{"name":"","version":""},"screen":{"density":0.8999999761581421},"page":{"path":"/destinations/amplitude","referrer":"","search":"","title":"","url":"https://docs.rudderstack.com/destinations/amplitude","category":"destination","initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com"}},"type":"group","messageId":"e5034df0-a404-47b4-a463-76df99934fea","anonymousId":"my-anonymous-id-new","userId":"sampleusrRudder7","integrations":{"All":true},"groupId":"Sample_groupId27","traits":{"groupType":"company","KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"Comapny-ABC"},"sentAt":"2020-10-20T07:54:58.983Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"groupId":"Sample_groupId27","distinct_id":"sampleusrRudder7","traits":{"groupType":"company","KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"Comapny-ABC"},"messageId":"e5034df0-a404-47b4-a463-76df99934fea","properties":{"$set":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"$current_url":"https://docs.rudderstack.com/destinations/amplitude","$pathname":"/destinations/amplitude","$lib":"RudderLabs JavaScript SDK","$lib_version":"1.1.5","$anon_distinct_id":"my-anonymous-id-new","distinct_id":"sampleusrRudder7","$screen_density":0.8999999761581421,"$locale":"en-US","$useragent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","$app_version":"1.1.5","$app_name":"RudderLabs JavaScript SDK","$app_namespace":"com.rudderlabs.javascript","$app_build":"1.0.0","$os":"Mac OS","$browser":"Chrome","$browser_version":"85.0.4183.121","$host":"docs.rudderstack.com"},"event":"$groupidentify","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"group"},"JSON_ARRAY":{},"XML":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog group call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com/","useV2Group":true}},"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.5"},"traits":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.5"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","locale":"en-US","os":{"name":"","version":""},"screen":{"density":0.8999999761581421},"page":{"path":"/destinations/amplitude","referrer":"","search":"","title":"","url":"https://docs.rudderstack.com/destinations/amplitude","category":"destination","initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com"}},"type":"group","messageId":"e5034df0-a404-47b4-a463-76df99934fea","anonymousId":"my-anonymous-id-new","userId":"sampleusrRudder7","integrations":{"All":true},"groupId":"Sample_groupId27","traits":{"groupType":"company","KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"Comapny-ABC"},"sentAt":"2020-10-20T07:54:58.983Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"properties":{"$set":{"name":"Shehan Study","category":"SampleIdentify","email":"chandra+r@rudderlabs.com","plan":"Open source","logins":5,"createdAt":1599264000},"$current_url":"https://docs.rudderstack.com/destinations/amplitude","$pathname":"/destinations/amplitude","$lib":"RudderLabs JavaScript SDK","$lib_version":"1.1.5","$anon_distinct_id":"my-anonymous-id-new","distinct_id":"sampleusrRudder7","$screen_density":0.8999999761581421,"$locale":"en-US","$useragent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","$app_version":"1.1.5","$app_name":"RudderLabs JavaScript SDK","$app_namespace":"com.rudderlabs.javascript","$app_build":"1.0.0","$os":"Mac OS","$browser":"Chrome","$browser_version":"85.0.4183.121","$host":"docs.rudderstack.com","$group_key":"Sample_groupId27","$group_set":{"KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"Comapny-ABC"},"$group_type":"company","$groups":{"company":"Sample_groupId27"}},"distinct_id":"sampleusrRudder7","messageId":"e5034df0-a404-47b4-a463-76df99934fea","event":"$groupidentify","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"group"},"JSON_ARRAY":{},"XML":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog group call for all utm properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com/","useV2Group":true}},"message":{"channel":"web","context":{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","locale":"en-US","page":{"path":"/destinations/amplitude","referrer":"","search":"","title":"","url":"https://docs.rudderstack.com/destinations/amplitude","category":"destination","initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","loaded":"20"},"campaign":{"source":"google","medium":"medium","term":"keyword","content":"some content","name":"some campaign"}},"type":"group","messageId":"e50df0-a404-47b4-a463-76df99934fea","anonymousId":"newid@1234","userId":"user@1234","integrations":{"All":true},"groupId":"group@1234","traits":{"groupType":"company","KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"Comapny-ABC"},"sentAt":"2022-08-12T07:54:58.983Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"properties":{"$current_url":"https://docs.rudderstack.com/destinations/amplitude","$pathname":"/destinations/amplitude","$anon_distinct_id":"newid@1234","distinct_id":"user@1234","$locale":"en-US","$useragent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","utm_source":"google","utm_medium":"medium","utm_campaign":"some campaign","utm_content":"some content","utm_term":"keyword","$performance_page_loaded":"20","$os":"Mac OS","$browser":"Chrome","$browser_version":"85.0.4183.121","$host":"docs.rudderstack.com","$group_key":"group@1234","$group_set":{"KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"Comapny-ABC"},"$group_type":"company","$groups":{"company":"group@1234"}},"distinct_id":"user@1234","messageId":"e50df0-a404-47b4-a463-76df99934fea","event":"$groupidentify","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"group"},"JSON_ARRAY":{},"XML":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "PostHog track call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","yourInstance":"https://app.posthog.com"}},"message":{"channel":"web","context":{"traits":{"name":"Rudder Usr","category":"SampleIdentify","email":"mihirb@rudderlabs.com","plan":"Paid","logins":5},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","locale":"en-GB","page":{"path":"/Rectified.html","referrer":"http://localhost:1112/","url":"http://localhost:1112/Rectified.html","loaded":"40"},"userID":"user@2345"},"type":"track","messageId":"07cde5-9ad9-4a79-af51-f71bc9ed71","originalTimestamp":"2022-08-12T13:21:09.712Z","anonymousId":"a4753d-c7d3-40ca-88dc-a1bbe997e8","userId":"uid-1234","event":"card checkout","properties":{"path":"path","referrer":"referrer","search":"search","title":"title","url":"url","total":1009,"viewport_height":"173","viewport_width":"969"},"integrations":{"All":true},"sentAt":"2022-08-12T13:21:09.712Z"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","params":{},"method":"POST","endpoint":"https://app.posthog.com/batch","headers":{"Content-Type":"application/json"},"body":{"XML":{},"FORM":{},"JSON":{"messageId":"07cde5-9ad9-4a79-af51-f71bc9ed71","distinct_id":"uid-1234","properties":{"$set":{"name":"Rudder Usr","category":"SampleIdentify","email":"mihirb@rudderlabs.com","plan":"Paid","logins":5},"$os":"Mac OS","url":"url","path":"path","$host":"localhost:1112","$time":"2022-08-12T13:21:09.712Z","$timestamp":"2022-08-12T13:21:09.712Z","title":"title","total":1009,"search":"search","$locale":"en-GB","$browser":"Chrome","referrer":"referrer","$pathname":"/Rectified.html","$useragent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","distinct_id":"uid-1234","$current_url":"http://localhost:1112/Rectified.html","$viewport_width":"969","$browser_version":"86.0.4240.111","$viewport_height":"173","$anon_distinct_id":"a4753d-c7d3-40ca-88dc-a1bbe997e8","$performance_page_loaded":"40","viewport_height":"173","viewport_width":"969"},"event":"card checkout","timestamp":"2022-08-12T13:21:09.712Z","api_key":"K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE","type":"capture"},"JSON_ARRAY":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "posthog", + "description": "Pass userTraits for track call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"destination":{"Config":{"teamApiKey":"phc_HiQkvGt9vktokentokentokenTN","yourInstance":"https://app.posthog.com"}},"message":{"type":"track","event":"Product Brought","userId":"uid-2","context":{"ip":"0.0.0.0","os":{"name":"android","version":"8.1.0"},"device":{"id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","name":"xiaomi","model":"Redmi 6","manufacturer":"Xiaomi"},"traits":{"id":"Virat KohliProX","age":"30","name":"User_id_identify","email":"identify@test.com","phone":"9112340345","price":"56.0","userId":"Virat","address":{"city":"KOlkata","state":"West bengal","street":"Park Street","country":"India","postalcode":"700096"},"birthday":"2020-11-13","lastname":"KohliDa","quantity":"5","username":"Kohli_putUserName1","createdat":"18th March 2020","firstname":"Sajal","anonymousId":"9c6bd77ea9da3e68","description":"Sample description"},"network":{"carrier":"Banglalink"}},"rudderId":"ee5c68e2-ecea-4aaf-a885-d0611eb8827b","messageId":"e4408cb8-16dd-41e9-a313-a7a9cdc4bac5","properties":{"isf":"False","idfa":"2bf99787-33d2-4ae2-a76a-c49672f97252","level":6,"game_id":"fireEagleBase","game_fps":30,"is_turbo":"False","battle_id":"N/A","bet_level":1,"game_name":"FireEagleSlots","bet_amount":9,"fb_profile":"0","no_of_spin":1,"start_date":"2019-08-01","win_amount":0,"extra_param":"N/A","gem_balance":0,"coin_balance":9466052,"days_in_game":0,"is_auto_spin":"False","ishighroller":"False","tournament_id":"T1561970819","bet_multiplier":1,"isLowEndDevice":"False","total_payments":0,"featureGameType":"N/A","graphicsQuality":"HD","jackpot_win_type":"Silver","jackpot_win_amount":90,"current_module_name":"CasinoGameModule","versionSessionCount":2,"additional_bet_index":0,"internetReachability":"ReachableViaLocalAreaNetwork","lifetime_gem_balance":0,"player_total_battles":0,"player_total_shields":0},"anonymousId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1"}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"type":"capture","event":"Product Brought","api_key":"phc_HiQkvGt9vktokentokentokenTN","messageId":"e4408cb8-16dd-41e9-a313-a7a9cdc4bac5","properties":{"$ip":"0.0.0.0","$os":"android","isf":"False","$set":{"id":"Virat KohliProX","age":"30","name":"User_id_identify","email":"identify@test.com","phone":"9112340345","price":"56.0","userId":"Virat","address":{"city":"KOlkata","state":"West bengal","street":"Park Street","country":"India","postalcode":"700096"},"birthday":"2020-11-13","lastname":"KohliDa","quantity":"5","username":"Kohli_putUserName1","createdat":"18th March 2020","firstname":"Sajal","anonymousId":"9c6bd77ea9da3e68","description":"Sample description"},"idfa":"2bf99787-33d2-4ae2-a76a-c49672f97252","level":6,"game_id":"fireEagleBase","game_fps":30,"is_turbo":"False","battle_id":"N/A","bet_level":1,"game_name":"FireEagleSlots","$device_id":"df16bffa-5c3d-4fbb-9bce-3bab098129a7R","bet_amount":9,"fb_profile":"0","no_of_spin":1,"start_date":"2019-08-01","win_amount":0,"$os_version":"8.1.0","distinct_id":"uid-2","extra_param":"N/A","gem_balance":0,"$device_name":"xiaomi","coin_balance":9466052,"days_in_game":0,"is_auto_spin":"False","ishighroller":"False","$device_model":"Redmi 6","tournament_id":"T1561970819","bet_multiplier":1,"isLowEndDevice":"False","total_payments":0,"featureGameType":"N/A","graphicsQuality":"HD","$network_carrier":"Banglalink","jackpot_win_type":"Silver","$anon_distinct_id":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","jackpot_win_amount":90,"current_module_name":"CasinoGameModule","versionSessionCount":2,"$device_manufacturer":"Xiaomi","additional_bet_index":0,"internetReachability":"ReachableViaLocalAreaNetwork","lifetime_gem_balance":0,"player_total_battles":0,"player_total_shields":0},"distinct_id":"uid-2"},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"POST","params":{},"headers":{"Content-Type":"application/json"},"version":"1","endpoint":"https://app.posthog.com/batch","userId":""}, + "statusCode": 200}] + } + } + }]; module.exports = { + data + } \ No newline at end of file diff --git a/test/integrations/destinations/posthog/router/data.js b/test/integrations/destinations/posthog/router/data.js new file mode 100644 index 0000000000..d7be79dbc1 --- /dev/null +++ b/test/integrations/destinations/posthog/router/data.js @@ -0,0 +1,345 @@ +const data = [ + { + "name": "posthog", + "description": "Successfull Alias Call batching", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "teamApiKey": "K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE", + "yourInstance": "https://app.posthog.com/" + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "event": "event-alias", + "context": { + "ip": "0.0.0.0", + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.7" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "type": "alias", + "timestamp": "2020-11-04T13:21:09.712Z", + "userId": "uid-1", + "previousId": "prevId_1", + "anonymousId": "f3cf54d8-f237-45d2-89f7-ccd70d42cf31" + } + }] + , "destType": "posthog" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://app.posthog.com/batch", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "properties": { + "$set": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + }, + "$os": "android", + "$time": "2020-11-04T13:21:09.712Z", + "$device_id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "$ip": "0.0.0.0", + "$timestamp": "2020-11-04T13:21:09.712Z", + "$anon_distinct_id": "f3cf54d8-f237-45d2-89f7-ccd70d42cf31", + "distinct_id": "prevId_1", + "$device_manufacturer": "Xiaomi", + "$os_version": "8.1.0", + "$app_version": "1.1.7", + "$device_name": "xiaomi", + "$network_carrier": "Banglalink", + "$app_name": "RudderLabs JavaScript SDK", + "$device_model": "Redmi 6", + "$app_namespace": "com.rudderlabs.javascript", + "$app_build": "1.0.0", + "alias": "uid-1" + }, + "timestamp": "2020-11-04T13:21:09.712Z", + "event": "$create_alias", + "api_key": "K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE", + "type": "alias" + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "teamApiKey": "K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE", + "yourInstance": "https://app.posthog.com/" + } + } + } + ] + } + } + } + }, + { + "name": "posthog", + "description": "Succesfull Track Call of event Product Brought", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "teamApiKey": "K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE" + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "event": "Product Brought", + "context": { + "ip": "0.0.0.0", + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "type": "track", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2020-11-04T13:21:09.712Z", + "userId": "uid-2", + "messageId": "e4408cb8-16dd-41e9-a313-a7a9cdc4bac5" + } + }] + , "destType": "posthog" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://app.posthog.com/batch", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "distinct_id": "uid-2", + "event": "Product Brought", + "messageId": "e4408cb8-16dd-41e9-a313-a7a9cdc4bac5", + "properties": { + "$set": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + }, + "$os": "android", + "$time": "2020-11-04T13:21:09.712Z", + "$device_id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "$ip": "0.0.0.0", + "$timestamp": "2020-11-04T13:21:09.712Z", + "$anon_distinct_id": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "distinct_id": "uid-2", + "$device_manufacturer": "Xiaomi", + "$os_version": "8.1.0", + "$device_name": "xiaomi", + "$network_carrier": "Banglalink", + "$device_model": "Redmi 6", + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2020-11-04T13:21:09.712Z", + "api_key": "K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE", + "type": "capture" + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "teamApiKey": "K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE" + } + } + } + ] + } + } + } + } +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/refiner/processor/data.js b/test/integrations/destinations/refiner/processor/data.js new file mode 100644 index 0000000000..7ed0f302e5 --- /dev/null +++ b/test/integrations/destinations/refiner/processor/data.js @@ -0,0 +1,235 @@ +const data = [{ + "name": "refiner", + "description": "No Message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "sentAt": "2022-10-11T13:10:54.877+05:30", "userId": "user@45", "context": { "traits": { "age": "30", "city": "Banglore", "email": "test@user.com", "phone": "7267286346802347827", "address": { "city": "ahmedabad", "state": "india" }, "lastName": "user", "username": "testUser", "firstName": "test", "userCountry": "india" } }, "rudderId": "caae04c5-959f-467b-a293-86f6c62d59e6", "messageId": "b6ce7f31-5d76-4240-94d2-3eea020ef791", "timestamp": "2022-10-11T13:10:52.137+05:30", "receivedAt": "2022-10-11T13:10:52.138+05:30", "request_ip": "[::1]", "originalTimestamp": "2022-10-11T13:10:54.877+05:30" }, "destination": { "Config": { "apiKey": "da70166e-05a3-4fa2-bb1d-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665474171943, "eventFilteringOption": "disable", "whitelistedEvents": [{ "eventName": "" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "da70166e-05a3-4fa2-bb1d-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665474171943, "eventFilteringOption": "disable", "whitelistedEvents": [{ "eventName": "" }] } }, + "error": "Event type is required", "statTags": { + "destType": "REFINER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "refiner", + "description": "Unsupported Event type ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "alias", "sentAt": "2022-10-11T13:10:54.877+05:30", "userId": "user@45", "context": { "traits": { "age": "30", "city": "Banglore", "email": "test@user.com", "phone": "7267286346802347827", "address": { "city": "ahmedabad", "state": "india" }, "lastName": "user", "username": "testUser", "firstName": "test", "userCountry": "india" } }, "rudderId": "caae04c5-959f-467b-a293-86f6c62d59e6", "messageId": "b6ce7f31-5d76-4240-94d2-3eea020ef791", "timestamp": "2022-10-11T13:10:52.137+05:30", "receivedAt": "2022-10-11T13:10:52.138+05:30", "request_ip": "[::1]", "originalTimestamp": "2022-10-11T13:10:54.877+05:30" }, "destination": { "Config": { "apiKey": "da70166e-05a3-4fa2-bb1d-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665474171943, "eventFilteringOption": "disable", "whitelistedEvents": [{ "eventName": "" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "da70166e-05a3-4fa2-bb1d-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665474171943, "eventFilteringOption": "disable", "whitelistedEvents": [{ "eventName": "" }] } }, + "error": "Event type \"alias\" is not supported", "statTags": { + "destType": "REFINER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "refiner", + "description": "userId and email is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "identify", "sentAt": "2022-10-11T13:10:54.877+05:30", "context": { "traits": { "age": "30", "city": "Banglore", "phone": "7267286346802347827", "address": { "city": "ahmedabad", "state": "india" }, "lastName": "user", "username": "testUser", "firstName": "test", "userCountry": "india" } }, "rudderId": "caae04c5-959f-467b-a293-86f6c62d59e6", "messageId": "b6ce7f31-5d76-4240-94d2-3eea020ef791", "timestamp": "2022-10-11T13:10:52.137+05:30", "receivedAt": "2022-10-11T13:10:52.138+05:30", "request_ip": "[::1]", "originalTimestamp": "2022-10-11T13:10:54.877+05:30" }, "destination": { "Config": { "apiKey": "da70166e-05a3-4fa2-bb1d-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665474171943, "eventFilteringOption": "disable", "whitelistedEvents": [{ "eventName": "" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "da70166e-05a3-4fa2-bb1d-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665474171943, "eventFilteringOption": "disable", "whitelistedEvents": [{ "eventName": "" }] } }, + "error": "At least one of `userId` or `email` is required", "statTags": { + "destType": "REFINER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "refiner", + "description": "event name is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "channel": "web", "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "1.1.2" }, "traits": { "age": "30", "email": "test@user.com", "phone": "7267286346802347827", "city": "Banglore", "userCountry": "india", "lastName": "user", "username": "testUser", "firstName": "test" }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.2" }, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36", "locale": "en-GB", "os": { "name": "", "version": "" }, "screen": { "density": 2 }, "page": { "path": "/tests/html/ecomm_test.html", "referrer": "http://0.0.0.0:1112/tests/html/", "search": "", "title": "Fb Offline Conversion Ecommerce Test", "url": "http://0.0.0.0:1112/tests/html/ecomm_test.html" } }, "type": "track", "messageId": "9116b734-7e6b-4497-ab51-c16744d4487e", "userId": "user@45", "properties": { "order_id": "5241735", "coupon": "APPARELSALE", "currency": "IND", "products": [{ "id": "product-bacon-jam", "category": "Merch", "brand": "" }, { "id": "product-t-shirt", "category": "Merch", "brand": "Levis" }, { "id": "offer-t-shirt", "category": "Merch", "brand": "Levis" }] } }, "destination": { "Config": { "apiKey": "da70166e-05a3-4fa2-bb1d-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665474171943, "eventFilteringOption": "disable", "whitelistedEvents": [{ "eventName": "" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "da70166e-05a3-4fa2-bb1d-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665474171943, "eventFilteringOption": "disable", "whitelistedEvents": [{ "eventName": "" }] } }, + "error": "Event name is required", "statTags": { + "destType": "REFINER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "refiner", + "description": "successful identify call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "identify", "sentAt": "2022-10-11T13:10:54.877+05:30", "userId": "user@45", "context": { "traits": { "age": "30", "city": "Banglore", "email": "test@user.com", "phone": "7267286346802347827", "address": { "city": "ahmedabad", "state": "india" }, "lastName": "user", "username": "testUser", "firstName": "test", "userCountry": "india" } }, "rudderId": "caae04c5-959f-467b-a293-86f6c62d59e6", "messageId": "b6ce7f31-5d76-4240-94d2-3eea020ef791", "timestamp": "2022-10-11T13:10:52.137+05:30", "receivedAt": "2022-10-11T13:10:52.138+05:30", "request_ip": "[::1]", "originalTimestamp": "2022-10-11T13:10:54.877+05:30" }, "destination": { "Config": { "apiKey": "da70166e-05a4-4fa1-bb1c-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665475307930, "eventFilteringOption": "disable", "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], "whitelistedEvents": [{ "eventName": "" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.refiner.io/v1/identify-user", "headers": { "Content-Type": "application/x-www-form-urlencoded", "Authorization": "Bearer da70166e-05a4-4fa1-bb1c-da757fd036b4" }, "params": {}, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": { "age": "30", "city": "Banglore", "email": "test@user.com", "phone": "7267286346802347827", "userId": "user@45", "lastName": "user", "username": "testUser", "firstName": "test", "userAddress": { "city": "ahmedabad", "state": "india" }, "userCountry": "india" } }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "refiner", + "description": "successful track call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "track", "event": "Product Searched", "sentAt": "2022-10-11T13:38:31.827+05:30", "userId": "user@45", "channel": "web", "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.2", "namespace": "com.rudderlabs.javascript" }, "page": { "url": "http://0.0.0.0:1112/tests/html/ecomm_test.html", "path": "/tests/html/ecomm_test.html", "title": "Fb Offline Conversion Ecommerce Test", "search": "", "referrer": "http://0.0.0.0:1112/tests/html/" }, "locale": "en-GB", "screen": { "density": 2 }, "traits": { "age": "30", "city": "Banglore", "email": "test@user.com", "phone": "7267286346802347827", "lastName": "user", "username": "testUser", "firstName": "test", "userCountry": "india" }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.2" }, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" }, "rudderId": "caae04c5-959f-467b-a293-86f6c62d59e6", "messageId": "9116b734-7e6b-4497-ab51-c16744d4487e", "timestamp": "2022-10-11T13:38:29.177+05:30", "properties": { "coupon": "APPARELSALE", "currency": "IND", "order_id": "5241735", "products": [{ "id": "product-bacon-jam", "category": "Merch", "brand": "" }, { "id": "product-t-shirt", "category": "Merch", "brand": "Levis" }, { "id": "offer-t-shirt", "category": "Merch", "brand": "Levis" }] }, "receivedAt": "2022-10-11T13:38:29.178+05:30", "request_ip": "[::1]", "originalTimestamp": "2022-10-11T13:38:31.827+05:30" }, "destination": { "Config": { "apiKey": "da70166e-05a4-4fa1-bb1c-da757fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665475307930, "eventFilteringOption": "disable", "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], "whitelistedEvents": [{ "eventName": "" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "body": { "XML": {}, "FORM": { "id": "user@45", "email": "test@user.com", "event": "Product Searched" }, "JSON": {}, "JSON_ARRAY": {} }, "type": "REST", "files": {}, "method": "POST", "params": {}, "headers": { "Content-Type": "application/x-www-form-urlencoded", "Authorization": "Bearer da70166e-05a4-4fa1-bb1c-da757fd036b4" }, "version": "1", "endpoint": "https://api.refiner.io/v1/track", "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "refiner", + "description": "successful group call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "group", "sentAt": "2015-02-23T22:28:55.111Z", "traits": { "name": "rudder ventures", "email": "business@rudderstack.com" }, "userId": "test@12", "channel": "browser", "context": { "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36" }, "groupId": "group@123", "rudderId": "d944be7a-c870-41ba-9fa5-f3c9dbf5f7e0", "messageId": "022bb90c-bbac-11e4-8dfc-aa07a5b093db", "request_ip": "[::1]", "integrations": { "All": true }, "originalTimestamp": "2022-10-11T13:51:00.906+05:30" }, "destination": { "Config": { "accountAttributesMapping": [{ "from": "email", "to": "businessEmail" }], "apiKey": "dc70156e-05a3-4fa1-bb1c-da767fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665476456112, "eventFilteringOption": "disable", "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], "whitelistedEvents": [{ "eventName": "" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.refiner.io/v1/identify-user", "headers": { "Content-Type": "application/x-www-form-urlencoded", "Authorization": "Bearer dc70156e-05a3-4fa1-bb1c-da767fd036b4" }, "params": {}, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": { "id": "test@12", "account[businessEmail]": "business@rudderstack.com", "account[id]": "group@123", "account[name]": "rudder ventures" } }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "refiner", + "description": "Refiner page call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "channel": "web", "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "1.0.0" }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", "locale": "en-US", "ip": "0.0.0.0", "os": { "name": "", "version": "" }, "screen": { "density": 2 } }, "type": "page", "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", "timestamp": "2019-09-01T15:46:51.693229+05:30", "anonymousId": "00000000000000000000000000", "userId": "12345", "properties": { "path": "/abc", "referrer": "xyz", "search": "def", "title": "ghi", "url": "jkl" }, "integrations": { "All": true }, "name": "pageviewed", "sentAt": "2019-10-14T11:15:53.296Z" }, "destination": { "Config": { "accountAttributesMapping": [{ "from": "email", "to": "businessEmail" }], "apiKey": "dc70156e-05a3-4fa1-bb1c-da767fd036b4", "blacklistedEvents": [{ "eventName": "" }], "eventDelivery": true, "eventDeliveryTS": 1665476456112, "eventFilteringOption": "disable", "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], "whitelistedEvents": [{ "eventName": "" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "body": { "XML": {}, "FORM": { "id": "12345", "event": "Viewed pageviewed Page" }, "JSON": {}, "JSON_ARRAY": {} }, "type": "REST", "files": {}, "method": "POST", "params": {}, "headers": { "Content-Type": "application/x-www-form-urlencoded", "Authorization": "Bearer dc70156e-05a3-4fa1-bb1c-da767fd036b4" }, "version": "1", "endpoint": "https://api.refiner.io/v1/track", "userId": "" }, + "statusCode": 200 + }] + } + } +}]; module.exports = { + data +} \ No newline at end of file diff --git a/test/integrations/destinations/refiner/router/data.js b/test/integrations/destinations/refiner/router/data.js new file mode 100644 index 0000000000..90984a0180 --- /dev/null +++ b/test/integrations/destinations/refiner/router/data.js @@ -0,0 +1,379 @@ +const data = [ + { + "name": "refiner", + "description": "Successfull Identify Call eventDelivery set to True and with userAttributesMapping from config ", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "type": "identify", + "sentAt": "2022-10-11T13:10:54.877+05:30", + "userId": "user@45", + "context": { + "traits": { + "age": "30", + "city": "Banglore", + "email": "test@user.com", + "phone": "7267286346802347827", + "address": { + "city": "ahmedabad", + "state": "india" + }, + "lastName": "user", + "username": "testUser", + "firstName": "test", + "userCountry": "india" + } + }, + "rudderId": "caae04c5-959f-467b-a293-86f6c62d59e6", + "messageId": "b6ce7f31-5d76-4240-94d2-3eea020ef791", + "timestamp": "2022-10-11T13:10:52.137+05:30", + "receivedAt": "2022-10-11T13:10:52.138+05:30", + "request_ip": "[::1]", + "originalTimestamp": "2022-10-11T13:10:54.877+05:30" + }, + "metadata": { + "jobId": 1 + }, + "destination": { + "Config": { + "apiKey": "da70166e-05a4-4fa1-bb1c-da757fd036b4", + "blacklistedEvents": [{ "eventName": "" }], + "eventDelivery": true, + "eventDeliveryTS": 1665475307930, + "eventFilteringOption": "disable", + "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], + "whitelistedEvents": [{ "eventName": "" }] + } + } + }] + , "destType": "refiner" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": { + "age": "30", + "city": "Banglore", + "email": "test@user.com", + "firstName": "test", + "lastName": "user", + "phone": "7267286346802347827", + "userAddress": { + "city": "ahmedabad", + "state": "india" + }, + "userCountry": "india", + "userId": "user@45", + "username": "testUser" + }, + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.refiner.io/v1/identify-user", + "files": {}, + "headers": { + "Authorization": "Bearer da70166e-05a4-4fa1-bb1c-da757fd036b4", + "Content-Type": "application/x-www-form-urlencoded" + }, + "method": "POST", + "userId": "", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiKey": "da70166e-05a4-4fa1-bb1c-da757fd036b4", + "blacklistedEvents": [{ "eventName": "" }], + "eventDelivery": true, + "eventDeliveryTS": 1665475307930, + "eventFilteringOption": "disable", + "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], + "whitelistedEvents": [{ "eventName": "" }] + } + }, + "metadata": [{ "jobId": 1 }], + "statusCode": 200 + } + ] + } + } + } + }, + { + "name": "refiner", + "description": "Successfull Track Call of event Product Searched", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "type": "track", + "event": "Product Searched", + "sentAt": "2022-10-11T13:38:31.827+05:30", + "userId": "user@45", + "channel": "web", + "context": { + "os": { "name": "", "version": "" }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.2", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://0.0.0.0:1112/tests/html/ecomm_test.html", + "path": "/tests/html/ecomm_test.html", + "title": "Fb Offline Conversion Ecommerce Test", + "search": "", + "referrer": "http://0.0.0.0:1112/tests/html/" + }, + "locale": "en-GB", + "screen": { "density": 2 }, + "traits": { + "age": "30", + "city": "Banglore", + "email": "test@user.com", + "phone": "7267286346802347827", + "lastName": "user", + "username": "testUser", + "firstName": "test", + "userCountry": "india" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.2" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" + }, + "rudderId": "caae04c5-959f-467b-a293-86f6c62d59e6", + "messageId": "9116b734-7e6b-4497-ab51-c16744d4487e", + "timestamp": "2022-10-11T13:38:29.177+05:30", + "properties": { + "coupon": "APPARELSALE", + "currency": "IND", + "order_id": "5241735", + "products": [ + { + "id": "product-bacon-jam", + "category": "Merch", + "brand": "" + }, + { + "id": "product-t-shirt", + "category": "Merch", + "brand": "Levis" + }, + { + "id": "offer-t-shirt", + "category": "Merch", + "brand": "Levis" + } + ] + }, + "receivedAt": "2022-10-11T13:38:29.178+05:30", + "request_ip": "[::1]", + "originalTimestamp": "2022-10-11T13:38:31.827+05:30" + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "apiKey": "da70166e-05a4-4fa1-bb1c-da757fd036b4", + "blacklistedEvents": [{ "eventName": "" }], + "eventDelivery": true, + "eventDeliveryTS": 1665475307930, + "eventFilteringOption": "disable", + "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], + "whitelistedEvents": [{ "eventName": "" }] + } + } + }] + , "destType": "refiner" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": { + "email": "test@user.com", + "event": "Product Searched", + "id": "user@45" + }, + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.refiner.io/v1/track", + "files": {}, + "userId": "", + "headers": { + "Authorization": "Bearer da70166e-05a4-4fa1-bb1c-da757fd036b4", + "Content-Type": "application/x-www-form-urlencoded" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiKey": "da70166e-05a4-4fa1-bb1c-da757fd036b4", + "blacklistedEvents": [{ "eventName": "" }], + "eventDelivery": true, + "eventDeliveryTS": 1665475307930, + "eventFilteringOption": "disable", + "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], + "whitelistedEvents": [{ "eventName": "" }] + } + }, + "metadata": [{ "jobId": 2 }], + "statusCode": 200 + } + ] + } + } + } + }, + { + "name": "refiner", + "description": "Successfull Group Call based in email from traits", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "type": "group", + "sentAt": "2015-02-23T22:28:55.111Z", + "traits": { + "name": "rudder ventures", + "email": "business@rudderstack.com" + }, + "userId": "test@12", + "channel": "browser", + "context": { + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36" + }, + "groupId": "group@123", + "rudderId": "d944be7a-c870-41ba-9fa5-f3c9dbf5f7e0", + "messageId": "022bb90c-bbac-11e4-8dfc-aa07a5b093db", + "request_ip": "[::1]", + "integrations": { "All": true }, + "originalTimestamp": "2022-10-11T13:51:00.906+05:30" + }, + "metadata": { + "jobId": 3 + }, + "destination": { + "Config": { + "accountAttributesMapping": [{ "from": "email", "to": "businessEmail" }], + "apiKey": "dc70156e-05a3-4fa1-bb1c-da767fd036b4", + "blacklistedEvents": [{ "eventName": "" }], + "eventDelivery": true, + "eventDeliveryTS": 1665476456112, + "eventFilteringOption": "disable", + "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], + "whitelistedEvents": [{ "eventName": "" }] + } + } + }] + , "destType": "refiner" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": { + "account[businessEmail]": "business@rudderstack.com", + "account[id]": "group@123", + "account[name]": "rudder ventures", + "id": "test@12" + }, + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.refiner.io/v1/identify-user", + "files": {}, + "headers": { + "Authorization": "Bearer dc70156e-05a3-4fa1-bb1c-da767fd036b4", + "Content-Type": "application/x-www-form-urlencoded" + }, + "method": "POST", + "params": {}, + "type": "REST", + "userId": "", + "version": "1" + }, + "destination": { + "Config": { + "accountAttributesMapping": [{ "from": "email", "to": "businessEmail" }], + "apiKey": "dc70156e-05a3-4fa1-bb1c-da767fd036b4", + "blacklistedEvents": [{ "eventName": "" }], + "eventDelivery": true, + "eventDeliveryTS": 1665476456112, + "eventFilteringOption": "disable", + "userAttributesMapping": [{ "from": "address", "to": "userAddress" }], + "whitelistedEvents": [{ "eventName": "" }] + } + }, + "metadata": [{ "jobId": 3 }], + "statusCode": 200 + } + ] + } + } + } + }, +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/serenytics/processor/data.js b/test/integrations/destinations/serenytics/processor/data.js new file mode 100644 index 0000000000..ea3e5de742 --- /dev/null +++ b/test/integrations/destinations/serenytics/processor/data.js @@ -0,0 +1,504 @@ +const data = [{ + "name": "serenytics", + "description": "Track call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } }, "message": { "event": "New Alert", "type": "track", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "brand": "Zara", "price": "12000" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "headers": {}, "params": {}, "body": { "JSON": { "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", "event": "New Alert", "sent_at": "2021-01-03T17:02:53.195Z", "original_timestamp": "2021-01-03T17:02:53.193Z", "timestamp": "2021-01-03T17:02:53.193Z", "price": "12000", "property_message": "Please check the alert", "property_brand": "Zara" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "serenytics", + "description": "Track call with multiple same event name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "event": "Order Completed", "type": "track", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "brand": "Zara", "price": "12000" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12", "headers": {}, "params": {}, "body": { "JSON": { "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", "event": "Order Completed", "sent_at": "2021-01-03T17:02:53.195Z", "original_timestamp": "2021-01-03T17:02:53.193Z", "timestamp": "2021-01-03T17:02:53.193Z", "price": "12000", "property_message": "Please check the alert", "property_brand": "Zara" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }, { + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981", "headers": {}, "params": {}, "body": { "JSON": { "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", "event": "Order Completed", "sent_at": "2021-01-03T17:02:53.195Z", "original_timestamp": "2021-01-03T17:02:53.193Z", "timestamp": "2021-01-03T17:02:53.193Z", "price": "12000", "property_message": "Please check the alert", "property_brand": "Zara" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }, { + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "headers": {}, "params": {}, "body": { "JSON": { "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", "event": "Order Completed", "sent_at": "2021-01-03T17:02:53.195Z", "original_timestamp": "2021-01-03T17:02:53.193Z", "timestamp": "2021-01-03T17:02:53.193Z", "price": "12000", "property_message": "Please check the alert", "property_brand": "Zara" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "serenytics", + "description": "Identify call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", "originalTimestamp": "2022-06-22T10:57:58Z", "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "1.0.0" }, "device": { "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", "manufacturer": "Google", "model": "AOSP on IA Emulator", "name": "generic_x86_arm", "type": "ios", "attTrackingStatus": 3 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, "locale": "en-US", "os": { "name": "iOS", "version": "14.4.1" }, "screen": { "density": 2 } }, "traits": { "email": "testuser@google.com", "first_name": "Rk", "last_name": "Mishra", "mobileNumber": "1-926-555-9504", "lifecycleStageId": 71010794467, "phone": "9988776655", "owner_id": "70000090119" }, "type": "identify", "sentAt": "2022-04-22T10:57:58Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "body": { "XML": {}, "FORM": {}, "JSON": { "email": "testuser@google.com", "sent_at": "2022-04-22T10:57:58Z", "user_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", "last_name": "Mishra", "timestamp": "2022-06-22T10:57:58Z", "first_name": "Rk", "trait_phone": "9988776655", "trait_owner_id": "70000090119", "original_timestamp": "2022-06-22T10:57:58Z", "trait_mobileNumber": "1-926-555-9504", "trait_lifecycleStageId": 71010794467 }, "JSON_ARRAY": {} }, "type": "REST", "files": {}, "method": "POST", "params": {}, "headers": {}, "version": "1", "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "serenytics", + "description": "Identify call with missing identify storage url", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", "originalTimestamp": "2022-06-22T10:57:58Z", "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", "context": { "locale": "en-US", "os": { "name": "iOS", "version": "14.4.1" }, "screen": { "density": 2 } }, "traits": { "email": "testuser@google.com", "first_name": "Rk" }, "type": "identify", "sentAt": "2022-04-22T10:57:58Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } }, + "error": "Storage url for \"IDENTIFY\" is missing. Aborting!", "statTags": { + "destType": "SERENYTICS", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "serenytics", + "description": "Screen call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "screen", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "page": "home Page" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "body": { "XML": {}, "FORM": {}, "JSON": { "sent_at": "2021-01-03T17:02:53.195Z", "timestamp": "2021-01-03T17:02:53.193Z", "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", "property_page": "home Page", "property_message": "Please check the alert", "original_timestamp": "2021-01-03T17:02:53.193Z" }, "JSON_ARRAY": {} }, "type": "REST", "files": {}, "method": "POST", "params": {}, "headers": {}, "version": "1", "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "serenytics", + "description": "Page Call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "page", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "page": "home Page" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "body": { "XML": {}, "FORM": {}, "JSON": { "sent_at": "2021-01-03T17:02:53.195Z", "timestamp": "2021-01-03T17:02:53.193Z", "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", "property_page": "home Page", "property_message": "Please check the alert", "original_timestamp": "2021-01-03T17:02:53.193Z" }, "JSON_ARRAY": {} }, "type": "REST", "files": {}, "method": "POST", "params": {}, "headers": {}, "version": "1", "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "serenytics", + "description": "Page call, storage url for page call is missing.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "page", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "page": "home Page" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } }, + "error": "Storage url for \"PAGE\" is missing. Aborting!", "statTags": { + "destType": "SERENYTICS", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "serenytics", + "description": "Track call: event name is missing.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } }, "message": { "type": "track", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "brand": "Zara", "price": "12000" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } }, + "error": "Missing required value from \"event\"", "statTags": { + "destType": "SERENYTICS", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "serenytics", + "description": "Track call: storage url is required for track call.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } }, "message": { "event": "New Alert", "type": "track", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "brand": "Zara", "price": "12000" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } }, + "error": "Storage url for \"TRACK\" is missing. Aborting!", "statTags": { + "destType": "SERENYTICS", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "serenytics", + "description": "Track call: if storage url is not present for track call, only present for event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } }, "message": { "event": "Order Completed", "type": "track", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "brand": "Zara", "price": "12000" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12", "headers": {}, "params": {}, "body": { "JSON": { "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", "event": "Order Completed", "sent_at": "2021-01-03T17:02:53.195Z", "original_timestamp": "2021-01-03T17:02:53.193Z", "timestamp": "2021-01-03T17:02:53.193Z", "price": "12000", "property_message": "Please check the alert", "property_brand": "Zara" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }, { + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981", "headers": {}, "params": {}, "body": { "JSON": { "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", "event": "Order Completed", "sent_at": "2021-01-03T17:02:53.195Z", "original_timestamp": "2021-01-03T17:02:53.193Z", "timestamp": "2021-01-03T17:02:53.193Z", "price": "12000", "property_message": "Please check the alert", "property_brand": "Zara" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "serenytics", + "description": "Message type is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } }, "message": { "event": "Order Completed", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "brand": "Zara", "price": "12000" }, "context": { "os": { "name": "", "version": "" }, "app": { "name": "RudderLabs JavaScript SDK", "build": "1.0.0", "version": "1.1.11", "namespace": "com.rudderlabs.javascript" }, "locale": "en-US", "screen": { "density": 2 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "eventToStorageUrlMap": [{ "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" }, { "from": "Order Completed", "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" }, { "from": "Add to Cart", "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" }] } }, + "error": "Event type is required", "statTags": { + "destType": "SERENYTICS", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "serenytics", + "description": "Screen call: storage url is missing for storage call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "screen", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "properties": { "message": "Please check the alert", "page": "home Page" }, "context": { "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, "campaign": {}, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } }, + "error": "Storage url for \"SCREEN\" is missing. Aborting!", "statTags": { + "destType": "SERENYTICS", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "serenytics", + "description": "Group call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "group", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "groupId": "rudder-123", "traits": { "name": "Mark Twain", "phone": "919191919191", "numberOfEmployees": 51, "annualRevenue": 1000, "address": "Red Colony", "city": "Colony", "state": "Haryana" }, "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "1.0.0" }, "device": { "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", "manufacturer": "Google", "model": "AOSP on IA Emulator", "name": "generic_x86_arm", "type": "ios", "attTrackingStatus": 3 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, "locale": "en-US", "os": { "name": "iOS", "version": "14.4.1" }, "screen": { "density": 2 }, "traits": { "email": "testuser@google.com" } }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "body": { "XML": {}, "FORM": {}, "JSON": { "id": "rudder-123", "sent_at": "2021-01-03T17:02:53.195Z", "timestamp": "2021-01-03T17:02:53.193Z", "trait_city": "Colony", "trait_name": "Mark Twain", "trait_email": "testuser@google.com", "trait_phone": "919191919191", "trait_state": "Haryana", "trait_address": "Red Colony", "original_timestamp": "2021-01-03T17:02:53.193Z", "trait_annualRevenue": 1000, "trait_numberOfEmployees": 51 }, "JSON_ARRAY": {} }, "type": "REST", "files": {}, "method": "POST", "params": {}, "headers": {}, "version": "1", "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "serenytics", + "description": "Group call: its check custom payload", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "group", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "groupId": "rudder-123", "traits": {}, "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "1.0.0" }, "device": { "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", "manufacturer": "Google", "model": "AOSP on IA Emulator", "name": "generic_x86_arm", "type": "ios", "attTrackingStatus": 3 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, "locale": "en-US", "os": { "name": "iOS", "version": "14.4.1" }, "screen": { "density": 2 }, "traits": { "email": "testuser@google.com" } }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "headers": {}, "params": {}, "body": { "JSON": { "id": "rudder-123", "sent_at": "2021-01-03T17:02:53.195Z", "original_timestamp": "2021-01-03T17:02:53.193Z", "timestamp": "2021-01-03T17:02:53.193Z", "trait_email": "testuser@google.com" }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "serenytics", + "description": "Group call misiing storage url", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "type": "group", "sentAt": "2021-01-03T17:02:53.195Z", "channel": "web", "groupId": "rudder-123", "traits": {}, "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "1.0.0" }, "device": { "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", "manufacturer": "Google", "model": "AOSP on IA Emulator", "name": "generic_x86_arm", "type": "ios", "attTrackingStatus": 3 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, "locale": "en-US", "os": { "name": "iOS", "version": "14.4.1" }, "screen": { "density": 2 }, "traits": { "email": "testuser@google.com" } }, "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", "originalTimestamp": "2021-01-03T17:02:53.193Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } }, + "error": "Storage url for \"GROUP\" is missing. Aborting!", "statTags": { + "destType": "SERENYTICS", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "serenytics", + "description": "Alias call: storage data url is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "channel": "web", "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "1.1.5" }, "traits": { "name": "Shehan Study", "category": "SampleIdentify", "email": "chandra+r@rudderlabs.com", "plan": "Open source", "logins": 5, "createdAt": 1599264000 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.5" }, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", "locale": "en-US", "os": { "name": "", "version": "" }, "screen": { "density": 0.8999999761581421 }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content", "name": "some campaign", "test": "other value" }, "page": { "path": "/destinations/amplitude", "referrer": "", "search": "", "title": "", "url": "https://docs.rudderstack.com/destinations/amplitude", "category": "destination", "initial_referrer": "https://docs.rudderstack.com", "initial_referring_domain": "docs.rudderstack.com" } }, "type": "alias", "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", "originalTimestamp": "2020-10-20T08:14:28.778Z", "anonymousId": "my-anonymous-id-new", "userId": "newUserIdAlias", "integrations": { "All": true }, "previousId": "sampleusrRudder3", "sentAt": "2020-10-20T08:14:28.778Z" }, "destination": { "Config": { "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } }, + "error": "Storage url for \"ALIAS\" is missing. Aborting!", "statTags": { + "destType": "SERENYTICS", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "serenytics", + "description": "Alias call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "message": { "channel": "web", "context": { "app": { "build": "1.0.0", "name": "RudderLabs JavaScript SDK", "namespace": "com.rudderlabs.javascript", "version": "1.1.5" }, "traits": { "name": "Shehan Study", "category": "SampleIdentify", "email": "chandra+r@rudderlabs.com", "plan": "Open source", "logins": 5, "createdAt": 1599264000 }, "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.5" }, "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", "locale": "en-US", "os": { "name": "", "version": "" }, "screen": { "density": 0.8999999761581421 }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content", "name": "some campaign", "test": "other value" }, "page": { "path": "/destinations/amplitude", "referrer": "", "search": "", "title": "", "url": "https://docs.rudderstack.com/destinations/amplitude", "category": "destination", "initial_referrer": "https://docs.rudderstack.com", "initial_referring_domain": "docs.rudderstack.com" } }, "type": "alias", "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", "originalTimestamp": "2020-10-20T08:14:28.778Z", "anonymousId": "my-anonymous-id-new", "userId": "newUserIdAlias", "integrations": { "All": true }, "traits": { "city": "Disney", "country": "USA", "email": "mickey@disney.com", "firstname": "Mickey" }, "previousId": "sampleusrRudder3", "sentAt": "2020-10-20T08:14:28.778Z" }, "destination": { "Config": { "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" } } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "POST", "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", "headers": {}, "params": {}, "body": { "JSON": { "user_id": "newUserIdAlias", "previous_id": "sampleusrRudder3", "sent_at": "2020-10-20T08:14:28.778Z", "original_timestamp": "2020-10-20T08:14:28.778Z", "timestamp": "2020-10-20T08:14:28.778Z", "trait_city": "Disney", "trait_country": "USA", "trait_email": "chandra+r@rudderlabs.com", "trait_firstname": "Mickey", "trait_name": "Shehan Study", "trait_category": "SampleIdentify", "trait_plan": "Open source", "trait_logins": 5, "trait_createdAt": 1599264000 }, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}]; module.exports = { + data +} \ No newline at end of file diff --git a/test/integrations/destinations/serenytics/router/data.js b/test/integrations/destinations/serenytics/router/data.js new file mode 100644 index 0000000000..431fd4b022 --- /dev/null +++ b/test/integrations/destinations/serenytics/router/data.js @@ -0,0 +1,497 @@ +const data = [ + { + "name": "serenytics", + "description": "Successfull Track Call ", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "event": "New Alert", + "type": "track", + "sentAt": "2021-01-03T17:02:53.195Z", + "channel": "web", + "properties": { + "message": "Please check the alert", + "brand": "Zara", + "price": "12000" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + }] + , "destType": "serenytics" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", + "event": "New Alert", + "sent_at": "2021-01-03T17:02:53.195Z", + "original_timestamp": "2021-01-03T17:02:53.193Z", + "timestamp": "2021-01-03T17:02:53.193Z", + "price": "12000", + "property_message": "Please check the alert", + "property_brand": "Zara" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ], + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" + } + } + } + ] + } + } + } + }, + { + "name": "serenytics", + "description": "Succesfull Track Call with eventToStorageUrlMap from Config", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "eventToStorageUrlMap": [ + { + "from": "Order Completed", + "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" + }, + { + "from": "Order Completed", + "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" + }, + { + "from": "Add to Cart", + "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" + } + ] + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "event": "Order Completed", + "type": "track", + "sentAt": "2021-01-03T17:02:53.195Z", + "channel": "web", + "properties": { + "message": "Please check the alert", + "brand": "Zara", + "price": "12000" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + }] + , "destType": "serenytics" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", + "event": "Order Completed", + "sent_at": "2021-01-03T17:02:53.195Z", + "original_timestamp": "2021-01-03T17:02:53.193Z", + "timestamp": "2021-01-03T17:02:53.193Z", + "price": "12000", + "property_message": "Please check the alert", + "property_brand": "Zara" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + { + "version": "1", + "type": "REST", "userId": "", + "method": "POST", + "endpoint": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", + "event": "Order Completed", + "sent_at": "2021-01-03T17:02:53.195Z", + "original_timestamp": "2021-01-03T17:02:53.193Z", + "timestamp": "2021-01-03T17:02:53.193Z", + "price": "12000", + "property_message": "Please check the alert", + "property_brand": "Zara" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + { + "version": "1", + "type": "REST", "userId": "", + "method": "POST", + "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymous_id": "97c46c81-3140-456d-b2a9-690d70aaca35", + "event": "Order Completed", + "sent_at": "2021-01-03T17:02:53.195Z", + "original_timestamp": "2021-01-03T17:02:53.193Z", + "timestamp": "2021-01-03T17:02:53.193Z", + "price": "12000", + "property_message": "Please check the alert", + "property_brand": "Zara" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ], + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "eventToStorageUrlMap": [ + { + "from": "Order Completed", + "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" + }, + { + "from": "Order Completed", + "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" + }, + { + "from": "Add to Cart", + "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" + } + ] + } + } + } + ] + } + } + } + }, + { + "name": "serenytics", + "description": "Succesfull Identify Call with eventToStorageUrlMap from Config", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "eventToStorageUrlMap": [ + { + "from": "Order Completed", + "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" + }, + { + "from": "Order Completed", + "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" + }, + { + "from": "Add to Cart", + "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" + } + ] + } + }, + "metadata": { + "jobId": 3 + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + }] + , "destType": "serenytics" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "email": "testuser@google.com", + "sent_at": "2022-04-22T10:57:58Z", + "user_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "last_name": "Mishra", + "timestamp": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "trait_phone": "9988776655", + "trait_owner_id": "70000090119", + "original_timestamp": "2022-06-22T10:57:58Z", + "trait_mobileNumber": "1-926-555-9504", + "trait_lifecycleStageId": 71010794467 + }, + "JSON_ARRAY": {} + }, + "type": "REST", "userId": "", + "files": {}, + "method": "POST", + "params": {}, + "headers": {}, + "version": "1", + "endpoint": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760" + }, + "metadata": [ + { + "jobId": 3 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "storageUrlAlias": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlGroup": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlIdentify": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlPage": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlScreen": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "storageUrlTrack": "https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760", + "eventToStorageUrlMap": [ + { + "from": "Order Completed", + "to": "https://api.serenytics.com/api/data_source/b646…/push/ad051d45f10a0c11a50f5c20af838e39ea9dcf12" + }, + { + "from": "Order Completed", + "to": "https://api.serenytics.com/api/data_source/0714…/push/f48540d9b51fd5c88dffaad4e34cd0b56a525981" + }, + { + "from": "Add to Cart", + "to": "https://api.serenytics.com/api/data_source/f62c…/push/75c48822ca582a1322aa1d7586ce374a4736c313" + } + ] + } + } + } + ] + } + } + } + }, +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/signl4/processor/data.js b/test/integrations/destinations/signl4/processor/data.js new file mode 100644 index 0000000000..e63a335815 --- /dev/null +++ b/test/integrations/destinations/signl4/processor/data.js @@ -0,0 +1,231 @@ +const data = [{ + "name": "signl4", + "description": "Track call for creating an alert with all default values from web-app", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"event":"New Alert","type":"track","sentAt":"2021-01-03T17:02:53.195Z","channel":"web","properties":{"message":"Please check the alert","brand":"Zara","price":"12000"},"context":{"os":{"name":"","version":""},"app":{"name":"RudderLabs JavaScript SDK","build":"1.0.0","version":"1.1.11","namespace":"com.rudderlabs.javascript"},"locale":"en-US","screen":{"density":2},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.11"},"campaign":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0"},"rudderId":"8f8fa6b5-8e24-489c-8e22-61f23f2e364f","messageId":"2116ef8c-efc3-4ca4-851b-02ee60dad6ff","anonymousId":"97c46c81-3140-456d-b2a9-690d70aaca35","originalTimestamp":"2021-01-03T17:02:53.193Z"},"destination":{"Config":{"apiKey":"t1yurrb968zk","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://connect.signl4.com/webhook/t1yurrb968zk","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"message":"Please check the alert","Title":"New Alert","brand":"Zara","price":"12000","X-S4-Service":"service","X-S4-Location":"67.3, 32.3","X-S4-AlertingScenario":"single_ack","X-S4-ExternalID":"INC493933","X-S4-Status":"new"},"JSON_ARRAY":{},"XML":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "signl4", + "description": "Check for eventToTitleMapping", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"event":"New Alert","type":"track","sentAt":"2021-01-03T17:02:53.195Z","channel":"web","properties":{"message":"Please check the alert","brand":"Zara","price":"12000"},"context":{"os":{"name":"","version":""},"app":{"name":"RudderLabs JavaScript SDK","build":"1.0.0","version":"1.1.11","namespace":"com.rudderlabs.javascript"},"locale":"en-US","screen":{"density":2},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.11"},"campaign":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0"},"rudderId":"8f8fa6b5-8e24-489c-8e22-61f23f2e364f","messageId":"2116ef8c-efc3-4ca4-851b-02ee60dad6ff","anonymousId":"97c46c81-3140-456d-b2a9-690d70aaca35","originalTimestamp":"2021-01-03T17:02:53.193Z"},"destination":{"Config":{"apiKey":"t1yurrb968zk","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://connect.signl4.com/webhook/t1yurrb968zk","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"message":"Please check the alert","Title":"Alert Created","brand":"Zara","price":"12000","X-S4-Service":"service","X-S4-Location":"67.3, 32.3","X-S4-AlertingScenario":"single_ack","X-S4-ExternalID":"INC493933","X-S4-Status":"new"},"JSON_ARRAY":{},"XML":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "signl4", + "description": "Check for property mapping from UI", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"event":"New Alert","type":"track","sentAt":"2021-01-03T17:02:53.195Z","channel":"web","properties":{"message":"Please check the alert","brand":"Zara","price":"12000","s4Service":"service","s4Location":"67.3, 32.3","s4Alerting":"single_ack","s4ExternalID":"INC493933","s4Status":"new"},"context":{"os":{"name":"","version":""},"app":{"name":"RudderLabs JavaScript SDK","build":"1.0.0","version":"1.1.11","namespace":"com.rudderlabs.javascript"},"locale":"en-US","screen":{"density":2},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.11"},"campaign":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0"},"rudderId":"8f8fa6b5-8e24-489c-8e22-61f23f2e364f","messageId":"2116ef8c-efc3-4ca4-851b-02ee60dad6ff","anonymousId":"97c46c81-3140-456d-b2a9-690d70aaca35","originalTimestamp":"2021-01-03T17:02:53.193Z"},"destination":{"Config":{"apiKey":"t1yurrb968zk","s4ServiceValue":"","s4ServiceProperty":"s4Service","s4LocationValue":"","s4LocationProperty":"s4Location","s4AlertingScenarioValue":"","s4AlertingScenarioProperty":"s4Alerting","s4ExternalIDValue":"","s4ExternalIDProperty":"s4ExternalID","s4StatusValue":"","s4StatusProperty":"s4Status","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://connect.signl4.com/webhook/t1yurrb968zk","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"message":"Please check the alert","Title":"Alert Created","brand":"Zara","price":"12000","X-S4-Service":"service","X-S4-Location":"67.3, 32.3","X-S4-AlertingScenario":"single_ack","X-S4-ExternalID":"INC493933","X-S4-Status":"new"},"JSON_ARRAY":{},"XML":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "signl4", + "description": "Check for property mapping overrding default value", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"event":"New Alert","type":"track","sentAt":"2021-01-03T17:02:53.195Z","channel":"web","properties":{"message":"Please check the alert","brand":"Zara","price":"12000","s4Service":"service","s4Location":"67.3, 32.3","s4Alerting":"single_ack","s4ExternalID":"INC493933","s4Status":"new"},"context":{"os":{"name":"","version":""},"app":{"name":"RudderLabs JavaScript SDK","build":"1.0.0","version":"1.1.11","namespace":"com.rudderlabs.javascript"},"locale":"en-US","screen":{"density":2},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.11"},"campaign":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0"},"rudderId":"8f8fa6b5-8e24-489c-8e22-61f23f2e364f","messageId":"2116ef8c-efc3-4ca4-851b-02ee60dad6ff","anonymousId":"97c46c81-3140-456d-b2a9-690d70aaca35","originalTimestamp":"2021-01-03T17:02:53.193Z"},"destination":{"Config":{"apiKey":"t1yurrb968zk","s4ServiceValue":"defaultServiceValue","s4ServiceProperty":"s4Service","s4LocationValue":"defaultLocationValue","s4LocationProperty":"s4Location","s4AlertingScenarioValue":"defaultScenarioValue","s4AlertingScenarioProperty":"s4Alerting","s4ExternalIDValue":"defaultIDValue","s4ExternalIDProperty":"s4ExternalID","s4StatusValue":"defaultStatusValue","s4StatusProperty":"s4Status","s4Filter":true,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"version":"1","type":"REST","method":"POST","endpoint":"https://connect.signl4.com/webhook/t1yurrb968zk","headers":{"Content-Type":"application/json"},"params":{},"body":{"JSON":{"message":"Please check the alert","Title":"Alert Created","brand":"Zara","price":"12000","X-S4-Service":"service","X-S4-Location":"67.3, 32.3","X-S4-AlertingScenario":"single_ack","X-S4-ExternalID":"INC493933","X-S4-Status":"new"},"JSON_ARRAY":{},"XML":{},"FORM":{}},"files":{},"userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "signl4", + "description": "Check for event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"event":"","type":"track","sentAt":"2021-01-03T17:02:53.195Z","channel":"web","properties":{"message":"Please check the alert","brand":"Zara","price":"12000"},"context":{"os":{"name":"","version":""},"app":{"name":"RudderLabs JavaScript SDK","build":"1.0.0","version":"1.1.11","namespace":"com.rudderlabs.javascript"},"locale":"en-US","screen":{"density":2},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.11"},"campaign":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0"},"rudderId":"8f8fa6b5-8e24-489c-8e22-61f23f2e364f","messageId":"2116ef8c-efc3-4ca4-851b-02ee60dad6ff","anonymousId":"97c46c81-3140-456d-b2a9-690d70aaca35","originalTimestamp":"2021-01-03T17:02:53.193Z"},"destination":{"Config":{"apiKey":"t1yurrb968zk","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"apiKey":"t1yurrb968zk","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}, + "error": "Event is not present in the input payload", "statTags": { + "destType": "SIGNL4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "signl4", + "description": "Check for apiKey", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"event":"New Alert","type":"track","sentAt":"2021-01-03T17:02:53.195Z","channel":"web","properties":{"message":"Please check the alert","brand":"Zara","price":"12000"},"context":{"os":{"name":"","version":""},"app":{"name":"RudderLabs JavaScript SDK","build":"1.0.0","version":"1.1.11","namespace":"com.rudderlabs.javascript"},"locale":"en-US","screen":{"density":2},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.11"},"campaign":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0"},"rudderId":"8f8fa6b5-8e24-489c-8e22-61f23f2e364f","messageId":"2116ef8c-efc3-4ca4-851b-02ee60dad6ff","anonymousId":"97c46c81-3140-456d-b2a9-690d70aaca35","originalTimestamp":"2021-01-03T17:02:53.193Z"},"destination":{"Config":{"apiKey":"","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"apiKey":"","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}, + "error": "ApiKey is a required field", "statTags": { + "destType": "SIGNL4", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "signl4", + "description": "Unsupported message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"event":"New Alert","type":"identify","sentAt":"2021-01-03T17:02:53.195Z","channel":"web","properties":{"message":"Please check the alert","brand":"Zara","price":"12000"},"context":{"os":{"name":"","version":""},"app":{"name":"RudderLabs JavaScript SDK","build":"1.0.0","version":"1.1.11","namespace":"com.rudderlabs.javascript"},"locale":"en-US","screen":{"density":2},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.11"},"campaign":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0"},"rudderId":"8f8fa6b5-8e24-489c-8e22-61f23f2e364f","messageId":"2116ef8c-efc3-4ca4-851b-02ee60dad6ff","anonymousId":"97c46c81-3140-456d-b2a9-690d70aaca35","originalTimestamp":"2021-01-03T17:02:53.193Z"},"destination":{"Config":{"apiKey":"urissi44sfgs","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"apiKey":"urissi44sfgs","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}, + "error": "Event type identify is not supported", "statTags": { + "destType": "SIGNL4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "signl4", + "description": "Message type not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"event":"New Alert","type":"","sentAt":"2021-01-03T17:02:53.195Z","channel":"web","properties":{"message":"Please check the alert","brand":"Zara","price":"12000"},"context":{"os":{"name":"","version":""},"app":{"name":"RudderLabs JavaScript SDK","build":"1.0.0","version":"1.1.11","namespace":"com.rudderlabs.javascript"},"locale":"en-US","screen":{"density":2},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.11"},"campaign":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0"},"rudderId":"8f8fa6b5-8e24-489c-8e22-61f23f2e364f","messageId":"2116ef8c-efc3-4ca4-851b-02ee60dad6ff","anonymousId":"97c46c81-3140-456d-b2a9-690d70aaca35","originalTimestamp":"2021-01-03T17:02:53.193Z"},"destination":{"Config":{"apiKey":"urissi44sfgs","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"apiKey":"urissi44sfgs","s4ServiceValue":"service","s4ServiceProperty":"","s4LocationValue":"67.3, 32.3","s4LocationProperty":"","s4AlertingScenarioValue":"single_ack","s4AlertingScenarioProperty":"","s4ExternalIDValue":"INC493933","s4ExternalIDProperty":"","s4StatusValue":"new","s4StatusProperty":"","s4Filter":false,"eventToTitleMapping":[{"from":"New Alert","to":"Alert Created"}]}}, + "error": "Event type is required", "statTags": { + "destType": "SIGNL4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }]; module.exports = { + data + } \ No newline at end of file diff --git a/test/integrations/destinations/signl4/router/data.js b/test/integrations/destinations/signl4/router/data.js new file mode 100644 index 0000000000..454241d0a3 --- /dev/null +++ b/test/integrations/destinations/signl4/router/data.js @@ -0,0 +1,277 @@ +const data = [ + { + "name": "signl4", + "description": "Successfull Track Call ", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "apiKey": "t1yurrb968zk", + "s4ServiceValue": "service", + "s4ServiceProperty": "", + "s4LocationValue": "67.3, 32.3", + "s4LocationProperty": "", + "s4AlertingScenarioValue": "single_ack", + "s4AlertingScenarioProperty": "", + "s4ExternalIDValue": "INC493933", + "s4ExternalIDProperty": "", + "s4StatusValue": "new", + "s4StatusProperty": "", + "s4Filter": false, + "eventToTitleMapping": [] + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "event": "New Alert", + "type": "track", + "sentAt": "2021-01-03T17:02:53.195Z", + "channel": "web", + "properties": { + "message": "Please check the alert", + "brand": "Zara", + "price": "12000" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + }] + , "destType": "signl4" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://connect.signl4.com/webhook/t1yurrb968zk", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "message": "Please check the alert", + "Title": "New Alert", + "brand": "Zara", + "price": "12000", + "X-S4-Service": "service", + "X-S4-Location": "67.3, 32.3", + "X-S4-AlertingScenario": "single_ack", + "X-S4-ExternalID": "INC493933", + "X-S4-Status": "new" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "t1yurrb968zk", + "s4ServiceValue": "service", + "s4ServiceProperty": "", + "s4LocationValue": "67.3, 32.3", + "s4LocationProperty": "", + "s4AlertingScenarioValue": "single_ack", + "s4AlertingScenarioProperty": "", + "s4ExternalIDValue": "INC493933", + "s4ExternalIDProperty": "", + "s4StatusValue": "new", + "s4StatusProperty": "", + "s4Filter": false, + "eventToTitleMapping": [] + } + } + } + ] + } + } + } + }, + { + "name": "signl4", + "description": "Identify Event not Supported", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "apiKey": "urissi44sfgs", + "s4ServiceValue": "service", + "s4ServiceProperty": "", + "s4LocationValue": "67.3, 32.3", + "s4LocationProperty": "", + "s4AlertingScenarioValue": "single_ack", + "s4AlertingScenarioProperty": "", + "s4ExternalIDValue": "INC493933", + "s4ExternalIDProperty": "", + "s4StatusValue": "new", + "s4StatusProperty": "", + "s4Filter": false, + "eventToTitleMapping": [ + { + "from": "New Alert", + "to": "Alert Created" + } + ] + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "event": "New Alert", + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "channel": "web", + "properties": { + "message": "Please check the alert", + "brand": "Zara", + "price": "12000" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + }] + , "destType": "signl4" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "destination": { + "Config": { + "apiKey": "urissi44sfgs", + "s4ServiceValue": "service", + "s4ServiceProperty": "", + "s4LocationValue": "67.3, 32.3", + "s4LocationProperty": "", + "s4AlertingScenarioValue": "single_ack", + "s4AlertingScenarioProperty": "", + "s4ExternalIDValue": "INC493933", + "s4ExternalIDProperty": "", + "s4StatusValue": "new", + "s4StatusProperty": "", + "s4Filter": false, + "eventToTitleMapping": [ + { + "from": "New Alert", + "to": "Alert Created" + } + ] + } + }, + "metadata": [ + { + "jobId": 2 + } + ], + "statTags": { + "errorCategory": "dataValidation", + "destType": "SIGNL4", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorType": "instrumentation" + }, + "batched": false, + "statusCode": 400, + "error": "Event type identify is not supported" + } + ] + } + } + } + }, +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/singular/processor/data.js b/test/integrations/destinations/singular/processor/data.js new file mode 100644 index 0000000000..df7aa623e0 --- /dev/null +++ b/test/integrations/destinations/singular/processor/data.js @@ -0,0 +1,397 @@ +const data = [{ + "name": "singular", + "description": "(Android) Session Event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "mysessionevent", "userId": "ruddersampleX3", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "Android", "bluetooth": false, "cellular": true, "wifi": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "Android", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "referring_application": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "products": [{ "product_id": "789", "sku": "G-32", "name": "Monopoly", "price": 14, "quantity": 1, "category": "Games", "url": "https://www.website.com/product/path", "image_url": "https://www.website.com/product/path.jpg" }, { "sku": "F-32", "name": "UNO", "price": 3.45, "quantity": 2, "category": "Games" }] }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/launch", "headers": {}, "params": { "p": "Android", "i": "com.rudderstack.demo.android", "app_v": "1.0", "ip": "14.5.67.21", "ve": "9", "mo": "Android SDK built for x86", "ma": "Google", "lc": "en-US", "c": "wifi", "dnt": 0, "install_source": "2134dfg", "asid": "IISqwYJKoZIcNqts0jvcNvPc", "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "sessionNotificationName": "mysessionevent", "custom_user_id": "ruddersampleX3", "n": "RudderAndroidClient", "utime": 1630511211, "cn": "Android", "fcm": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", "bd": "1", "install": "SM-G935F", "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "andi": "fc8d449516de0dfb", "install_time": 1630511211, "update_time": 1630511211, "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "(Android) Custom Event with multiple products", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "myevent", "userId": "ruddersampleX4", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "Android", "bluetooth": false, "cellular": true, "wifi": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "Android", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "referring_application": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "products": [{ "product_id": "789", "sku": "G-32", "name": "Monopoly", "price": 14, "quantity": 2, "category": "Games", "url": "https://www.website.com/product/path", "image_url": "https://www.website.com/product/path.jpg" }, { "sku": "F-32", "name": "UNO", "price": 3.45, "quantity": 2, "category": "Games" }] }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/evt", "headers": {}, "params": { "n": "myevent", "p": "Android", "i": "com.rudderstack.demo.android", "ip": "14.5.67.21", "is_revenue_event": true, "ve": "9", "custom_user_id": "ruddersampleX4", "utime": 1630511211, "cur": "USD", "amt": 28, "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "andi": "fc8d449516de0dfb", "asid": "IISqwYJKoZIcNqts0jvcNvPc", "receipt_signature": "1234dfghnh", "purchase_product_id": "789", "c": "wifi", "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "e": { "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "referring_application": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "fetch_token": "123asd23" } }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }, { + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/evt", "headers": {}, "params": { "n": "myevent", "p": "Android", "i": "com.rudderstack.demo.android", "ip": "14.5.67.21", "is_revenue_event": true, "ve": "9", "custom_user_id": "ruddersampleX4", "utime": 1630511211, "cur": "USD", "purchase_product_id": "F-32", "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "andi": "fc8d449516de0dfb", "amt": 6.9, "asid": "IISqwYJKoZIcNqts0jvcNvPc", "receipt_signature": "1234dfghnh", "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "c": "wifi", "e": { "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "referring_application": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "fetch_token": "123asd23" } }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "[Error]: (Android) Custom Event without the event name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "userId": "ruddersampleX4", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "Android", "bluetooth": false, "cellular": true, "wifi": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "Android", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "referring_application": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14, "quantity": 1, "image_url": "https://www.website.com/product/path.jpg" }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, + "error": "Event name is not present for the event", "statTags": { + "destType": "SINGULAR", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "singular", + "description": "(Android) Session Event without referring_application", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "titanium", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "Android", "bluetooth": false, "cellular": true, "wifi": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "Android", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "is_revenue_event": true, "purchase_receipt": "12def12e3", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14, "quantity": 1, "image_url": "https://www.website.com/product/path.jpg" }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/launch", "headers": {}, "params": { "p": "Android", "i": "com.rudderstack.demo.android", "app_v": "1.0", "ip": "14.5.67.21", "ve": "9", "mo": "Android SDK built for x86", "ma": "Google", "lc": "en-US", "asid": "IISqwYJKoZIcNqts0jvcNvPc", "sessionNotificationName": "titanium", "custom_user_id": "ruddersampleX5", "n": "RudderAndroidClient", "cn": "Android", "fcm": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", "bd": "1", "install": "SM-G935F", "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "andi": "fc8d449516de0dfb", "utime": 1630511211, "install_time": 1630511211, "update_time": 1630511211, "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "dnt": 0, "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install_source": "", "c": "wifi", "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "(Android) Event with additional properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "myevent", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "Android", "bluetooth": false, "cellular": true, "wifi": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "Android", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "is_revenue_event": true, "purchase_receipt": "12def12e3", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14, "quantity": 1, "image_url": "https://www.website.com/product/path.jpg" }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/evt", "headers": {}, "params": { "n": "myevent", "p": "Android", "i": "com.rudderstack.demo.android", "ip": "14.5.67.21", "ve": "9", "custom_user_id": "ruddersampleX5", "utime": 1630511211, "cur": "USD", "purchase_receipt": "12def12e3", "purchase_product_id": "123", "purchase_transaction_id": "2134dfg", "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "andi": "fc8d449516de0dfb", "asid": "IISqwYJKoZIcNqts0jvcNvPc", "receipt_signature": "1234dfghnh", "amt": 20, "is_revenue_event": true, "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "c": "wifi", "e": { "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "fetch_token": "123asd23", "name": "Monopoly", "image_url": "https://www.website.com/product/path.jpg" } }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "[Error]: (Android) Required Platform field missing for Custom Events", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "myevent", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "Android", "bluetooth": false, "cellular": true, "wifi": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "is_revenue_event": true, "purchase_receipt": "12def12e3", "install": "SM-G935F", "category": "Games", "checkout_id": "12345", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14, "quantity": 1, "image_url": "https://www.website.com/product/path.jpg" }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, + "error": "Platform name is missing from context.os.name", "statTags": { + "destType": "SINGULAR", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "singular", + "description": "(Android) Session Event mapped from config", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "mysessionevent", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "Android", "bluetooth": false, "cellular": true, "wifi": false }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "Android", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14, "referring_application": "Amazon" }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/launch", "headers": {}, "params": { "p": "Android", "i": "com.rudderstack.demo.android", "app_v": "1.0", "ip": "14.5.67.21", "ve": "9", "mo": "Android SDK built for x86", "ma": "Google", "lc": "en-US", "c": "carrier", "install_source": "Amazon", "asid": "IISqwYJKoZIcNqts0jvcNvPc", "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "dnt": 0, "sessionNotificationName": "mysessionevent", "custom_user_id": "ruddersampleX5", "n": "RudderAndroidClient", "utime": 1630511211, "cn": "Android", "fcm": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", "bd": "1", "install": "SM-G935F", "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "andi": "fc8d449516de0dfb", "install_time": 1630511211, "update_time": 1630511211, "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "(Android) Session Event with a single product", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "mysessionevent", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "Android", "bluetooth": false, "cellular": true, "wifi": false }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "Android", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14, "referring_application": "Amazon" }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/launch", "headers": {}, "params": { "p": "Android", "i": "com.rudderstack.demo.android", "app_v": "1.0", "ip": "14.5.67.21", "ve": "9", "mo": "Android SDK built for x86", "ma": "Google", "c": "carrier", "lc": "en-US", "install_source": "Amazon", "asid": "IISqwYJKoZIcNqts0jvcNvPc", "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "dnt": 0, "sessionNotificationName": "mysessionevent", "custom_user_id": "ruddersampleX5", "n": "RudderAndroidClient", "utime": 1630511211, "cn": "Android", "fcm": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", "bd": "1", "install": "SM-G935F", "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "andi": "fc8d449516de0dfb", "install_time": 1630511211, "update_time": 1630511211, "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "[Error]: (Android) Session Event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "mysessionevent", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "iOS", "bluetooth": false, "cellular": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "iOS", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14 }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, + "error": "Missing required value from \"properties.install_receipt\"", "statTags": { + "destType": "SINGULAR", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "singular", + "description": "(iOS) Session Event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "mysessionevent", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attTrackingStatus": 3, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "iOS", "bluetooth": false, "cellular": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "ipados", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "skan_last_call_timestamp": "2021-09-05T15:46:51.000Z", "skan_first_call_timestamp": "2021-09-05T12:46:10.000Z", "skan_conversion_value": "2", "attribution_token": "G9i5hC8lQJeGOfmS+MFycll/02...AAABBEQQBQS=", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "install_receipt": "MIISqwYJKoZIcNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14 }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/launch", "headers": {}, "params": { "p": "iOS", "i": "com.rudderstack.demo.android", "app_v": "1.0", "ip": "14.5.67.21", "ve": "9", "mo": "Android SDK built for x86", "ma": "Google", "c": "carrier", "lc": "en-US", "install_receipt": "MIISqwYJKoZIcNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==", "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "att_authorization_status": 3, "sessionNotificationName": "mysessionevent", "custom_user_id": "ruddersampleX5", "n": "RudderAndroidClient", "utime": 1630511211, "cn": "iOS", "apns_token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "attribution_token": "G9i5hC8lQJeGOfmS+MFycll/02...AAABBEQQBQS=", "skan_conversion_value": "2", "skan_first_call_timestamp": 1630845970, "skan_last_call_timestamp": 1630856811, "bd": "1", "dnt": 0, "install": "SM-G935F", "idfa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "idfv": "fc8d449516de0dfb", "install_time": 1630511211, "update_time": 1630511211, "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "(iOS) Custom event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "myevent", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attTrackingStatus": 3, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "iOS", "bluetooth": false, "cellular": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "iOS", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "skan_last_call_timestamp": "2021-09-08T12:16:11.000Z", "skan_first_call_timestamp": "2021-09-05T15:46:51.000Z", "skan_conversion_value": "2", "attribution_token": "G9i5hC8lQJeGOfmS+MFycll/02...AAABBEQQBQS=", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "install_receipt": "MIISqwYJKoZIcNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14 }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/evt", "headers": {}, "params": { "n": "myevent", "p": "iOS", "i": "com.rudderstack.demo.android", "ip": "14.5.67.21", "is_revenue_event": true, "ve": "9", "att_authorization_status": 3, "custom_user_id": "ruddersampleX5", "utime": 1630511211, "skan_conversion_value": "2", "skan_first_call_timestamp": 1630856811, "skan_last_call_timestamp": 1631103371, "cur": "USD", "amt": 20, "purchase_product_id": "123", "purchase_transaction_id": "2134dfg", "idfa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "idfv": "fc8d449516de0dfb", "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "c": "carrier", "e": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "attribution_token": "G9i5hC8lQJeGOfmS+MFycll/02...AAABBEQQBQS=", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "install_receipt": "MIISqwYJKoZIcNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "fetch_token": "123asd23", "name": "Monopoly" } }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "(Android) Lifeycle Session event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "Application Installed", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attTrackingStatus": 3, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "iOS", "bluetooth": false, "cellular": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "iOS", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "attribution_token": "G9i5hC8lQJeGOfmS+MFycll/02...AAABBEQQBQS=", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "install_receipt": "MIISqwYJKoZIcNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14 }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": + { "version": "1", "type": "REST", "method": "GET", "endpoint": "https://s2s.singular.net/api/v1/launch", "headers": {}, "params": { "p": "iOS", "i": "com.rudderstack.demo.android", "app_v": "1.0", "ip": "14.5.67.21", "ve": "9", "mo": "Android SDK built for x86", "ma": "Google", "c": "carrier", "dnt": 0, "lc": "en-US", "install_receipt": "MIISqwYJKoZIcNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==", "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "att_authorization_status": 3, "sessionNotificationName": "Application Installed", "custom_user_id": "ruddersampleX5", "n": "RudderAndroidClient", "utime": 1630511211, "cn": "iOS", "apns_token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "attribution_token": "G9i5hC8lQJeGOfmS+MFycll/02...AAABBEQQBQS=", "bd": "1", "install": "SM-G935F", "idfa": "8ecd7512-2864-440c-93f3-a3cabe62525b", "idfv": "fc8d449516de0dfb", "install_time": 1630511211, "update_time": 1630511211, "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" }, "body": { "JSON": {}, "JSON_ARRAY": {}, "XML": {}, "FORM": {} }, "files": {}, "userId": "" }, + "statusCode": 200 + }] + } + } +}, { + "name": "singular", + "description": "(Android) Session Event - Application Installed lifecycle event ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "track", "event": "Application Installed", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "iOS", "bluetooth": false, "cellular": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "window", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "skan_last_call_timestamp": "1654532056", "skan_first_call_timestamp": "1651853656", "skan_conversion_value": "2", "attribution_token": "G9i5hC8lQJeGOfmS+MFycll/02...AAABBEQQBQS=", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "install_receipt": "MIISqwYJKoZIcNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14 }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, + "error": "Platform window is not supported", "statTags": { + "destType": "SINGULAR", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}, { + "name": "singular", + "description": "[Error]: Unsupported Identify Call made", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, "message": { "type": "identify", "event": "Application Installed", "userId": "ruddersampleX5", "request_ip": "14.5.67.21", "context": { "app": { "build": "1", "name": "RudderAndroidClient", "namespace": "com.rudderstack.demo.android", "version": "1.0" }, "device": { "manufacturer": "Google", "model": "Android SDK built for x86", "name": "generic_x86", "type": "android", "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", "attStatus": true, "id": "fc8d449516de0dfb", "adTrackingEnabled": true, "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" }, "library": { "name": "com.rudderstack.android.sdk.core", "version": "0.1.4" }, "locale": "en-US", "network": { "carrier": "iOS", "bluetooth": false, "cellular": true }, "campaign": { "source": "google", "medium": "medium", "term": "keyword", "content": "some content" }, "os": { "name": "window", "version": "9" }, "screen": { "density": 420, "height": 1794, "width": 1080 }, "timezone": "Asia/Mumbai" }, "properties": { "asid": "IISqwYJKoZIcNqts0jvcNvPc", "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", "install": "SM-G935F", "order_id": "1234", "affiliation": "Apple Store", "receipt_signature": "1234dfghnh", "purchase_transaction_id": "2134dfg", "skan_last_call_timestamp": "1654532056", "skan_first_call_timestamp": "1651853656", "skan_conversion_value": "2", "attribution_token": "G9i5hC8lQJeGOfmS+MFycll/02...AAABBEQQBQS=", "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", "install_receipt": "MIISqwYJKoZIcNqts0jvcNvPcK7yuj0KhJ9nTTQ54kDKfReihzc6aw==", "total": 20, "revenue": 15, "shipping": 22, "tax": 1, "discount": 1.5, "coupon": "ImagePro", "currency": "USD", "fetch_token": "123asd23", "product_id": "123", "sku": "G-32", "name": "Monopoly", "price": 14 }, "timestamp": "2021-09-01T15:46:51.000Z" } }, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output": { + "response": { + "status": 200, + "body": [{ + + "destination": { "Config": { "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", "sessionEventList": [{ "sessionEventName": "mysessionevent" }, { "sessionEventName": "randomuser" }, { "sessionEventName": "titanium" }] } }, + "error": "Event type identify is not supported", "statTags": { + "destType": "SINGULAR", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } +}]; module.exports = { + data +} \ No newline at end of file diff --git a/test/integrations/destinations/singular/router/data.js b/test/integrations/destinations/singular/router/data.js new file mode 100644 index 0000000000..0e78b23ab5 --- /dev/null +++ b/test/integrations/destinations/singular/router/data.js @@ -0,0 +1,1020 @@ +const data = [ + { + "name": "singular", + "description": "Successfull Track Call with sessionEventList from Config ", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", + "sessionEventList": [ + { + "sessionEventName": "mysessionevent" + }, + { + "sessionEventName": "randomuser" + }, + { + "sessionEventName": "titanium" + } + ] + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "track", + "event": "mysessionevent", + "userId": "ruddersampleX3", + "request_ip": "14.5.67.21", + "context": { + "app": { + "build": "1", + "name": "RudderAndroidClient", + "namespace": "com.rudderstack.demo.android", + "version": "1.0" + }, + "device": { + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android", + "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", + "attStatus": "true", + "id": "fc8d449516de0dfb", + "adTrackingEnabled": "true", + "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "0.1.4" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content" + }, + "os": { + "name": "Android", + "version": "9" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Mumbai", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" + }, + "properties": { + "asid": "IISqwYJKoZIcNqts0jvcNvPc", + "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", + "install": "SM-G935F", + "category": "Games", + "checkout_id": "12345", + "order_id": "1234", + "affiliation": "Apple Store", + "receipt_signature": "1234dfghnh", + "referring_application": "2134dfg", + "total": 20, + "revenue": 15.0, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "fetch_token": "123asd23", + "product_id": "123", + "products": [ + { + "product_id": "789", + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "category": "Games", + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.jpg" + }, + { + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "quantity": 2, + "category": "Games" + } + ] + }, + "timestamp": "2021-09-01T15:46:51.000Z" + } + }] + , "destType": "singular" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", "userId": "", + "method": "GET", + "endpoint": "https://s2s.singular.net/api/v1/launch", + "headers": {}, + "params": { + "p": "Android", + "i": "com.rudderstack.demo.android", + "app_v": "1.0", + "ip": "14.5.67.21", + "ve": "9", + "mo": "Android SDK built for x86", + "ma": "Google", + "lc": "en-US", + "install_source": "2134dfg", + "asid": "IISqwYJKoZIcNqts0jvcNvPc", + "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", + "dnt": 1, + "sessionNotificationName": "mysessionevent", + "custom_user_id": "ruddersampleX3", + "n": "RudderAndroidClient", + "utime": 1630511211, + "cn": "Android", + "fcm": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", + "bd": "1", + "install": "SM-G935F", + "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", + "andi": "fc8d449516de0dfb", + "install_time": 1630511211, + "update_time": 1630511211, + "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", + "c": "wifi", + "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", + "sessionEventList": [ + { + "sessionEventName": "mysessionevent" + }, + { + "sessionEventName": "randomuser" + }, + { + "sessionEventName": "titanium" + } + ] + } + } + } + ] + } + } + } + }, + { + "name": "singular", + "description": "Successful Track Event with properties.products", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", + "sessionEventList": [ + { + "sessionEventName": "mysessionevent" + }, + { + "sessionEventName": "randomuser" + }, + { + "sessionEventName": "titanium" + } + ] + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "track", + "event": "mysessionevent", + "userId": "ruddersampleX3", + "request_ip": "14.5.67.21", + "context": { + "app": { + "build": "1", + "name": "RudderAndroidClient", + "namespace": "com.rudderstack.demo.android", + "version": "1.0" + }, + "device": { + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android", + "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", + "attStatus": "true", + "id": "fc8d449516de0dfb", + "adTrackingEnabled": "true", + "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "0.1.4" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content" + }, + "os": { + "name": "Android", + "version": "9" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Mumbai", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" + }, + "properties": { + "asid": "IISqwYJKoZIcNqts0jvcNvPc", + "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", + "install": "SM-G935F", + "category": "Games", + "checkout_id": "12345", + "order_id": "1234", + "affiliation": "Apple Store", + "receipt_signature": "1234dfghnh", + "referring_application": "2134dfg", + "total": 20, + "revenue": 15.0, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "fetch_token": "123asd23", + "product_id": "123", + "products": [ + { + "product_id": "789", + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "category": "Games", + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.jpg" + }, + { + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "quantity": 2, + "category": "Games" + } + ] + }, + "timestamp": "2021-09-01T15:46:51.000Z" + } + }] + , "destType": "singular" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", "userId": "", + "method": "GET", + "endpoint": "https://s2s.singular.net/api/v1/launch", + "headers": {}, + "params": { + "p": "Android", + "i": "com.rudderstack.demo.android", + "app_v": "1.0", + "ip": "14.5.67.21", + "ve": "9", + "mo": "Android SDK built for x86", + "ma": "Google", + "lc": "en-US", + "install_source": "2134dfg", + "asid": "IISqwYJKoZIcNqts0jvcNvPc", + "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", + "dnt": 1, + "sessionNotificationName": "mysessionevent", + "custom_user_id": "ruddersampleX3", + "n": "RudderAndroidClient", + "utime": 1630511211, + "cn": "Android", + "fcm": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", + "bd": "1", + "install": "SM-G935F", + "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", + "andi": "fc8d449516de0dfb", + "install_time": 1630511211, + "update_time": 1630511211, + "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", + "c": "wifi", + "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", + "sessionEventList": [ + { + "sessionEventName": "mysessionevent" + }, + { + "sessionEventName": "randomuser" + }, + { + "sessionEventName": "titanium" + } + ] + } + } + } + ] + } + } + } + }, + { + "name": "singular", + "description": "Successfull Track Call with sessionEventList from Config", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "destination": { + "Config": { + "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", + "sessionEventList": [ + { + "sessionEventName": "mysessionevent" + }, + { + "sessionEventName": "randomuser" + }, + { + "sessionEventName": "titanium" + } + ] + } + }, + "metadata": { + "jobId": 3 + }, + "message": { + "type": "track", + "event": "mysessionevent", + "userId": "ruddersampleX3", + "request_ip": "14.5.67.21", + "context": { + "app": { + "build": "1", + "name": "RudderAndroidClient", + "namespace": "com.rudderstack.demo.android", + "version": "1.0" + }, + "device": { + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android", + "advertisingId": "8ecd7512-2864-440c-93f3-a3cabe62525b", + "attStatus": "true", + "id": "fc8d449516de0dfb", + "adTrackingEnabled": "true", + "token": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "0.1.4" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content" + }, + "os": { + "name": "Android", + "version": "9" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Mumbai", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" + }, + "properties": { + "asid": "IISqwYJKoZIcNqts0jvcNvPc", + "url": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", + "install": "SM-G935F", + "category": "Games", + "checkout_id": "12345", + "order_id": "1234", + "affiliation": "Apple Store", + "receipt_signature": "1234dfghnh", + "referring_application": "2134dfg", + "total": 20, + "revenue": 15.0, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "fetch_token": "123asd23", + "product_id": "123", + "products": [ + { + "product_id": "789", + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "category": "Games", + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.jpg" + }, + { + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "quantity": 2, + "category": "Games" + } + ] + }, + "timestamp": "2021-09-01T15:46:51.000Z" + } + }] + , "destType": "singular" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", "userId": "", + "method": "GET", + "endpoint": "https://s2s.singular.net/api/v1/launch", + "headers": {}, + "params": { + "p": "Android", + "i": "com.rudderstack.demo.android", + "app_v": "1.0", + "ip": "14.5.67.21", + "ve": "9", + "mo": "Android SDK built for x86", + "ma": "Google", + "lc": "en-US", + "install_source": "2134dfg", + "asid": "IISqwYJKoZIcNqts0jvcNvPc", + "openuri": "myapp%3A%2F%2Fhome%2Fpage%3Fqueryparam1%3Dvalue1", + "dnt": 1, + "sessionNotificationName": "mysessionevent", + "custom_user_id": "ruddersampleX3", + "n": "RudderAndroidClient", + "utime": 1630511211, + "cn": "Android", + "fcm": "bk3RNwTe3H0CI2k_ HHwgIpoDKCIZvvD MExUdFQ3P1", + "bd": "1", + "install": "SM-G935F", + "aifa": "8ecd7512-2864-440c-93f3-a3cabe62525b", + "andi": "fc8d449516de0dfb", + "install_time": 1630511211, + "update_time": 1630511211, + "ua": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)", + "c": "wifi", + "a": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd" + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 3 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "ab7eb717-cdd8-tr63-a7f5-93339d7beelkd", + "sessionEventList": [ + { + "sessionEventName": "mysessionevent" + }, + { + "sessionEventName": "randomuser" + }, + { + "sessionEventName": "titanium" + } + ] + } + } + } + ] + } + } + } + }, + { + "name": "singular", + "description": "Successfull Track Call of event Application Backgrounded", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "type": "track", + "event": "Application Backgrounded", + "sentAt": "2023-01-19T14:25:24.234Z", + "userId": "68e214f1-ac84-4241-b27d-78a18f59f21e", + "channel": "mobile", + "context": { + "os": { + "name": "iOS", + "version": "16.2" + }, + "app": { + "build": "5013", + "version": "0.5.13", + "namespace": "com.yabimoney" + }, + "device": { + "id": "cc06ff5e-838b-4e33-9d90-4ab5a6068bec", + "name": "iPhone", + "type": "iOS", + "model": "iPhone", + "manufacturer": "Apple", + "advertisingId": "1", + "adTrackingEnabled": true, + "attTrackingStatus": 0 + }, + "locale": "en-AE", + "screen": { + "width": 844, + "height": 390, + "density": 3 + }, + "traits": { + "phone": "", + "userId": "68e214f1-ac84-4241-b27d-78a18f59f21e", + "tenant_id": "tgTV2Bbv", + "anonymousId": "cc06ff5e-838b-4e33-9d90-4ab5a6068bec", + "yabi_user_id": "uCh5IS8p", + "subscription_type": "" + }, + "library": { + "name": "rudder-ios-library", + "version": "1.8.0" + }, + "network": { + "wifi": true, + "carrier": "etisalat", + "cellular": false + }, + "timezone": "Asia/Dubai", + "sessionId": 1674138119 + }, + "rudderId": "b7bbf406-aa7f-4d64-a388-925675e78f36", + "messageId": "b9e9534b-b3b7-4bdb-8d59-062e1fbf4e2b", + "timestamp": "2023-01-19T14:25:07.532Z", + "receivedAt": "2023-01-19T14:25:25.465Z", + "request_ip": "87.201.98.151", + "anonymousId": "cc06ff5e-838b-4e33-9d90-4ab5a6068bec", + "integrations": { + "All": true + }, + "originalTimestamp": "2023-01-19T14:25:06.301Z" + }, + "destination": { + "secretConfig": {}, + "Config": { + "apiKey": "apiKey", + "apiSecret": "apiSecreth9h3984bnsdfkh98kjiu4h", + "sessionEventList": [ + { + "sessionEventName": "test_event" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "eventFilteringOption": "whitelistedEvents", + "eventDelivery": false, + "eventDeliveryTS": 1663919255086 + }, + "liveEventsConfig": { + "eventDelivery": false, + "eventDeliveryTS": 1663919255086 + }, + "ID": "2EhlBrBduwN2NX4pJ7nrVDHAz6C", + "workspaceId": "1sUXvPs0hYgjBxSfjG4gqnRFNoP", + "DestinationDefinition": { + "config": { + "destConfig": { + "ios": [ + "useNativeSDK" + ], + "android": [ + "useNativeSDK" + ], + "cordova": [ + "useNativeSDK" + ], + "reactnative": [ + "useNativeSDK" + ], + "defaultConfig": [ + "apiKey", + "apiSecret", + "sessionEventList", + "blacklistedEvents", + "whitelistedEvents", + "eventFilteringOption" + ] + }, + "excludeKeys": [], + "includeKeys": [ + "apiKey", + "apiSecret", + "sessionEventList", + "blacklistedEvents", + "whitelistedEvents", + "eventFilteringOption" + ], + "transformAt": "processor", + "transformAtV1": "processor", + "supportedSourceTypes": [ + "android", + "ios", + "flutter", + "reactnative", + "cordova", + "web", + "amp", + "cloud", + "warehouse" + ], + "saveDestinationResponse": true + }, + "configSchema": {}, + "responseRules": {}, + "options": null, + "id": "2642K92ztyRPghLlFL9GXfwjWDp", + "name": "SINGULAR", + "displayName": "Singular", + "category": null, + "createdAt": "2022-03-07T15:54:30.619Z", + "updatedAt": "2022-10-12T12:44:07.624Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true, + "name": "Singular", + "enabled": true, + "deleted": false, + "createdAt": "2022-09-13T07:52:44.981Z", + "updatedAt": "2022-09-23T07:47:35.092Z", + "revisionId": "2F9znalm2FSPmdj99jJbsoVLSVM", + "secretVersion": 1 + }, + "metadata": { + "sourceId": "1vPJD7KzElDJ0N7SRf1fZ32z1SW", + "workspaceId": "1sUXvPs0hYgjBxSfjG4gqnRFNoP", + "namespace": "mynamespace", + "instanceId": "mynamespace-v0-rudderstack-0", + "sourceType": "Javascript", + "sourceCategory": "", + "trackingPlanId": "", + "trackingPlanVersion": 0, + "sourceTpConfig": null, + "mergedTpConfig": null, + "destinationId": "2EhlBrBduwN2NX4pJ7nrVDHAz6C", + "jobRunId": "", + "jobId": 68205922, + "sourceBatchId": "", + "sourceJobId": "", + "sourceJobRunId": "", + "sourceTaskId": "", + "sourceTaskRunId": "", + "recordId": null, + "destinationType": "SINGULAR", + "messageId": "b9e9534b-b3b7-4bdb-8d59-062e1fbf4e2b", + "oauthAccessToken": "", + "messageIds": null, + "rudderId": "67895e15-d37f-49d6-9017-e8d29264e31f<<>>yolanda.rivera2@yahoo.com", + "receivedAt": "2022-05-02T07:20:13.809Z", + "eventName": "", + "eventType": "track", + "sourceDefinitionId": "1TW48i2bIzEl1HPf825cEznfIM8", + "destinationDefinitionId": "" + } + }] + , "destType": "singular" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", "userId": "", + "method": "GET", + "endpoint": "https://s2s.singular.net/api/v1/evt", + "headers": {}, + "params": { + "n": "Application Backgrounded", + "p": "iOS", + "i": "com.yabimoney", + "ip": "87.201.98.151", + "ve": "16.2", + "att_authorization_status": 0, + "custom_user_id": "68e214f1-ac84-4241-b27d-78a18f59f21e", + "utime": 1674138306, + "idfa": "1", + "idfv": "cc06ff5e-838b-4e33-9d90-4ab5a6068bec", + "c": "wifi", + "a": "apiKey", + "e": {} + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "sourceId": "1vPJD7KzElDJ0N7SRf1fZ32z1SW", + "workspaceId": "1sUXvPs0hYgjBxSfjG4gqnRFNoP", + "namespace": "mynamespace", + "instanceId": "mynamespace-v0-rudderstack-0", + "sourceType": "Javascript", + "sourceCategory": "", + "trackingPlanId": "", + "trackingPlanVersion": 0, + "sourceTpConfig": null, + "mergedTpConfig": null, + "destinationId": "2EhlBrBduwN2NX4pJ7nrVDHAz6C", + "jobRunId": "", + "jobId": 68205922, + "sourceBatchId": "", + "sourceJobId": "", + "sourceJobRunId": "", + "sourceTaskId": "", + "sourceTaskRunId": "", + "recordId": null, + "destinationType": "SINGULAR", + "messageId": "b9e9534b-b3b7-4bdb-8d59-062e1fbf4e2b", + "oauthAccessToken": "", + "messageIds": null, + "rudderId": "67895e15-d37f-49d6-9017-e8d29264e31f<<>>yolanda.rivera2@yahoo.com", + "receivedAt": "2022-05-02T07:20:13.809Z", + "eventName": "", + "eventType": "track", + "sourceDefinitionId": "1TW48i2bIzEl1HPf825cEznfIM8", + "destinationDefinitionId": "" + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "secretConfig": {}, + "Config": { + "apiKey": "apiKey", + "apiSecret": "apiSecreth9h3984bnsdfkh98kjiu4h", + "sessionEventList": [ + { + "sessionEventName": "test_event" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "eventFilteringOption": "whitelistedEvents", + "eventDelivery": false, + "eventDeliveryTS": 1663919255086 + }, + "liveEventsConfig": { + "eventDelivery": false, + "eventDeliveryTS": 1663919255086 + }, + "ID": "2EhlBrBduwN2NX4pJ7nrVDHAz6C", + "workspaceId": "1sUXvPs0hYgjBxSfjG4gqnRFNoP", + "DestinationDefinition": { + "config": { + "destConfig": { + "ios": [ + "useNativeSDK" + ], + "android": [ + "useNativeSDK" + ], + "cordova": [ + "useNativeSDK" + ], + "reactnative": [ + "useNativeSDK" + ], + "defaultConfig": [ + "apiKey", + "apiSecret", + "sessionEventList", + "blacklistedEvents", + "whitelistedEvents", + "eventFilteringOption" + ] + }, + "excludeKeys": [], + "includeKeys": [ + "apiKey", + "apiSecret", + "sessionEventList", + "blacklistedEvents", + "whitelistedEvents", + "eventFilteringOption" + ], + "transformAt": "processor", + "transformAtV1": "processor", + "supportedSourceTypes": [ + "android", + "ios", + "flutter", + "reactnative", + "cordova", + "web", + "amp", + "cloud", + "warehouse" + ], + "saveDestinationResponse": true + }, + "configSchema": {}, + "responseRules": {}, + "options": null, + "id": "2642K92ztyRPghLlFL9GXfwjWDp", + "name": "SINGULAR", + "displayName": "Singular", + "category": null, + "createdAt": "2022-03-07T15:54:30.619Z", + "updatedAt": "2022-10-12T12:44:07.624Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true, + "name": "Singular", + "enabled": true, + "deleted": false, + "createdAt": "2022-09-13T07:52:44.981Z", + "updatedAt": "2022-09-23T07:47:35.092Z", + "revisionId": "2F9znalm2FSPmdj99jJbsoVLSVM", + "secretVersion": 1 + } + } + ] + } + } + } + }, +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/trengo/processor/data.js b/test/integrations/destinations/trengo/processor/data.js new file mode 100644 index 0000000000..dc4ea945b7 --- /dev/null +++ b/test/integrations/destinations/trengo/processor/data.js @@ -0,0 +1,1563 @@ +const data = [ + { + name: 'trengo', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_email_channel', + channelIdentifier: 'email', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'identify', + context: { + traits: { name: 'Jimothy Halpert', email: 'jimbo@dunmiff.com' }, + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/channels/trengo_email_channel/contacts', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + name: 'Jimothy Halpert', + identifier: 'jimbo@dunmiff.com', + channel_id: 'trengo_email_channel', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_email_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'identify', + context: { + traits: { name: 'Jimothy Halpert', email: 'jimbo@dunmiff.com' }, + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_email_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + error: + 'LookupContact failed for term:null update failed, aborting as dedup option is enabled', + statTags: { + destType: 'TRENGO', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + module: 'destination', + meta: 'instrumentation', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'identify', + context: { + traits: { name: 'Dwight Schrute', phone: '12345678910' }, + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/channels/trengo_phone_channel/contacts', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + name: 'Dwight Schrute', + identifier: '12345678910', + channel_id: 'trengo_phone_channel', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'identify', + context: { + traits: { name: 'Angela Martin', phone: '99999666661' }, + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + error: + 'LookupContact failed for term:99999666661 update failed, aborting as dedup option is enabled', + statTags: { + destType: 'TRENGO', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + module: 'destination', + meta: 'instrumentation', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'identify', + context: { + traits: { name: 'Michael Gary Scott', phone: '98765432100' }, + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + error: 'Inside lookupContact, duplicates present for identifier : 98765432100', + statTags: { + destType: 'TRENGO', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + meta: 'instrumentation', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'identify', + context: { + traits: { name: 'Dr Manhatten', phone: '5678943215' }, + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/channels/trengo_phone_channel/contacts', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + name: 'Dr Manhatten', + identifier: '5678943215', + channel_id: 'trengo_phone_channel', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_email_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'Product Purchased', + properties: { + name: 'Random_Track_call', + cart_value: 5000, + email: 'utsab@outlook.com', + }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/tickets', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + contact_id: 97694755, + channel_id: 'trengo_email_channel', + subject: 'Product Purchased from Rudderstack', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_email_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'checkedOut', + properties: { name: 'Random_Track_call', value: 5000, email: 'utsab@outlook.com' }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/tickets', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + contact_id: 97694755, + channel_id: 'trengo_email_channel', + subject: 'Total cart value 5000 shipped', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'Order Completed', + properties: { name: 'Random_Track_call', value: 5000, phone: '98765432100' }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + externalId: [{ type: 'trengoChannelId', value: 'trengo_phoneext_channel' }], + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + error: 'Inside lookupContact, duplicates present for identifier : 98765432100', + statTags: { + destType: 'TRENGO', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + meta: 'instrumentation', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'Order Completed', + properties: { + name: 'Random_Track_call', + value: 5000, + phone: '9830311521', + email: 'utsab@outlook.com', + }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + externalId: [{ type: 'trengoChannelId', id: 'trengo_emailext_channel' }], + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/tickets', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + contact_id: 97694755, + channel_id: 'trengo_emailext_channel', + subject: 'Completed Order', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'Stress Test', + properties: { + name: 'Random_Track_call', + value: 5000, + phone: '9830311521', + email: 'utsab@outlook.com', + }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + externalId: [{ type: 'trengoChannelId', id: 'trengo_emailext_channel' }], + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/tickets', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { contact_id: 97694755, channel_id: 'trengo_emailext_channel' }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'Stress test2', + properties: { + name: 'Random_Track_call', + value: 5000, + phone: '9830311521', + email: 'utsab@outlook.com', + }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + externalId: [{ type: 'trengoChannelId', id: 'trengo_emailext_channel' }], + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/tickets', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { contact_id: 97694755, channel_id: 'trengo_emailext_channel' }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'Stress test3', + properties: { + name: 'Random_Track_call', + value: 5000, + phone: '9830311521', + email: 'utsab@outlook.com', + }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + externalId: [{ type: 'trengoChannelId', id: 'trengo_emailext_channel' }], + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/tickets', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + contact_id: 97694755, + channel_id: 'trengo_emailext_channel', + subject: '{event} Stress test', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'Stress test4', + properties: { + name: 'Random_Track_call', + value: 5000, + phone: '9830311521', + email: 'utsab@outlook.com', + }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + externalId: [{ type: 'trengoChannelId', id: 'trengo_emailext_channel' }], + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + error: 'Stress test4 is not present in Event-Map template keys, aborting event', + statTags: { + destType: 'TRENGO', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'identify', + context: { + traits: { name: 'Thalmor Bretz 2', phone: '9830311521' }, + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://app.trengo.com/api/v2/contacts/90002431001', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { JSON: { name: 'Thalmor Bretz 2' }, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'trengo', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'email', + enableDedup: false, + eventTemplateMap: [ + { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, + { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, + { from: 'Order Completed', to: 'Completed Order' }, + { from: 'Stress Test' }, + { from: 'Stress test2', to: '' }, + { from: 'Stress test3', to: '{event} Stress test' }, + ], + }, + }, + message: { + userId: 'randomUserId', + type: 'track', + event: 'Stress test2', + properties: { name: 'Random_Track_call', value: 5000 }, + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + externalId: [ + { type: 'trengoChannelId', id: 'trengo_emailext_channel' }, + { type: 'trengoContactId', id: 97694755 }, + ], + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/tickets', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { contact_id: 97694755, channel_id: 'trengo_emailext_channel' }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; +module.exports = { + data, +}; diff --git a/test/integrations/destinations/trengo/router/data.js b/test/integrations/destinations/trengo/router/data.js new file mode 100644 index 0000000000..7e195c0685 --- /dev/null +++ b/test/integrations/destinations/trengo/router/data.js @@ -0,0 +1,538 @@ +const data = [ + { + name: 'trengo', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Purchased', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + phone: '9830311521', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { + from: 'Product Purchased', + to: '{{event}} from Rudderstack', + }, + { + from: 'checkedOut', + to: 'Total cart value {{value}} shipped', + }, + { + from: 'Order Completed', + to: 'Completed Order', + }, + { + from: 'Stress Test', + }, + { + from: 'Stress test2', + to: '', + }, + { + from: 'Stress test3', + to: '{event} Stress test', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Trengo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'apiToken', + 'channelId', + 'channelIdentifier', + 'enableDedup', + 'eventTemplateMap', + ], + }, + secretKeys: ['apiToken'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'TRENGO', + displayName: 'Trengo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + destType: 'trengo', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/tickets', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + contact_id: 90002431001, + channel_id: 'trengo_phone_channel', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_phone_channel', + channelIdentifier: 'phone', + enableDedup: true, + eventTemplateMap: [ + { + from: 'Product Purchased', + to: '{{event}} from Rudderstack', + }, + { + from: 'checkedOut', + to: 'Total cart value {{value}} shipped', + }, + { + from: 'Order Completed', + to: 'Completed Order', + }, + { + from: 'Stress Test', + }, + { + from: 'Stress test2', + to: '', + }, + { + from: 'Stress test3', + to: '{event} Stress test', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Trengo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'apiToken', + 'channelId', + 'channelIdentifier', + 'enableDedup', + 'eventTemplateMap', + ], + }, + secretKeys: ['apiToken'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'TRENGO', + displayName: 'Trengo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'trengo', + description: 'Test 1', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + userId: 'randomUserId', + type: 'identify', + context: { + traits: { + name: 'Jimothy Halpert', + email: 'jimbo@dunmiff.com', + }, + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + id: '7e32188a4dab669f', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '0.1.4', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_email_channel', + channelIdentifier: 'email', + enableDedup: true, + eventTemplateMap: [ + { + from: 'Product Purchased', + to: '{{event}} from Rudderstack', + }, + { + from: 'checkedOut', + to: 'Total cart value {{value}} shipped', + }, + { + from: 'Order Completed', + to: 'Completed Order', + }, + { + from: 'Stress Test', + }, + { + from: 'Stress test2', + to: '', + }, + { + from: 'Stress test3', + to: '{event} Stress test', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Trengo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'apiToken', + 'channelId', + 'channelIdentifier', + 'enableDedup', + 'eventTemplateMap', + ], + }, + secretKeys: ['apiToken'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'TRENGO', + displayName: 'Trengo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + destType: 'trengo', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.trengo.com/api/v2/channels/trengo_email_channel/contacts', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer trengo_integration_test_api_token', + }, + params: {}, + body: { + JSON: { + name: 'Jimothy Halpert', + identifier: 'jimbo@dunmiff.com', + channel_id: 'trengo_email_channel', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiToken: 'trengo_integration_test_api_token', + channelId: 'trengo_email_channel', + channelIdentifier: 'email', + enableDedup: true, + eventTemplateMap: [ + { + from: 'Product Purchased', + to: '{{event}} from Rudderstack', + }, + { + from: 'checkedOut', + to: 'Total cart value {{value}} shipped', + }, + { + from: 'Order Completed', + to: 'Completed Order', + }, + { + from: 'Stress Test', + }, + { + from: 'Stress test2', + to: '', + }, + { + from: 'Stress test3', + to: '{event} Stress test', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Trengo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'apiToken', + 'channelId', + 'channelIdentifier', + 'enableDedup', + 'eventTemplateMap', + ], + }, + secretKeys: ['apiToken'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'TRENGO', + displayName: 'Trengo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/user/processor/data.js b/test/integrations/destinations/user/processor/data.js new file mode 100644 index 0000000000..dca747c10a --- /dev/null +++ b/test/integrations/destinations/user/processor/data.js @@ -0,0 +1,255 @@ +const data = [{ + "name": "user", + "description": "No Message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"userId":"test@123","context":{"traits":{"email":"test@rudderstack.com","username":"Samle_putUserName","firstName":"uday"}},"integrations":{"All":true,"user.com":{"lookup":"email"}}},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander","userEvents":[{"rsEventName":"login","userEventName":"product viewed"}],"companyAttributesMapping":[{"from":"category","to":"companycategory"},{"from":"owner","to":"companyowner"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander","userEvents":[{"rsEventName":"login","userEventName":"product viewed"}],"companyAttributesMapping":[{"from":"category","to":"companycategory"},{"from":"owner","to":"companyowner"}]}}, + "error": "Event type is required", "statTags": { + "destType": "USER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "user", + "description": "Unsupported Type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"userId":"test@123","type":"trackUser","context":{"traits":{"email":"test@rudderstack.com","firstName":"test","lastName":"rudderstack","age":15,"gender":"male","status":"user","city":"Kalkata","country":"india","tags":["productuser"],"phone":"9225467887"},"externalId":[{"type":"userKey","id":"masncbjasbdljajdl"}]},"traits":{"googleUrl":"www.google.com"}},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander"}}, + "error": "Event type trackuser is not supported", "statTags": { + "destType": "USER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "user", + "description": "track call without event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"userId":"user@123","type":"track","properties":{"category":"e-commerce","activity":"user logged in"},"traits":{"email":"rudderstack@test.com"},"integrations":{"user.com":{"lookup":"email"}},"timestamp":"2020-02-02T00:23:09.544Z"},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander"}}, + "error": "Parameter event is required", "statTags": { + "destType": "USER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "user", + "description": "group call without name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"507f191e810c19729de860ea","channel":"browser","context":{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36"},"integrations":{"All":true},"messageId":"022bb90c-bbac-11e4-8dfc-aa07a5b093db","receivedAt":"2015-02-23T22:28:55.387Z","sentAt":"2015-02-23T22:28:55.111Z","timestamp":"2015-02-23T22:28:55.111Z","traits":{"email":"business@rudderstack.com","plan":"premium","logins":5,"address":{"street":"6th St","city":"San Francisco","state":"CA","postalCode":"94103","country":"USA"}},"type":"group","userId":"user@123"},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander"}}, + "error": "Parameter name is required", "statTags": { + "destType": "USER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "user", + "description": "identify call with userKey as externalId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"userId":"test@16","type":"identify","context":{"traits":{"email":"test@rudderstack.com","firstName":"test","lastName":"rudderstack","age":15,"gender":"male","status":"user","city":"Kalkata","country":"india","tags":["productuser"],"phone":"9225467887","useroccupation":"software engineer"},"externalId":[{"type":"userKey","id":"lel1c5u1wuk8"}]},"traits":{"googleUrl":"www.google.com"}},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander","userAttributesMapping":[{"from":"useroccupation","to":"occupation"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"FORM":{},"JSON":{"age":15,"country":"india","custom_id":"test@16","email":"test@rudderstack.com","first_name":"test","gender":2,"google_url":"www.google.com","last_name":"rudderstack","occupation":"software engineer","phone_number":"9225467887","status":2,"tags":["productuser"]},"JSON_ARRAY":{},"XML":{}},"endpoint":"https://commander.user.com/api/public/users/27/","files":{},"headers":{"Accept":"*/*;version=2","Authorization":"Token 262fbbda-b85b-48b8-a719-c2fceaf8afaf","Content-Type":"application/json"},"method":"PUT","params":{},"type":"REST","version":"1","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "user", + "description": "identify call with email as lookup field", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"userId":"test@12","type":"identify","context":{"traits":{"email":"test@rudderstack.com","firstName":"test","lastName":"rudderstack","age":15,"gender":"female","status":"visitor","city":"ahmedabad","country":"india","phone":"9225467887","useroccupation":"mechanical engineer"}},"traits":{"googleUrl":"www.google.com"},"integrations":{"All":true,"user.com":{"lookup":"email"}}},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander","userAttributesMapping":[{"from":"useroccupation","to":"occupation"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"age":15,"email":"test@rudderstack.com","gender":3,"status":1,"country":"india","custom_id":"test@12","last_name":"rudderstack","first_name":"test","google_url":"www.google.com","occupation":"mechanical engineer","phone_number":"9225467887"},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"PUT","params":{},"headers":{"Accept":"*/*;version=2","Content-Type":"application/json","Authorization":"Token 262fbbda-b85b-48b8-a719-c2fceaf8afaf"},"version":"1","endpoint":"https://commander.user.com/api/public/users/59/","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "user", + "description": "track call without any lookup field(fallback to userId)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.1-rc.2"},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.1-rc.2"},"locale":"en-GB","os":{"name":"","version":""},"page":{"path":"/tests/html/index4.html","referrer":"","search":"","title":"","url":"http://localhost/tests/html/index4.html"},"screen":{"density":2},"traits":{"age":23,"email":"testmp@rudderstack.com","firstname":"Test Kafka"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"},"event":"login","messageId":"37b75e61-9bd2-4fb8-91ed-e3a064905f3a","originalTimestamp":"2020-04-17T14:42:44.724Z","properties":{"test_prop_1":"test prop","test_prop_2":1232},"timestamp":"2022-09-13T20:12:44.757+05:30","type":"track","userId":"43"},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander","userAttributesMapping":[{"from":"useroccupation","to":"occupation"}],"userEvents":[{"rsEventName":"login","userEventName":"product viewed","eventProperties":[{"from":"count","to":"productcount"}]}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"data":{"test_prop_1":"test prop","test_prop_2":1232},"name":"product viewed","user_id":44,"timestamp":1587134564},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"POST","params":{},"headers":{"Accept":"*/*;version=2","Content-Type":"application/json","Authorization":"Token 262fbbda-b85b-48b8-a719-c2fceaf8afaf"},"version":"1","endpoint":"https://commander.user.com/api/public/events/","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "user", + "description": "page call without any lookup field(fallback to userId)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"category":"page category","channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.1.9"},"campaign":{},"library":{"name":"RudderLabs JavaScript SDK","version":"1.1.9"},"locale":"en-GB","os":{"name":"","version":""},"page":{"path":"/testing","referrer":"","search":"","title":"","url":"https://pagecall.com/testing"},"screen":{"density":2},"traits":{},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"},"integrations":{"All":true},"messageId":"397fdf96-daee-46c8-ac38-5d717cd8cabd","name":"page name","originalTimestamp":"2021-01-04T08:43:05.784Z","properties":{"category":"page category","name":"page name","path":"/testing","referrer":"","search":"","title":"","url":"https://pagecall.com/testing"},"request_ip":"[::1]","rudderId":"2d03081c-8053-4cce-9abf-bb024f747900","timestamp":"2021-01-04T14:13:05.801+05:30","type":"page","userId":"43"},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander","userAttributesMapping":[{"from":"useroccupation","to":"occupation"}],"userEvents":[{"rsEventName":"login","userEventName":"product viewed","eventProperties":[{"from":"count","to":"productcount"}]}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"page_path":"/testing","timestamp":"2021-01-04T08:43:05.784Z","client_user":"rpl0vjwysmc0","page_domain":"https://pagecall.com/testing"},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"POST","params":{},"headers":{"Accept":"*/*;version=2","Content-Type":"application/json","Authorization":"Token 262fbbda-b85b-48b8-a719-c2fceaf8afaf"},"version":"1","endpoint":"https://commander.user.com/api/public/site-views/","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "user", + "description": "User.com group call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"channel":"browser","context":{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36"},"integrations":{"All":true},"userId":"user@123","groupId":"group@795","messageId":"022bb90c-bbac-11e4-8dfc-aa07a5b093db","receivedAt":"2015-02-23T22:28:55.387Z","sentAt":"2015-02-23T22:28:55.111Z","timestamp":"2015-02-23T22:28:55.111Z","traits":{"name":"rudder ventures","email":"business@rudderstack.com","address":{"street":"6th St","city":"San Francisco","state":"CA","postalCode":"94103","country":"USA","owner":"testuser"}},"type":"group"},"destination":{"Config":{"apiKey":"262fbbda-b85b-48b8-a719-c2fceaf8afaf","appSubdomain":"commander","userAttributesMapping":[{"from":"useroccupation","to":"occupation"}],"userEvents":[{"rsEventName":"login","userEventName":"product viewed","eventProperties":[{"from":"count","to":"productcount"}]}],"companyAttributesMapping":[{"from":"category","to":"companycategory"},{"from":"owner","to":"companyowner"}]}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{"user_id":52,"user_custom_id":"user@123"},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"POST","params":{},"headers":{"Accept":"*/*;version=2","Content-Type":"application/json","Authorization":"Token 262fbbda-b85b-48b8-a719-c2fceaf8afaf"},"version":"1","endpoint":"https://commander.user.com/api/public/companies/21/add_member/","userId":""}, + "statusCode": 200}] + } + } + }]; module.exports = { + data + } \ No newline at end of file diff --git a/test/integrations/destinations/user/router/data.js b/test/integrations/destinations/user/router/data.js new file mode 100644 index 0000000000..018bd5c26f --- /dev/null +++ b/test/integrations/destinations/user/router/data.js @@ -0,0 +1,272 @@ +const data = [ + { + "name": "user", + "description": "Succesfull Group call ", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "channel": "browser", + "context": { + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36" + }, + "integrations": { + "All": true + }, + "userId": "user@123", + "groupId": "group@795", + "messageId": "022bb90c-bbac-11e4-8dfc-aa07a5b093db", + "receivedAt": "2015-02-23T22:28:55.387Z", + "sentAt": "2015-02-23T22:28:55.111Z", + "timestamp": "2015-02-23T22:28:55.111Z", + "traits": { + "name": "rudder ventures", + "email": "business@rudderstack.com", + "address": { + "street": "6th St", + "city": "San Francisco", + "state": "CA", + "postalCode": "94103", + "country": "USA", + "owner": "testuser" + } + }, + "type": "group" + }, + "metadata": { + "jobId": 1 + }, + "destination": { + "Config": { + "apiKey": "262fbbda-b85b-48b8-a719-c2fceaf8afaf", + "appSubdomain": "commander", + "userAttributesMapping": [{ "from": "useroccupation", "to": "occupation" }], + "userEvents": [ + { + "rsEventName": "login", + "userEventName": "product viewed", + "eventProperties": [{ "from": "count", "to": "productcount" }] + } + ], + "companyAttributesMapping": [ + { "from": "category", "to": "companycategory" }, + { "from": "owner", "to": "companyowner" } + ] + } + } + }] + , "destType": "user" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "user_id": 52, + "user_custom_id": "user@123" + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Accept": "*/*;version=2", + "Content-Type": "application/json", + "Authorization": "Token 262fbbda-b85b-48b8-a719-c2fceaf8afaf" + }, + "version": "1", + + "userId": "", + "endpoint": "https://commander.user.com/api/public/companies/21/add_member/" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "262fbbda-b85b-48b8-a719-c2fceaf8afaf", + "appSubdomain": "commander", + "userAttributesMapping": [{ "from": "useroccupation", "to": "occupation" }], + "userEvents": [ + { + "rsEventName": "login", + "userEventName": "product viewed", + "eventProperties": [{ "from": "count", "to": "productcount" }] + } + ], + "companyAttributesMapping": [ + { "from": "category", "to": "companycategory" }, + { "from": "owner", "to": "companyowner" } + ] + } + } + }, + ] + } + } + } + }, + { + "name": "user", + "description": "Test 1", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "userId": "test@12", + "type": "identify", + "context": { + "traits": { + "email": "test@rudderstack.com", + "firstName": "test", + "lastName": "rudderstack", + "age": 15, + "gender": "female", + "status": "visitor", + "city": "ahmedabad", + "country": "india", + "phone": "9225467887", + "useroccupation": "mechanical engineer" + } + }, + "traits": { + "googleUrl": "www.google.com" + }, + "integrations": { + "All": true, + "user": { + "lookup": "email" + } + } + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "apiKey": "262fbbda-b85b-48b8-a719-c2fceaf8afaf", + "appSubdomain": "commander", + "userAttributesMapping": [{ "from": "useroccupation", "to": "occupation" }], + "userEvents": [ + { + "rsEventName": "login", + "userEventName": "product viewed", + "eventProperties": [{ "from": "count", "to": "productcount" }] + } + ], + "companyAttributesMapping": [ + { "from": "category", "to": "companycategory" }, + { "from": "owner", "to": "companyowner" } + ] + } + } + }] + , "destType": "user" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "age": 15, + "email": "test@rudderstack.com", + "gender": 3, + "status": 1, + "country": "india", + "custom_id": "test@12", + "last_name": "rudderstack", + "first_name": "test", + "google_url": "www.google.com", + "occupation": "mechanical engineer", + "phone_number": "9225467887" + }, + "JSON_ARRAY": {} + }, + "type": "REST", + + "userId": "", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accept": "*/*;version=2", + "Content-Type": "application/json", + "Authorization": "Token 262fbbda-b85b-48b8-a719-c2fceaf8afaf" + }, + "version": "1", + "endpoint": "https://commander.user.com/api/public/users/59/" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "262fbbda-b85b-48b8-a719-c2fceaf8afaf", + "appSubdomain": "commander", + "userAttributesMapping": [{ "from": "useroccupation", "to": "occupation" }], + "userEvents": [ + { + "rsEventName": "login", + "userEventName": "product viewed", + "eventProperties": [{ "from": "count", "to": "productcount" }] + } + ], + "companyAttributesMapping": [ + { "from": "category", "to": "companycategory" }, + { "from": "owner", "to": "companyowner" } + ] + } + } + } + ] + } + } + } + } +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/webengage/processor/data.js b/test/integrations/destinations/webengage/processor/data.js new file mode 100644 index 0000000000..5fb9fa7681 --- /dev/null +++ b/test/integrations/destinations/webengage/processor/data.js @@ -0,0 +1,2189 @@ +const data = [ + { + name: 'webengage', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + originalTimestamp: '2022-05-13T12:51:01.470Z', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + error: 'Missing required value from "event"', + statTags: { + destType: 'WEBENGAGE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + event: 'Order Completed', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder123', + eventName: 'Order Completed', + eventData: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + event: 'Order Completed', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder123', + eventName: 'Order Completed', + eventData: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + event: 'Order Completed', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder123', + eventName: 'Order Completed', + eventData: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + event: 'Order Completed', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder123', + eventName: 'Order Completed', + eventData: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + eventTime: '2021-09-01T15:46:51+0000', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + event: 'Order Completed', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + userId: 'rudder123', + eventData: { + tax: 1, + name: 'home', + total: 20, + coupon: 'ImagePro', + revenue: 15, + category: 'Games', + currency: 'USD', + discount: 1.5, + order_id: '1234', + products: { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + is_restore: true, + introductory_price: '350', + presented_offering_identifier: '123erd', + }, + shipping: 22, + product_id: '123', + affiliation: 'Apple Store', + checkout_id: '12345', + fetch_token: '123asd23', + }, + eventName: 'Order Completed', + eventTime: '2021-09-01T15:46:51+0000', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + event: 'Order Completed', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + originalTimestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + userId: 'rudder123', + eventData: { + tax: 1, + name: 'home', + total: 20, + coupon: 'ImagePro', + revenue: 15, + category: 'Games', + currency: 'USD', + discount: 1.5, + order_id: '1234', + products: { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + is_restore: true, + introductory_price: '350', + presented_offering_identifier: '123erd', + }, + shipping: 22, + product_id: '123', + affiliation: 'Apple Store', + checkout_id: '12345', + fetch_token: '123asd23', + }, + eventName: 'Order Completed', + eventTime: '2021-09-01T15:46:51+0000', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'screen', + userId: 'rudder123', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + userId: 'rudder123', + eventData: { + tax: 1, + name: 'home', + total: 20, + coupon: 'ImagePro', + revenue: 15, + category: 'Games', + currency: 'USD', + discount: 1.5, + order_id: '1234', + products: { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + is_restore: true, + introductory_price: '350', + presented_offering_identifier: '123erd', + }, + shipping: 22, + product_id: '123', + affiliation: 'Apple Store', + checkout_id: '12345', + fetch_token: '123asd23', + }, + eventName: 'Viewed Games home screen', + eventTime: '2021-09-01T15:46:51+0000', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'page', + userId: 'rudder123', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder123', + eventName: 'Viewed Games home page', + eventData: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + eventTime: '2021-09-01T15:46:51+0000', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'page', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + error: 'Either one of userId or anonymousId is mandatory', + statTags: { + destType: 'WEBENGAGE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'master', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + error: 'Event type master is not supported', + statTags: { + destType: 'WEBENGAGE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + error: 'Event type is required', + statTags: { + destType: 'WEBENGAGE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'standard', + }, + }, + message: { + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'standard', + }, + }, + error: 'Event type is required', + statTags: { + destType: 'WEBENGAGE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'standard', + }, + }, + message: { + type: 'page', + userId: 'rudder1232', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + timestamp: '2021-09-01T15:46:51.000Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder1232', + eventName: 'Viewed Games home page', + eventTime: '2021-09-01T15:46:51+0000', + eventData: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + endpoint: 'https://api.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'standard', + }, + }, + message: { + type: 'page', + userId: 'rudder1232', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder1232', + eventName: 'Viewed Games home page', + eventData: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + endpoint: 'https://api.webengage.com/v1/accounts/3bjsjdbh7/events', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + userId: 'rudder1236', + channel: 'web', + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + advertisingId: '1234sadf23', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Mumbai', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', + }, + type: 'identify', + traits: { + birthday: '2022-05-13T12:51:01.470Z', + email: 'chandan@companyname.com', + name: 'James Doe', + phone: '92374162212', + firstname: 'James', + lastname: 'Doe', + age: '12', + gender: 'F', + country: 'INDIA', + state: 'WB', + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + email: 'chandan@companyname.com', + phone: '92374162212', + userId: 'rudder1236', + lastName: 'Doe', + firstName: 'James', + gender: 'female', + birthDate: '2022-05-13T12:51:01+0000', + country: 'INDIA', + attributes: { age: '12', state: 'WB' }, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + userId: 'rudder1236', + channel: 'web', + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + advertisingId: '1234sadf23', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + traits: { + email: 'chandan@companyname.com', + name: 'James Doe', + phone: '92374162212', + firstname: 'James', + lastname: 'Doe', + age: '12', + country: 'INDIA', + gender: 'MALE', + state: 'WB', + }, + timezone: 'Asia/Mumbai', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', + }, + type: 'identify', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder1236', + firstName: 'James', + lastName: 'Doe', + email: 'chandan@companyname.com', + phone: '92374162212', + country: 'INDIA', + gender: 'male', + attributes: { age: '12', state: 'WB' }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + userId: 'rudder1235', + channel: 'web', + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + advertisingId: '1234sadf23', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Mumbai', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', + }, + type: 'identify', + traits: { + email: 'chandan@companyname.com', + name: 'James Doe', + phone: '92374162212', + firstname: 'James', + lastname: 'Doe', + age: '12', + country: 'INDIA', + state: 'WB', + company: 'Alphabet Inc.', + city: 'Amritsar', + region: 'AB Colony', + locality: 'IST', + postalCode: '713390', + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + }, + params: {}, + body: { + JSON: { + userId: 'rudder1235', + firstName: 'James', + lastName: 'Doe', + email: 'chandan@companyname.com', + phone: '92374162212', + postalCode: '713390', + country: 'INDIA', + city: 'Amritsar', + locality: 'IST', + region: 'AB Colony', + attributes: { age: '12', state: 'WB' }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + endpoint: 'https://api.in.webengage.com/v1/accounts/3bjsjdbh7/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + event: 'Order Completed', + originalTimestamp: '202205-13T12:51:01.470Z', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + error: 'Timestamp must be ISO format (YYYY-MM-DD)', + statTags: { + destType: 'WEBENGAGE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + type: 'track', + userId: 'rudder123', + originalTimestamp: '2022-05-13T12:51:01.470Z', + properties: { + name: 'home', + category: 'Games', + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + fetch_token: '123asd23', + product_id: '123', + products: { + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + introductory_price: '350', + is_restore: true, + presented_offering_identifier: '123erd', + }, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + error: 'Missing required value from "event"', + statTags: { + destType: 'WEBENGAGE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'webengage', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + message: { + userId: 'rudder1236', + channel: 'web', + context: { + ip: '14.5.67.21', + app: { + build: '1', + name: 'RudderAndroidClient', + namespace: 'com.rudderstack.demo.android', + version: '1.0', + }, + device: { + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + advertisingId: '1234sadf23', + }, + library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + locale: 'en-US', + network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + }, + os: { name: 'Android', version: '9' }, + screen: { density: 420, height: 1794, width: 1080 }, + timezone: 'Asia/Mumbai', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', + }, + type: 'identify', + traits: { + birthday: '202205-13T12:51:01.470Z', + email: 'chandan@companyname.com', + name: 'James Doe', + phone: '92374162212', + firstname: 'James', + lastname: 'Doe', + age: '12', + gender: 'F', + country: 'INDIA', + state: 'WB', + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiKey: 'ab7eb717-cdd8-tr63-a7f5-93339d7beelkd', + licenseCode: '3bjsjdbh7', + dataCenter: 'ind', + }, + }, + error: 'birthday must be in this (YYYY-MM-DD) format', + statTags: { + destType: 'WEBENGAGE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; +module.exports = { + data, +}; diff --git a/test/integrations/destinations/webhook/processor/data.js b/test/integrations/destinations/webhook/processor/data.js new file mode 100644 index 0000000000..180ccd73b5 --- /dev/null +++ b/test/integrations/destinations/webhook/processor/data.js @@ -0,0 +1,2188 @@ +const data = [ + { + name: 'webhook', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { from: '', to: '' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + timestamp: '2019-09-01T15:46:51.693229+05:30', + user_properties: { + total_payments: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + level: 6, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + coin_balance: 9466052, + player_total_shields: 0, + isLowEndDevice: false, + game_fps: 30, + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + graphicsQuality: 'HD', + current_module_name: 'CasinoGameModule', + player_total_battles: 0, + lifetime_gem_balance: 0, + gem_balance: 0, + fb_profile: '0', + start_date: '2019-08-01', + versionSessionCount: 2, + game_name: 'FireEagleSlots', + }, + integrations: { All: true }, + event: 'spin_result', + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + model: 'Redmi 6', + manufacturer: 'Xiaomi', + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + name: 'xiaomi', + }, + traits: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + address: { city: 'Dhaka', country: 'Bangladesh' }, + }, + os: { version: '8.1.0', name: 'android' }, + network: { carrier: 'Banglalink' }, + }, + type: 'track', + properties: { + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + jackpot_win_type: 'Silver', + coin_balance: 9466052, + bet_level: 1, + ishighroller: 'False', + tournament_id: 'T1561970819', + battle_id: 'N/A', + bet_amount: 9, + fb_profile: '0', + player_total_shields: 0, + is_turbo: 'False', + player_total_battles: 0, + bet_multiplier: 1, + start_date: '2019-08-01', + versionSessionCount: 2, + graphicsQuality: 'HD', + is_auto_spin: 'False', + days_in_game: 0, + additional_bet_index: 0, + isLowEndDevice: 'False', + game_fps: 30, + extra_param: 'N/A', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + current_module_name: 'CasinoGameModule', + game_id: 'fireEagleBase', + featureGameType: 'N/A', + gem_balance: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + total_payments: 0, + level: 6, + win_amount: 0, + no_of_spin: 1, + game_name: 'FireEagleSlots', + jackpot_win_amount: 90, + lifetime_gem_balance: 0, + isf: 'False', + }, + }, + FORM: {}, + }, + files: {}, + endpoint: 'http://6b0e6a60.ngrok.io', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { 'content-type': 'application/json', test2: 'value2' }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { Config: { webhookUrl: 'https://6b0e6a60.ngrok.io/n' } }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + timestamp: '2019-09-01T15:46:51.693229+05:30', + user_properties: { + total_payments: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + level: 6, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + coin_balance: 9466052, + player_total_shields: 0, + isLowEndDevice: false, + game_fps: 30, + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + graphicsQuality: 'HD', + current_module_name: 'CasinoGameModule', + player_total_battles: 0, + lifetime_gem_balance: 0, + gem_balance: 0, + fb_profile: '0', + start_date: '2019-08-01', + versionSessionCount: 2, + game_name: 'FireEagleSlots', + }, + integrations: { All: true }, + event: 'spin_result', + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + model: 'Redmi 6', + manufacturer: 'Xiaomi', + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + name: 'xiaomi', + }, + traits: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + address: { city: 'Dhaka', country: 'Bangladesh' }, + }, + os: { version: '8.1.0', name: 'android' }, + network: { carrier: 'Banglalink' }, + }, + type: 'track', + properties: { + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + jackpot_win_type: 'Silver', + coin_balance: 9466052, + bet_level: 1, + ishighroller: 'False', + tournament_id: 'T1561970819', + battle_id: 'N/A', + bet_amount: 9, + fb_profile: '0', + player_total_shields: 0, + is_turbo: 'False', + player_total_battles: 0, + bet_multiplier: 1, + start_date: '2019-08-01', + versionSessionCount: 2, + graphicsQuality: 'HD', + is_auto_spin: 'False', + days_in_game: 0, + additional_bet_index: 0, + isLowEndDevice: 'False', + game_fps: 30, + extra_param: 'N/A', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + current_module_name: 'CasinoGameModule', + game_id: 'fireEagleBase', + featureGameType: 'N/A', + gem_balance: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + total_payments: 0, + level: 6, + win_amount: 0, + no_of_spin: 1, + game_name: 'FireEagleSlots', + jackpot_win_amount: 90, + lifetime_gem_balance: 0, + isf: 'False', + }, + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://6b0e6a60.ngrok.io/n', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { 'content-type': 'application/json' }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { Config: { webhookUrl: 'https://6b0e6a60.' } }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + timestamp: '2019-09-01T15:46:51.693229+05:30', + user_properties: { + total_payments: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + level: 6, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + coin_balance: 9466052, + player_total_shields: 0, + isLowEndDevice: false, + game_fps: 30, + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + graphicsQuality: 'HD', + current_module_name: 'CasinoGameModule', + player_total_battles: 0, + lifetime_gem_balance: 0, + gem_balance: 0, + fb_profile: '0', + start_date: '2019-08-01', + versionSessionCount: 2, + game_name: 'FireEagleSlots', + }, + integrations: { All: true }, + event: 'spin_result', + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + model: 'Redmi 6', + manufacturer: 'Xiaomi', + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + name: 'xiaomi', + }, + traits: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + address: { city: 'Dhaka', country: 'Bangladesh' }, + }, + os: { version: '8.1.0', name: 'android' }, + network: { carrier: 'Banglalink' }, + }, + type: 'track', + properties: { + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + jackpot_win_type: 'Silver', + coin_balance: 9466052, + bet_level: 1, + ishighroller: 'False', + tournament_id: 'T1561970819', + battle_id: 'N/A', + bet_amount: 9, + fb_profile: '0', + player_total_shields: 0, + is_turbo: 'False', + player_total_battles: 0, + bet_multiplier: 1, + start_date: '2019-08-01', + versionSessionCount: 2, + graphicsQuality: 'HD', + is_auto_spin: 'False', + days_in_game: 0, + additional_bet_index: 0, + isLowEndDevice: 'False', + game_fps: 30, + extra_param: 'N/A', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + current_module_name: 'CasinoGameModule', + game_id: 'fireEagleBase', + featureGameType: 'N/A', + gem_balance: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + total_payments: 0, + level: 6, + win_amount: 0, + no_of_spin: 1, + game_name: 'FireEagleSlots', + jackpot_win_amount: 90, + lifetime_gem_balance: 0, + isf: 'False', + }, + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://6b0e6a60.', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { 'content-type': 'application/json' }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { k1: 'v1', k2: { k3: 'c3', k4: { k5: 'c5' } } }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + webhookUrl: 'https://6b0e6a60.', + webhookMethod: 'GET', + headers: [{ from: 'X-customHeader', to: 'customHeaderVal' }], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: 'https://6b0e6a60.', + headers: { 'x-customheader': 'customHeaderVal' }, + params: { k1: 'v1', 'k2.k3': 'c3', 'k2.k4.k5': 'c5' }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { k1: 'v1', k2: { k3: 'c3', k4: { k5: 'c5' } } }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + destination: { Config: { webhookUrl: 'https://6b0e6a60.', webhookMethod: 'GET' } }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: 'https://6b0e6a60.', + headers: {}, + params: { k1: 'v1', 'k2.k3': 'c3', 'k2.k4.k5': 'c5' }, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + request_ip: '127.0.0.1', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + header: [ + { from: 'test1', to: 'value1' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { 'content-type': 'application/json' }, + params: {}, + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + ip: '127.0.0.1', + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + request_ip: '127.0.0.1', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + request_ip: '127.0.0.1', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { from: 'Content-Type', to: 'application/xml' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { 'content-type': 'application/xml', test2: 'value2' }, + params: {}, + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + ip: '127.0.0.1', + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + request_ip: '127.0.0.1', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { from: 'Content-Type', to: 'application/xml' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { 'content-type': 'application/xml', test2: 'value2' }, + params: {}, + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + header: { + dynamic_header_key_string: 'dynamic_header_value_string', + dynamic_header_key_num: 10, + dynamic_header_key_object: { k1: 'v1' }, + }, + appendPath: '/product/search?string=value', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { from: '', to: '' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + FORM: {}, + }, + files: {}, + endpoint: 'http://6b0e6a60.ngrok.io/product/search?string=value', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { + 'content-type': 'application/json', + test2: 'value2', + dynamic_header_key_string: 'dynamic_header_value_string', + }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + fullPath: 'https://www.google.com', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { from: '', to: '' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://www.google.com', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { 'content-type': 'application/json', test2: 'value2' }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + fullPath: 'https://www.google.com/', + appendPath: '?searchTerms=cats', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { from: '', to: '' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://www.google.com/?searchTerms=cats', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { 'content-type': 'application/json', test2: 'value2' }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + fullPath: 'https://www.google.com/', + appendPath: '?searchTerms=cats', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + webhookMethod: 'PUT', + headers: [ + { from: '', to: '' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://www.google.com/?searchTerms=cats', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { 'content-type': 'application/json', test2: 'value2' }, + version: '1', + params: {}, + type: 'REST', + method: 'PUT', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + fullPath: 'https://www.google.com/', + appendPath: '?searchTerms=cats', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + webhookMethod: 'DELETE', + headers: [ + { from: '', to: '' }, + { from: 'test2', to: 'value2' }, + ], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { XML: {}, JSON_ARRAY: {}, JSON: {}, FORM: {} }, + files: {}, + endpoint: 'https://www.google.com/?searchTerms=cats', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { test2: 'value2' }, + version: '1', + params: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + type: 'REST', + method: 'DELETE', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + webhookMethod: 'POST', + headers: [{ from: 'test2', to: 'value2' }], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'http://6b0e6a60.ngrok.io', + files: {}, + headers: { 'content-type': 'application/json', test2: 'value2' }, + method: 'POST', + params: {}, + type: 'REST', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + webhookMethod: 'PATCH', + headers: [{ from: 'test2', to: 'value2' }], + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { carrier: 'Banglalink' }, + os: { name: 'android', version: '8.1.0' }, + traits: { + address: { city: 'Dhaka', country: 'Bangladesh' }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { All: true }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'http://6b0e6a60.ngrok.io', + files: {}, + headers: { 'content-type': 'application/json', test2: 'value2' }, + method: 'PATCH', + params: {}, + type: 'REST', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; +module.exports = { + data, +}; diff --git a/test/integrations/destinations/webhook/router/data.js b/test/integrations/destinations/webhook/router/data.js new file mode 100644 index 0000000000..4294f4f8d7 --- /dev/null +++ b/test/integrations/destinations/webhook/router/data.js @@ -0,0 +1,496 @@ +const data = [ + { + name: 'webhook', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + }, + }, + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + webhookUrl: 'https://6b0e6a60.ngrok.io/n', + }, + }, + }, + ], + destType: 'webhook', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + timestamp: '2019-09-01T15:46:51.693229+05:30', + user_properties: { + total_payments: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + level: 6, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + coin_balance: 9466052, + player_total_shields: 0, + isLowEndDevice: false, + game_fps: 30, + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + graphicsQuality: 'HD', + current_module_name: 'CasinoGameModule', + player_total_battles: 0, + lifetime_gem_balance: 0, + gem_balance: 0, + fb_profile: '0', + start_date: '2019-08-01', + versionSessionCount: 2, + game_name: 'FireEagleSlots', + }, + integrations: { + All: true, + }, + event: 'spin_result', + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + model: 'Redmi 6', + manufacturer: 'Xiaomi', + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + name: 'xiaomi', + }, + traits: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + }, + os: { + version: '8.1.0', + name: 'android', + }, + network: { + carrier: 'Banglalink', + }, + }, + type: 'track', + properties: { + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + jackpot_win_type: 'Silver', + coin_balance: 9466052, + bet_level: 1, + ishighroller: 'False', + tournament_id: 'T1561970819', + battle_id: 'N/A', + bet_amount: 9, + fb_profile: '0', + player_total_shields: 0, + is_turbo: 'False', + player_total_battles: 0, + bet_multiplier: 1, + start_date: '2019-08-01', + versionSessionCount: 2, + graphicsQuality: 'HD', + is_auto_spin: 'False', + days_in_game: 0, + additional_bet_index: 0, + isLowEndDevice: 'False', + game_fps: 30, + extra_param: 'N/A', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + current_module_name: 'CasinoGameModule', + game_id: 'fireEagleBase', + featureGameType: 'N/A', + gem_balance: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + total_payments: 0, + level: 6, + win_amount: 0, + no_of_spin: 1, + game_name: 'FireEagleSlots', + jackpot_win_amount: 90, + lifetime_gem_balance: 0, + isf: 'False', + }, + }, + FORM: {}, + }, + files: {}, + endpoint: 'http://6b0e6a60.ngrok.io', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + timestamp: '2019-09-01T15:46:51.693229+05:30', + user_properties: { + total_payments: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + level: 6, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + coin_balance: 9466052, + player_total_shields: 0, + isLowEndDevice: false, + game_fps: 30, + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + graphicsQuality: 'HD', + current_module_name: 'CasinoGameModule', + player_total_battles: 0, + lifetime_gem_balance: 0, + gem_balance: 0, + fb_profile: '0', + start_date: '2019-08-01', + versionSessionCount: 2, + game_name: 'FireEagleSlots', + }, + integrations: { + All: true, + }, + event: 'spin_result', + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + model: 'Redmi 6', + manufacturer: 'Xiaomi', + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + name: 'xiaomi', + }, + traits: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + }, + os: { + version: '8.1.0', + name: 'android', + }, + network: { + carrier: 'Banglalink', + }, + }, + type: 'track', + properties: { + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + jackpot_win_type: 'Silver', + coin_balance: 9466052, + bet_level: 1, + ishighroller: 'False', + tournament_id: 'T1561970819', + battle_id: 'N/A', + bet_amount: 9, + fb_profile: '0', + player_total_shields: 0, + is_turbo: 'False', + player_total_battles: 0, + bet_multiplier: 1, + start_date: '2019-08-01', + versionSessionCount: 2, + graphicsQuality: 'HD', + is_auto_spin: 'False', + days_in_game: 0, + additional_bet_index: 0, + isLowEndDevice: 'False', + game_fps: 30, + extra_param: 'N/A', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + current_module_name: 'CasinoGameModule', + game_id: 'fireEagleBase', + featureGameType: 'N/A', + gem_balance: 0, + internetReachability: 'ReachableViaLocalAreaNetwork', + total_payments: 0, + level: 6, + win_amount: 0, + no_of_spin: 1, + game_name: 'FireEagleSlots', + jackpot_win_amount: 90, + lifetime_gem_balance: 0, + isf: 'False', + }, + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://6b0e6a60.ngrok.io/n', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + headers: { + 'content-type': 'application/json', + }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + webhookUrl: 'https://6b0e6a60.ngrok.io/n', + }, + }, + }, + ], + }, + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/woopra/processor/data.js b/test/integrations/destinations/woopra/processor/data.js new file mode 100644 index 0000000000..69b5620b60 --- /dev/null +++ b/test/integrations/destinations/woopra/processor/data.js @@ -0,0 +1,141 @@ +const data = [{ + "name": "woopra", + "description": "Create a new Visitor with projectName inside Integration Object and no externalId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"21e13f4bc7ceddad","context":{"app":{"build":"4","name":"RuddCDN"},"device":{"id":"3f034872-5e28-45a1-9eda-ce22a3e36d1a","name":"generic_x86_arm"},"os":{"name":"Android","version":"9"},"timezone":"Asia/Kolkata","traits":{"anonymousId":"21e13f4bc7ceddad"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36"},"event":"First Investment","integrations":{"woopra":{"projectName":"abc.com"}},"messageId":"1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb","originalTimestamp":"2020-09-28T19:53:31.900Z","traits":{"name":"Anant jain","email":"anant@r.com","hasPurchased":"yes","address":"H.No. abc Street PQRS ","state":"Delhi","title":"Mr"},"receivedAt":"2020-09-29T14:50:43.005+05:30","sentAt":"2020-09-28T19:53:44.998Z","timestamp":"2020-09-29T14:50:29.907+05:30","type":"identify"},"destination":{"Config":{"projectName":"int.com"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"GET","params":{"os":"Android","app":"RuddCDN","browser":"Chrome86.0.4240.111","cookie":"21e13f4bc7ceddad","Project":"abc.com","cv_email":"anant@r.com","cv_name":"Anant jain","cv_state":"Delhi","cv_title":"Mr","cv_hasPurchased":"yes","timestamp":"1601322811900","cv_address":"H.No. abc Street PQRS "},"headers":{},"version":"1","endpoint":"https://www.woopra.com/track/identify","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "woopra", + "description": "Send track event with app name but no app build and woopraid inside externalid", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"21e13f4bc7ceddad","channel":"mobile","context":{"externalId":[{"type":"woopraId","id":"abcd123451"}],"app":{"build":"4"},"device":{"id":"3f034872-5e28-45a1-9eda-ce22a3e36d1a","name":"generic_x86_arm"},"library":{"name":"com.rudderstack.android.sdk.core","version":"1.0.6"},"os":{"name":"Android","version":"9"},"timezone":"Asia/Kolkata","traits":{"anonymousId":"21e13f4bc7ceddad","customProp":"customValue"},"userAgent":"Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)"},"event":"First Investment","messageId":"1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb","originalTimestamp":"2020-09-28T19:53:31.900Z","properties":{"currency":"EUR","revenue":20.37566},"receivedAt":"2020-09-29T14:50:43.005+05:30","sentAt":"2020-09-28T19:53:44.998Z","timestamp":"2020-09-29T14:50:29.907+05:30","type":"track"},"destination":{"Config":{"projectName":"int.com"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"GET","params":{"os":"Android","event":"First Investment","cookie":"abcd123451","Project":"int.com","timestamp":"1601322811900","ce_currency":"EUR","ce_revenue":20.37566,"cv_customProp":"customValue","cv_anonymousId":"21e13f4bc7ceddad"},"headers":{},"version":"1","endpoint":"https://www.woopra.com/track/ce","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "woopra", + "description": "Send Page event with projectName from Config and no cv_id sources", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"21e13f4bc7ceddad","channel":"mobile","context":{"app":{"build":"4","name":"RuddCDN"},"page":{"referrer":"google.com"},"device":{"id":"3f034872-5e28-45a1-9eda-ce22a3e36d1a","name":"generic_x86_arm"},"library":{"name":"com.rudderstack.android.sdk.core","version":"1.0.6"},"os":{"name":"Android","version":"9"},"timezone":"Asia/Kolkata","traits":{"customProp":"customValue"},"userAgent":"Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)"},"name":"Home","messageId":"1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb","originalTimestamp":"2020-09-28T19:53:31.900Z","properties":{"title":"Home | RudderStack","url":"http://www.rudderstack.com"},"receivedAt":"2020-09-29T14:50:43.005+05:30","sentAt":"2020-09-28T19:53:44.998Z","timestamp":"2020-09-29T14:50:29.907+05:30","type":"page"},"destination":{"Config":{"projectName":"abc.com"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + "output": + {"body":{"XML":{},"FORM":{},"JSON":{},"JSON_ARRAY":{}},"type":"REST","files":{},"method":"GET","params":{"os":"Android","app":"RuddCDN","event":"Viewed Home Page","ce_url":"http://www.rudderstack.com","timestamp":"1601322811900","Project":"abc.com","ce_title":"Home | RudderStack","cv_customProp":"customValue","cookie":"21e13f4bc7ceddad","ce_referrer":"google.com"},"headers":{},"version":"1","endpoint":"https://www.woopra.com/track/ce","userId":""}, + "statusCode": 200}] + } + } + },{ + "name": "woopra", + "description": "Unsupported Message Type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"21e13f4bc7ceddad","channel":"mobile","event":"First Investment","integrations":{"woopra":"int.com"},"type":"group"},"destination":{"Config":{"projectName":"int.com"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"projectName":"int.com"}}, + "error": "Message type group is not supported", "statTags": { + "destType": "WOOPRA", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + },{ + "name": "woopra", + "description": "Event Name Not Provided ", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + {"message":{"anonymousId":"21e13f4bc7ceddad","channel":"mobile","integrations":{"woopra":"int.com"},"type":"track"},"destination":{"Config":{"projectName":"int.com"}}}, + ], + "method": "POST", + }, + "pathSuffix": "", + }, + "output":{ + "response": { + "status": 200, + "body": [{ + + "destination": {"Config":{"projectName":"int.com"}}, + "error": "Event Name can not be empty", "statTags": { + "destType": "WOOPRA", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + }] + } + } + }]; module.exports = { + data + } \ No newline at end of file diff --git a/test/integrations/destinations/woopra/router/data.js b/test/integrations/destinations/woopra/router/data.js new file mode 100644 index 0000000000..2649327de8 --- /dev/null +++ b/test/integrations/destinations/woopra/router/data.js @@ -0,0 +1,309 @@ +const data = [ + { + "name": "woopra", + "description": "Succesfull Idenitfy Call", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "anonymousId": "21e13f4bc7ceddad", + "context": { + "app": { + "build": "4", + "name": "RuddCDN" + }, + "device": { + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "name": "generic_x86_arm" + }, + "os": { + "name": "Android", + "version": "9" + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "21e13f4bc7ceddad" + }, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" + }, + "integrations": { + "woopra": { + "projectName": "abc.com" + } + }, + "messageId": "1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb", + "originalTimestamp": "2020-09-28T19:53:31.900Z", + "traits": { + "Name": "Anant jain", + "email": "anant@r.com", + "hasPurchased": "yes", + "address": "H.No. abc Street PQRS ", + "state": "Delhi", + "title": "Mr" + }, + "receivedAt": "2020-09-29T14:50:43.005+05:30", + "sentAt": "2020-09-28T19:53:44.998Z", + "timestamp": "2020-09-29T14:50:29.907+05:30", + "type": "identify" + }, + "destination": { + "Config": { + "projectName": "int.com" + } + }, + "metadata": { + "jobId": 1 + } + }] + , "destType": "woopra" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": {}, + "JSON_ARRAY": {} + }, + "userId": "", + "type": "REST", + "files": {}, + "method": "GET", + "params": { + "os": "Android", + "app": "RuddCDN", + "cookie": "21e13f4bc7ceddad", + "Project": "abc.com", + "cv_email": "anant@r.com", + "cv_state": "Delhi", + "cv_title": "Mr", + "cv_hasPurchased": "yes", + "cv_address": "H.No. abc Street PQRS ", + "timestamp": "1601322811900", + "cv_Name": "Anant jain" + }, + "headers": {}, + "version": "1", + "endpoint": "https://www.woopra.com/track/identify" + }, + "destination": { + "Config": { + "projectName": "int.com" + } + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200 + } + ] + } + } + } + }, + { + "name": "woopra", + "description": "Successful Track Call ", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "anonymousId": "21e13f4bc7ceddad", + "channel": "mobile", + "context": { + "app": { + "build": "4", + "name": "RuddCDN" + }, + "device": { + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "name": "generic_x86_arm" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.6" + }, + "os": { + "name": "Android", + "version": "9" + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" + }, + "event": "First Investment", + "integrations": { + "woopra": "int.com" + }, + "messageId": "1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb", + "originalTimestamp": "2020-09-28T19:53:31.900Z", + "properties": { + "currency": "EUR", + "revenue": 20.37566 + }, + "receivedAt": "2020-09-29T14:50:43.005+05:30", + "sentAt": "2020-09-28T19:53:44.998Z", + "timestamp": "2020-09-29T14:50:29.907+05:30", + "type": "track" + }, + "destination": { + "Config": { + "projectName": "int.com" + } + }, + "metadata": { + "jobId": 2 + } + }] + , "destType": "woopra" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": {}, + "JSON_ARRAY": {} + }, + "type": "REST", + "userId": "", + "files": {}, + "method": "GET", + "params": { + "os": "Android", + "app": "RuddCDN", + "event": "First Investment", + "Project": "int.com", + "timestamp": "1601322811900", + "ce_revenue": 20.37566, + "ce_currency": "EUR", + "cookie": "21e13f4bc7ceddad" + }, + "headers": {}, + "version": "1", + "endpoint": "https://www.woopra.com/track/ce" + }, + "destination": { + "Config": { + "projectName": "int.com" + } + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200 + }, + ] + } + } + } + }, + { + "name": "woopra", + "description": "Unsupported Message Type", + "feature": "router", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "input": + [ + { + "message": { + "anonymousId": "21e13f4bc7ceddad", + "channel": "mobile", + "event": "First Investment", + "integrations": { + "woopra": "int.com" + }, + "type": "group" + }, + "destination": { + "Config": { + "projectName": "int.com" + } + }, + "metadata": { + "jobId": 3 + } + }] + , "destType": "woopra" + }, + "method": "POST" + }, + "pathSuffix": "" + }, + "output": { + "response": { + "status": 200, + "body": { + "output": [ + { + "destination": { + "Config": { + "projectName": "int.com" + } + }, + "metadata": [ + { + "jobId": 3 + } + ], + "statTags": { + "errorCategory": "dataValidation", + "implementation": "native", + "feature": "router", + "destType": "WOOPRA", + "module": "destination", + "errorType": "instrumentation" + }, + "batched": false, + "statusCode": 400, + "error": "Message type group is not supported" + } + ] + } + } + } + }, +]; + +module.exports = { + data +}; \ No newline at end of file diff --git a/test/integrations/destinations/yahoo_dsp/processor/data.js b/test/integrations/destinations/yahoo_dsp/processor/data.js new file mode 100644 index 0000000000..3ff102da6d --- /dev/null +++ b/test/integrations/destinations/yahoo_dsp/processor/data.js @@ -0,0 +1,1228 @@ +const data = [ + { + name: 'yahoo_dsp', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + includeChains: 1573, + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + enablePartialFailure: true, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://dspapi.admanagerplus.yahoo.com/traffic/audiences/email_address/34893', + headers: { + 'X-Auth-Method': 'OAuth2', + 'X-Auth-Token': 'fb8c05c9-3a32-409a-9993-3f53d307fe75', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + seedList: [ + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + ], + accountId: '12444', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + postalCode: '1245', + includeChains: 1573, + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + error: 'Required property for email type audience is not available in an object', + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + includeChains: 1573, + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'DEVICE_ID', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://dspapi.admanagerplus.yahoo.com/traffic/audiences/device_id/34893', + headers: { + 'X-Auth-Token': 'fb8c05c9-3a32-409a-9993-3f53d307fe75', + 'X-Auth-Method': 'OAuth2', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + accountId: '12444', + seedList: [ + 'd3495732378523014e58b1e040f919a3616946f765860b8dd388cf575c26735e', + 'd3495732378523014e58b1e040f919a3616946f765860b8dd388cf575c26735e', + 'd3495732378523014e58b1e040f919a3616946f765860b8dd388cf575c26735e', + ], + seedListType: 'IDFA', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + includeChains: 1573, + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'IP_ADDRESS', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://dspapi.admanagerplus.yahoo.com/traffic/audiences/customsegments/34893', + headers: { + 'X-Auth-Token': 'fb8c05c9-3a32-409a-9993-3f53d307fe75', + 'X-Auth-Method': 'OAuth2', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + accountId: '12444', + seedList: [ + '86a50ed7952688691a2dcbb5dda3a1227097e8fc3878ca7368135c7dc7b5a083', + '86a50ed7952688691a2dcbb5dda3a1227097e8fc3878ca7368135c7dc7b5a083', + '86a50ed7952688691a2dcbb5dda3a1227097e8fc3878ca7368135c7dc7b5a083', + ], + seedListType: 'SHA256IP', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'DEVICE_ID', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'DEVICE_ID', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + error: + "seedListType is required for deviceId type audience and it should be any one of 'IDFA' and 'GPADVID'", + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'DEVICE_ID', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'DEVICE_ID', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + error: 'Required property for deviceId type audience is not available in an object', + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'DEVICEID', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'DEVICEID', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + error: 'Audience Type DEVICEID is not supported', + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + includeChains: 1573, + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + enablePartialFailure: true, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + error: "The only supported operation for audience updation 'add' is not present", + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'track', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + includeChains: 1573, + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + enablePartialFailure: true, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + error: 'Event type track is not supported', + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + includeChains: 1573, + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + enablePartialFailure: true, + }, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + error: 'Event type is required', + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: {}, + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'POINT_OF_INTEREST', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'POINT_OF_INTEREST', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + error: 'listData is not present inside properties. Aborting message', + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'yahoo_dsp', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + context: { ip: '14.5.67.21', library: { name: 'http' } }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'POINT_OF_INTEREST', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + clientId: 'abcdeb8-f459-4cd6-b4c5-958b3d663242', + clientSecret: 'abcdePsz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFRdsfd', + audienceType: 'POINT_OF_INTEREST', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + seedListType: 'IDFA', + }, + ID: 'iwehr83843', + }, + error: 'Message properties is not present. Aborting message', + statTags: { + destType: 'YAHOO_DSP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; +module.exports = { + data, +}; diff --git a/test/integrations/destinations/yahoo_dsp/router/data.js b/test/integrations/destinations/yahoo_dsp/router/data.js new file mode 100644 index 0000000000..42dbffb914 --- /dev/null +++ b/test/integrations/destinations/yahoo_dsp/router/data.js @@ -0,0 +1,154 @@ +const data = [ + { + name: 'yahoo_dsp', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + metadata: { + jobId: 1, + }, + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + ipAddress: 'fdffddf', + email: 'alex@email.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'alex', + lastName: 'hales', + country: 'AUS', + postalCode: '1245', + includeChains: 1573, + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'amy@abc.com', + deviceId: 'djfdjfkdjf', + phone: '09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 1, + }, + { + ipAddress: 'fdffddf', + email: 'van@abc.com', + deviceId: 'djfdjfkdjf', + phone: '@09432457768', + firstName: 'sudip', + lastName: 'paul', + country: 'US', + includeChains: 1573, + postalCode: '1245', + mailDomain: 'yahoo.com', + categoryIds: 2, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + destType: 'yahoo_dsp', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://dspapi.admanagerplus.yahoo.com/traffic/audiences/email_address/34893', + headers: { + 'X-Auth-Method': 'OAuth2', + 'X-Auth-Token': 'fb8c05c9-3a32-409a-9993-3f53d307fe75', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + seedList: [ + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + ], + accountId: '12444', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + clientId: 'abcdef8-f49-4cd6-b4c5-958b3d66d431', + clientSecret: 'sjhdkhfrz6yc9LrRRIPimE9h53jADLccXTykHCcA6eEoFR4rXQg', + audienceType: 'EMAIL', + accountId: '12444', + audienceId: '34893', + hashRequired: true, + }, + ID: 'iwehr83843', + }, + }, + ], + }, + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/zapier/data.js b/test/integrations/destinations/zapier/data.js new file mode 100644 index 0000000000..d06e49cf34 --- /dev/null +++ b/test/integrations/destinations/zapier/data.js @@ -0,0 +1,675 @@ +const data = [ + { + name: 'zapier', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'first', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkEnabled: true, + }, + }, + Config: { + zapUrl: 'abcd.zap-hook', + trackEventsToZap: {}, + pageScreenEventsToZap: {}, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'abcd.zap-hook', + headers: { + 'content-type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'first', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zapier', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'def', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkEnabled: true, + }, + }, + Config: { + zapUrl: 'abcd.zap-hook', + trackEventsToZap: [ + { + from: 'def', + to: 'def.zap-hook', + }, + { + from: 'ghi', + to: 'ghi.zap-hook', + }, + ], + pageScreenEventsToZap: {}, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'def.zap-hook', + headers: { + 'content-type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'def', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zapier', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + name: 'page_test', + userId: 'identified user id', + type: 'page', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkEnabled: true, + }, + }, + Config: { + zapUrl: 'abcd.zap-hook', + trackEventsToZap: [ + { + from: 'def', + to: 'def.zap-hook', + }, + { + from: 'ghi', + to: 'ghi.zap-hook', + }, + ], + pageScreenEventsToZap: [ + { + from: 'page_test', + to: 'page.zap-hook', + }, + { + from: 'ghi', + to: 'ghi.zap-hook', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'page.zap-hook', + headers: { + 'content-type': 'application/json', + }, + params: {}, + body: { + JSON: { + name: 'page_test', + userId: 'identified user id', + type: 'page', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zapier', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + name: 'screen_test', + userId: 'identified user id', + type: 'screen', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkEnabled: true, + }, + }, + Config: { + zapUrl: 'abcd.zap-hook', + trackEventsToZap: [ + { + from: 'def', + to: 'def.zap-hook', + }, + { + from: 'ghi', + to: 'ghi.zap-hook', + }, + ], + pageScreenEventsToZap: [ + { + from: 'page_test', + to: 'page.zap-hook', + }, + { + from: 'screen_test', + to: 'screen.zap-hook', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'screen.zap-hook', + headers: { + 'content-type': 'application/json', + }, + params: {}, + body: { + JSON: { + name: 'screen_test', + userId: 'identified user id', + type: 'screen', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zapier', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'def', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkEnabled: true, + }, + }, + Config: { + zapUrl: 'abcd.zap-hook', + trackEventsToZap: [ + { + from: 'def', + to: 'def.zap-hook', + }, + { + from: 'def', + to: 'ghi.zap-hook', + }, + ], + pageScreenEventsToZap: [{}], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'ghi.zap-hook', + headers: { + 'content-type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'def', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-04-17T14:42:44.724Z', + sentAt: '2020-04-17T14:42:44.724Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; + +module.exports = { + data, +}; diff --git a/test/integrations/destinations/zendesk/processor/data.js b/test/integrations/destinations/zendesk/processor/data.js new file mode 100644 index 0000000000..bf99c64718 --- /dev/null +++ b/test/integrations/destinations/zendesk/processor/data.js @@ -0,0 +1,2529 @@ +const data = [ + { + name: 'zendesk', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + locale: 'en-GB', + os: { name: '', version: '' }, + screen: { density: 2 }, + traits: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + integrations: { All: true }, + messageId: '0bab70e8-bf2f-449a-a19b-ca6e3bfed9b7', + originalTimestamp: '2020-03-23T18:27:28.98Z', + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51573', + sentAt: '2020-03-23T18:27:28.981Z', + timestamp: '2020-03-23T23:57:29.021+05:30', + type: 'identify', + userId: 'abcd-124', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + error: 'Missing required value from "name"', + statTags: { + destType: 'ZENDESK', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.15', + }, + campaign: {}, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.15' }, + locale: 'en-US', + os: { name: '', version: '' }, + page: { + path: '/home/a/Desktop/pybox/Bingads.html', + referrer: '$direct', + referring_domain: '', + search: '', + title: 'Rudder Test', + url: 'file:///home/a/Desktop/pybox/Bingads.html', + }, + screen: { density: 1 }, + traits: { country: 'UK', name: 'John Wick', userId: 'abcd-124' }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + event: 'Abhishek Track me', + integrations: { All: true }, + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + originalTimestamp: '2021-03-25T14:36:47.695Z', + properties: { + category: 'category', + label: 'label', + userId: 'abcd-124', + value: 'value', + }, + receivedAt: '2021-03-25T20:06:47.701+05:30', + request_ip: '[::1]', + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + sentAt: '2021-03-25T14:36:47.695Z', + timestamp: '2021-03-25T20:06:47.701+05:30', + type: 'track', + userId: '0000000000', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 47, + destinationType: 'ZENDESK', + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + messageIds: null, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + receivedAt: '2021-03-25T20:06:47.701+05:30', + }, + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + DestinationDefinition: { + ID: '1pvRK5OiIrZkhCbFISQY5e55hX1', + Name: 'ZENDESK', + DisplayName: 'Zendesk', + Config: { + destConfig: { + defaultConfig: [ + 'email', + 'apiToken', + 'domain', + 'createUsersAsVerified', + 'sendGroupCallsWithoutUserId', + 'removeUsersFromOrganization', + ], + }, + excludeKeys: [], + includeKeys: [], + routerTransform: false, + secretKeys: ['apiToken'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + ResponseRules: {}, + }, + Config: { + apiToken: 'budWBvuhBsovsPph4S7LIvCnQEVvzfcqAo07vPHd', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'abhishek@rudder.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { query: {} }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + DestinationDefinition: { + ID: '1pvRK5OiIrZkhCbFISQY5e55hX1', + Name: 'ZENDESK', + DisplayName: 'Zendesk', + Config: { + destConfig: { + defaultConfig: [ + 'email', + 'apiToken', + 'domain', + 'createUsersAsVerified', + 'sendGroupCallsWithoutUserId', + 'removeUsersFromOrganization', + ], + }, + excludeKeys: [], + includeKeys: [], + routerTransform: false, + secretKeys: ['apiToken'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + ResponseRules: {}, + }, + Config: { + apiToken: 'budWBvuhBsovsPph4S7LIvCnQEVvzfcqAo07vPHd', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'abhishek@rudder.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + error: 'email not found in traits.', + statTags: { + destType: 'ZENDESK', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 47, + destinationType: 'ZENDESK', + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + messageIds: null, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + receivedAt: '2021-03-25T20:06:47.701+05:30', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + locale: 'en-GB', + os: { name: '', version: '' }, + screen: { density: 2 }, + traits: { email: 'example124@email.com', name: 'abcd124' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + integrations: { All: true }, + messageId: '0bab70e8-bf2f-449a-a19b-ca6e3bfed9b7', + originalTimestamp: '2020-03-23T18:27:28.98Z', + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51573', + sentAt: '2020-03-23T18:27:28.981Z', + timestamp: '2020-03-23T23:57:29.021+05:30', + type: 'identify', + userId: 'abcd-124', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + params: {}, + body: { + JSON: { + user: { + email: 'example124@email.com', + name: 'abcd124', + external_id: 'abcd-124', + user_fields: { id: 'abcd-124' }, + verified: true, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + locale: 'en-GB', + os: { name: '', version: '' }, + screen: { density: 2 }, + traits: { email: 'example124@email.com', name: 'abcd124' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + groupId: 'group-124', + integrations: { All: true }, + messageId: '2d54ba80-ce5f-4bcb-b1d7-7587e7a865fc', + originalTimestamp: '2020-03-23T18:27:28.983Z', + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51574', + sentAt: '2020-03-23T18:27:28.983Z', + timestamp: '2020-03-23T23:57:29.022+05:30', + traits: { + domainNames: 'cw124.com', + email: 'group_email_124@xyz.com', + name: 'test-org124', + }, + type: 'group', + userId: 'abcd-124', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/organization_memberships.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + params: {}, + body: { + JSON: { + organization_membership: { user_id: 900113780483, organization_id: 900001329943 }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + locale: 'en-GB', + os: { name: '', version: '' }, + screen: { density: 2 }, + traits: { email: 'example124@email.com', name: 'abcd124' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + event: 'test-track-event124', + integrations: { All: true }, + messageId: '1c272800-d4f2-4fe6-af81-6429b7cb029f', + originalTimestamp: '2020-03-23T18:27:28.984Z', + properties: { test_prop: 'test_prop_value_124' }, + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51575', + sentAt: '2020-03-23T18:27:28.985Z', + timestamp: '2020-03-23T23:57:29.021+05:30', + type: 'track', + userId: 'abcd-124', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/900113780483/events', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + params: {}, + body: { + JSON: { + event: { + description: 'test-track-event124', + type: 'test-track-event124', + source: 'Rudder', + properties: { test_prop: 'test_prop_value_124' }, + }, + profile: { + type: 'test-track-event124', + source: 'Rudder', + identifiers: [{ type: 'email', value: 'example124@email.com' }], + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + type: 'identify', + sentAt: '2020-03-17T12:16:56.003Z', + userId: 'abcd-124', + channel: 'web', + context: { + ip: '0.0.0.0', + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.0-beta.2', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-GB', + screen: { density: 2 }, + traits: { + name: 'abcd124', + email: 'example124@email.com', + company: { id: 900001329943, name: 'test', remove: true }, + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36', + }, + messageId: 'd26b4de7-8bb5-4554-91aa-c80b8b2182e0', + anonymousId: 'ba1bb99c-a979-45dc-93f0-7b0f2343ad4a', + integrations: { All: true }, + originalTimestamp: '2020-03-17T12:16:56.002Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://rudderlabshelp.zendesk.com/api/v2/users/900113780483/organization_memberships/900004877903.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + params: {}, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: 'ba1bb99c-a979-45dc-93f0-7b0f2343ad4a', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + params: {}, + body: { + JSON: { + user: { + email: 'example124@email.com', + name: 'abcd124', + external_id: 'abcd-124', + user_fields: { id: 'abcd-124' }, + verified: true, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'ba1bb99c-a979-45dc-93f0-7b0f2343ad4a', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + type: 'identify', + sentAt: '2020-03-17T12:16:56.003Z', + userId: 'abcd-124', + channel: 'web', + context: { + ip: '0.0.0.0', + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.0-beta.2', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-GB', + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36', + }, + traits: { + name: 'abcd124', + email: 'example124@email.com', + company: { id: 900001329943, name: 'test', remove: true }, + }, + messageId: 'd26b4de7-8bb5-4554-91aa-c80b8b2182e0', + anonymousId: 'ba1bb99c-a979-45dc-93f0-7b0f2343ad4a', + integrations: { All: true }, + originalTimestamp: '2020-03-17T12:16:56.002Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://rudderlabshelp.zendesk.com/api/v2/users/900113780483/organization_memberships/900004877903.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + params: {}, + body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + files: {}, + userId: 'ba1bb99c-a979-45dc-93f0-7b0f2343ad4a', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + params: {}, + body: { + JSON: { + user: { + email: 'example124@email.com', + name: 'abcd124', + external_id: 'abcd-124', + user_fields: { id: 'abcd-124' }, + verified: true, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'ba1bb99c-a979-45dc-93f0-7b0f2343ad4a', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.15', + }, + campaign: {}, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.15' }, + locale: 'en-US', + os: { name: '', version: '' }, + page: { + path: '/home/a/Desktop/pybox/Bingads.html', + referrer: '$direct', + referring_domain: '', + search: '', + title: 'Rudder Test', + url: 'file:///home/a/Desktop/pybox/Bingads.html', + }, + screen: { density: 1 }, + traits: { + country: 'UK', + email: 'johnwick@example.com', + name: 'John Wick', + userId: 'abcd-124', + }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + integrations: { All: true }, + messageId: '32ccd509-25c3-4d12-9d0d-14ff73580e6c', + originalTimestamp: '2021-03-25T10:08:21.734Z', + receivedAt: '2021-03-25T15:38:21.751+05:30', + request_ip: '[::1]', + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + sentAt: '2021-03-25T10:08:21.734Z', + timestamp: '2021-03-25T15:38:21.751+05:30', + type: 'identify', + userId: '12345678', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 23, + destinationType: 'ZENDESK', + messageId: '32ccd509-25c3-4d12-9d0d-14ff73580e6c', + messageIds: null, + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + receivedAt: '2021-03-25T15:38:21.751+05:30', + }, + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + DestinationDefinition: { + ID: '1pvRK5OiIrZkhCbFISQY5e55hX1', + Name: 'ZENDESK', + DisplayName: 'Zendesk', + Config: { + destConfig: { + defaultConfig: [ + 'email', + 'apiToken', + 'domain', + 'createUsersAsVerified', + 'sendGroupCallsWithoutUserId', + 'removeUsersFromOrganization', + ], + }, + excludeKeys: [], + includeKeys: [], + routerTransform: false, + secretKeys: ['apiToken'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + ResponseRules: {}, + }, + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: false, + domain: 'rudderlabshelp', + email: 'abhishek@rudder.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { query: {} }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic YWJoaXNoZWtAcnVkZGVyLmNvbS90b2tlbjprRkxhRmNuZEJSOVlIRnhOVnA3a1E1eHhMcjlzeUxXb0U4andvdDYw', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + 'X-Zendesk-Marketplace-App-Id': '263241', + }, + params: {}, + body: { + JSON: { + user: { + email: 'johnwick@example.com', + name: 'John Wick', + external_id: 'abcd-124', + user_fields: { id: 'abcd-124', country: 'UK' }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '223b5f40-9543-4456-a7aa-945c43048185', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 23, + destinationType: 'ZENDESK', + messageId: '32ccd509-25c3-4d12-9d0d-14ff73580e6c', + messageIds: null, + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + receivedAt: '2021-03-25T15:38:21.751+05:30', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.15', + }, + campaign: {}, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.15' }, + locale: 'en-US', + os: { name: '', version: '' }, + page: { + path: '/home/a/Desktop/pybox/Bingads.html', + referrer: '$direct', + referring_domain: '', + search: '', + title: 'Rudder Test', + url: 'file:///home/a/Desktop/pybox/Bingads.html', + }, + screen: { density: 1 }, + traits: { + company: { id: 900001329943, remove: true }, + country: 'UK', + email: 'johnwick@example.com', + name: 'John Wick', + userId: 'abcd-124', + }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + integrations: { All: true }, + messageId: '4070994c-1a63-493d-9dc4-889d45c01b1c', + originalTimestamp: '2021-03-25T10:27:05.355Z', + receivedAt: '2021-03-25T15:57:05.369+05:30', + request_ip: '[::1]', + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + sentAt: '2021-03-25T10:27:05.355Z', + timestamp: '2021-03-25T15:57:05.369+05:30', + type: 'identify', + userId: '12345678', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 31, + destinationType: 'ZENDESK', + messageId: '4070994c-1a63-493d-9dc4-889d45c01b1c', + messageIds: null, + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + receivedAt: '2021-03-25T15:57:05.369+05:30', + }, + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + DestinationDefinition: { + ID: '1pvRK5OiIrZkhCbFISQY5e55hX1', + Name: 'ZENDESK', + DisplayName: 'Zendesk', + Config: { + destConfig: { + defaultConfig: [ + 'email', + 'apiToken', + 'domain', + 'createUsersAsVerified', + 'sendGroupCallsWithoutUserId', + 'removeUsersFromOrganization', + ], + }, + excludeKeys: [], + includeKeys: [], + routerTransform: false, + secretKeys: ['apiToken'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + ResponseRules: {}, + }, + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: false, + domain: 'rudderlabshelp', + email: 'abhishek@rudder.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { query: {} }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic YWJoaXNoZWtAcnVkZGVyLmNvbS90b2tlbjprRkxhRmNuZEJSOVlIRnhOVnA3a1E1eHhMcjlzeUxXb0U4andvdDYw', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + 'X-Zendesk-Marketplace-App-Id': '263241', + }, + params: {}, + body: { + JSON: { + user: { + email: 'johnwick@example.com', + name: 'John Wick', + external_id: 'abcd-124', + user_fields: { id: 'abcd-124', country: 'UK' }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '223b5f40-9543-4456-a7aa-945c43048185', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 31, + destinationType: 'ZENDESK', + messageId: '4070994c-1a63-493d-9dc4-889d45c01b1c', + messageIds: null, + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + receivedAt: '2021-03-25T15:57:05.369+05:30', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.15', + }, + campaign: {}, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.15' }, + locale: 'en-US', + os: { name: '', version: '' }, + page: { + path: '/home/a/Desktop/pybox/Bingads.html', + referrer: '$direct', + referring_domain: '', + search: '', + title: 'Rudder Test', + url: 'file:///home/a/Desktop/pybox/Bingads.html', + }, + screen: { density: 1 }, + traits: { + company: { id: 900001329943, remove: true }, + country: 'UK', + email: 'johnwick@example.com', + name: 'John Wick', + userId: 'abcd-124', + }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + integrations: { All: true }, + messageId: 'dd72a843-f865-4f7e-80eb-1f859e84e48c', + originalTimestamp: '2021-03-25T12:48:42.188Z', + receivedAt: '2021-03-25T18:18:42.193+05:30', + request_ip: '[::1]', + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + sentAt: '2021-03-25T12:48:42.188Z', + timestamp: '2021-03-25T18:18:42.193+05:30', + type: 'identify', + userId: '12345678', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 38, + destinationType: 'ZENDESK', + messageId: 'dd72a843-f865-4f7e-80eb-1f859e84e48c', + messageIds: null, + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + receivedAt: '2021-03-25T18:18:42.193+05:30', + }, + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + DestinationDefinition: { + ID: '1pvRK5OiIrZkhCbFISQY5e55hX1', + Name: 'ZENDESK', + DisplayName: 'Zendesk', + Config: { + destConfig: { + defaultConfig: [ + 'email', + 'apiToken', + 'domain', + 'createUsersAsVerified', + 'sendGroupCallsWithoutUserId', + 'removeUsersFromOrganization', + ], + }, + excludeKeys: [], + includeKeys: [], + routerTransform: false, + secretKeys: ['apiToken'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + ResponseRules: {}, + }, + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'abhishek@rudder.com', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { query: {} }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic YWJoaXNoZWtAcnVkZGVyLmNvbS90b2tlbjprRkxhRmNuZEJSOVlIRnhOVnA3a1E1eHhMcjlzeUxXb0U4andvdDYw', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + 'X-Zendesk-Marketplace-App-Id': '263241', + }, + params: {}, + body: { + JSON: { + user: { + email: 'johnwick@example.com', + name: 'John Wick', + external_id: 'abcd-124', + user_fields: { id: 'abcd-124', country: 'UK' }, + verified: true, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '223b5f40-9543-4456-a7aa-945c43048185', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 38, + destinationType: 'ZENDESK', + messageId: 'dd72a843-f865-4f7e-80eb-1f859e84e48c', + messageIds: null, + rudderId: '32cea78b-a0d6-41de-9d23-201c49bd80b7', + receivedAt: '2021-03-25T18:18:42.193+05:30', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.15', + }, + campaign: {}, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.15' }, + locale: 'en-US', + os: { name: '', version: '' }, + page: { + path: '/home/a/Desktop/pybox/Bingads.html', + referrer: '$direct', + referring_domain: '', + search: '', + title: 'Rudder Test', + url: 'file:///home/a/Desktop/pybox/Bingads.html', + }, + screen: { density: 1 }, + traits: { + country: 'UK', + email: 'johnwick@example.com', + name: 'John Wick', + userId: 'abcd-124', + }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + event: 'Abhishek Track me', + integrations: { All: true }, + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + originalTimestamp: '2021-03-25T14:36:47.695Z', + properties: { + category: 'category', + label: 'label', + userId: 'abcd-124', + value: 'value', + }, + receivedAt: '2021-03-25T20:06:47.701+05:30', + request_ip: '[::1]', + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + sentAt: '2021-03-25T14:36:47.695Z', + timestamp: '2021-03-25T20:06:47.701+05:30', + type: 'track', + userId: '0000000000', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 47, + destinationType: 'ZENDESK', + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + messageIds: null, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + receivedAt: '2021-03-25T20:06:47.701+05:30', + }, + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + DestinationDefinition: { + ID: '1pvRK5OiIrZkhCbFISQY5e55hX1', + Name: 'ZENDESK', + DisplayName: 'Zendesk', + Config: { + destConfig: { + defaultConfig: [ + 'email', + 'apiToken', + 'domain', + 'createUsersAsVerified', + 'sendGroupCallsWithoutUserId', + 'removeUsersFromOrganization', + ], + }, + excludeKeys: [], + includeKeys: [], + routerTransform: false, + secretKeys: ['apiToken'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + ResponseRules: {}, + }, + Config: { + apiToken: 'budWBvuhBsovsPph4S7LIvCnQEVvzfcqAo07vPHd', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'abhishek@rudder.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { query: {} }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + event: { + description: 'Abhishek Track me', + properties: { + category: 'category', + label: 'label', + userId: 'abcd-124', + value: 'value', + }, + source: 'Rudder', + type: 'Abhishek Track me', + }, + profile: { + identifiers: [{ type: 'email', value: 'example124@email.com' }], + source: 'Rudder', + type: 'Abhishek Track me', + }, + }, + XML: {}, + JSON_ARRAY: {}, + }, + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/900113780483/events', + files: {}, + headers: { + Authorization: + 'Basic YWJoaXNoZWtAcnVkZGVyLmNvbS90b2tlbjpidWRXQnZ1aEJzb3ZzUHBoNFM3TEl2Q25RRVZ2emZjcUFvMDd2UEhk', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: '223b5f40-9543-4456-a7aa-945c43048185', + version: '1', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 47, + destinationType: 'ZENDESK', + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + messageIds: null, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + receivedAt: '2021-03-25T20:06:47.701+05:30', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.15', + }, + campaign: {}, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.15' }, + locale: 'en-US', + os: { name: '', version: '' }, + page: { + path: '/home/a/Desktop/pybox/Bingads.html', + referrer: '$direct', + referring_domain: '', + search: '', + title: 'Rudder Test', + url: 'file:///home/a/Desktop/pybox/Bingads.html', + }, + screen: { density: 1 }, + traits: { + country: 'UK', + email: 'johnwick@example.com', + name: 'John Wick', + userId: 'abcd-124', + }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + event: 'Abhishek Track me', + integrations: { All: true }, + messageId: '611a63fc-acb5-4a76-b4c3-e9cba27ca554', + originalTimestamp: '2021-03-25T14:50:39.716Z', + properties: { + category: 'category', + label: 'label', + userId: 'abcd-124', + value: 'value', + }, + receivedAt: '2021-03-25T20:20:39.740+05:30', + request_ip: '[::1]', + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + sentAt: '2021-03-25T14:50:39.717Z', + timestamp: '2021-03-25T20:20:39.739+05:30', + type: 'track', + userId: '0000000000', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 48, + destinationType: 'ZENDESK', + messageId: '611a63fc-acb5-4a76-b4c3-e9cba27ca554', + messageIds: null, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + receivedAt: '2021-03-25T20:20:39.740+05:30', + }, + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + DestinationDefinition: { + ID: '1pvRK5OiIrZkhCbFISQY5e55hX1', + Name: 'ZENDESK', + DisplayName: 'Zendesk', + Config: { + destConfig: { + defaultConfig: [ + 'email', + 'apiToken', + 'domain', + 'createUsersAsVerified', + 'sendGroupCallsWithoutUserId', + 'removeUsersFromOrganization', + ], + }, + excludeKeys: [], + includeKeys: [], + routerTransform: false, + secretKeys: ['apiToken'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + ResponseRules: {}, + }, + Config: { + apiToken: 'budWBvuhBsovsPph4S7LIvCnQEVvzfcqAo07vPHd', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'abhishek@rudder.com', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { query: {} }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + event: { + description: 'Abhishek Track me', + properties: { + category: 'category', + label: 'label', + userId: 'abcd-124', + value: 'value', + }, + source: 'Rudder', + type: 'Abhishek Track me', + }, + profile: { + identifiers: [{ type: 'email', value: 'example124@email.com' }], + source: 'Rudder', + type: 'Abhishek Track me', + }, + }, + XML: {}, + JSON_ARRAY: {}, + }, + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/900113780483/events', + files: {}, + headers: { + Authorization: + 'Basic YWJoaXNoZWtAcnVkZGVyLmNvbS90b2tlbjpidWRXQnZ1aEJzb3ZzUHBoNFM3TEl2Q25RRVZ2emZjcUFvMDd2UEhk', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: '223b5f40-9543-4456-a7aa-945c43048185', + version: '1', + }, + metadata: { + sourceId: '1pvRRLH8kBCH6c88kNAQjRmhb8Z', + destinationId: '1qEz66UWpXTKwgCc8BPvyWPorpz', + jobId: 48, + destinationType: 'ZENDESK', + messageId: '611a63fc-acb5-4a76-b4c3-e9cba27ca554', + messageIds: null, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + receivedAt: '2021-03-25T20:20:39.740+05:30', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'uMtFgILXwpo5RUBpDhj7bqR36YNqwVQqYIfeY1Wm', + createUsersAsVerified: true, + domain: 'blendohelp', + email: 'fotis@blendo.co', + password: 'yhER4ZMyaRhHjVtH', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: false, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + locale: 'en-GB', + os: { name: '', version: '' }, + screen: { density: 2 }, + traits: { email: 'example1245@email.com', name: 'abcd1245' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + groupId: 'group-124', + integrations: { All: true }, + messageId: '2d54ba80-ce5f-4bcb-b1d7-7587e7a865fc', + originalTimestamp: '2020-03-23T18:27:28.983Z', + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51574', + sentAt: '2020-03-23T18:27:28.983Z', + timestamp: '2020-03-23T23:57:29.022+05:30', + traits: { + domainNames: 'cw124.com', + email: 'group_email_124@xyz.com', + name: 'group-124', + }, + type: 'group', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiToken: 'uMtFgILXwpo5RUBpDhj7bqR36YNqwVQqYIfeY1Wm', + createUsersAsVerified: true, + domain: 'blendohelp', + email: 'fotis@blendo.co', + password: 'yhER4ZMyaRhHjVtH', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: false, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + error: 'UserId is a mandatory field for group', + statTags: { + destType: 'ZENDESK', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'uMtFgILXwpo5RUBpDhj7bqR36YNqwVQqYIfeY1Wm', + createUsersAsVerified: true, + domain: 'blendohelp', + email: 'fotis@blendo.co', + password: 'yhER4ZMyaRhHjVtH', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + locale: 'en-GB', + os: { name: '', version: '' }, + screen: { density: 2 }, + traits: { email: 'example1245@email.com', name: 'abcd1245' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + groupId: 'group-124', + integrations: { All: true }, + messageId: '2d54ba80-ce5f-4bcb-b1d7-7587e7a865fc', + originalTimestamp: '2020-03-23T18:27:28.983Z', + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51574', + sentAt: '2020-03-23T18:27:28.983Z', + timestamp: '2020-03-23T23:57:29.022+05:30', + traits: { + domainNames: 'cw124.com', + email: 'group_email_124@xyz.com', + name: 'group-124', + }, + type: 'page', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + Config: { + apiToken: 'uMtFgILXwpo5RUBpDhj7bqR36YNqwVQqYIfeY1Wm', + createUsersAsVerified: true, + domain: 'blendohelp', + email: 'fotis@blendo.co', + password: 'yhER4ZMyaRhHjVtH', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + error: 'Event type page is not supported', + statTags: { + destType: 'ZENDESK', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'uMtFgILXwpo5RUBpDhj7bqR36YNqwVQqYIfeY1Wm', + createUsersAsVerified: true, + domain: 'blendohelp', + email: 'fotis@blendo.co', + password: 'yhER4ZMyaRhHjVtH', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + locale: 'en-GB', + os: { name: '', version: '' }, + screen: { density: 2 }, + traits: { email: 'example1245@email.com', name: 'abcd1245' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + groupId: 'group-124', + integrations: { All: true }, + messageId: '2d54ba80-ce5f-4bcb-b1d7-7587e7a865fc', + originalTimestamp: '2020-03-23T18:27:28.983Z', + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51574', + sentAt: '2020-03-23T18:27:28.983Z', + timestamp: '2020-03-23T23:57:29.022+05:30', + traits: { + domainNames: 'cw124.com', + email: 'group_email_124@xyz.com', + name: 'group-124', + }, + type: 'group', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://blendohelp.zendesk.com/api/v2/organizations/create_or_update.json', + headers: { + Authorization: + 'Basic Zm90aXNAYmxlbmRvLmNvL3Rva2VuOnVNdEZnSUxYd3BvNVJVQnBEaGo3YnFSMzZZTnF3VlFxWUlmZVkxV20=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + 'X-Zendesk-Marketplace-App-Id': '263241', + }, + params: {}, + body: { + JSON: { + organization: { + name: 'group-124', + domain_names: 'cw124.com', + external_id: 'group-124', + organization_fields: { id: 'group-124', email: 'group_email_124@xyz.com' }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + type: 'identify', + sentAt: '2020-03-17T12:16:56.003Z', + userId: 'abcd-124', + channel: 'web', + context: { + ip: '0.0.0.0', + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.0-beta.2', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-GB', + screen: { density: 2 }, + traits: { + name: 'abcd124', + company: { id: 900001329943, name: 'test', remove: true }, + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36', + }, + messageId: 'd26b4de7-8bb5-4554-91aa-c80b8b2182e0', + anonymousId: 'ba1bb99c-a979-45dc-93f0-7b0f2343ad4a', + integrations: { All: true }, + originalTimestamp: '2020-03-17T12:16:56.002Z', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + 'X-Zendesk-Marketplace-App-Id': '263241', + }, + params: {}, + body: { + JSON: { + user: { + name: 'abcd124', + external_id: 'abcd-124', + user_fields: { id: 'abcd-124' }, + verified: true, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'ba1bb99c-a979-45dc-93f0-7b0f2343ad4a', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + searchByExternalId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + locale: 'en-GB', + os: { name: '', version: '' }, + screen: { density: 2 }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + integrations: { All: true }, + messageId: '0bab70e8-bf2f-449a-a19b-ca6e3bfed9b7', + request_ip: '[::1]:51573', + type: 'identify', + userId: 'abcd-144', + traits: { email: 'example124@email.com', name: 'name_abcd144' }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { identity: { type: 'email', value: 'example124@email.com' } }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + version: '1', + endpoint: + 'https://rudderlabshelp.zendesk.com/api/v2/users/900113780483/identities/7535981118877', + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + 'X-Zendesk-Marketplace-App-Id': '263241', + }, + params: {}, + body: { + JSON: { + user: { + email: 'example124@email.com', + name: 'name_abcd144', + external_id: 'abcd-144', + user_fields: { id: 'abcd-144' }, + verified: true, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + traits: { + country: 'UK', + name: 'John Wick', + userId: 'exId-123', + email: 'testemail1@email', + }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + event: 'Order completed', + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + originalTimestamp: '2021-03-25T14:36:47.695Z', + properties: { + category: 'category', + label: 'label', + userId: 'exId-123', + value: 'value', + }, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + type: 'track', + userId: '0000000000', + }, + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + Config: { + apiToken: 'yPJwcLTFSsvIkFhY23SzittHoYADJQ7eKDoxNu4x', + createUsersAsVerified: true, + domain: 'rudderlabtest1', + email: 'rudderlabtest1@email.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + event: { + description: 'Order completed', + properties: { + category: 'category', + label: 'label', + userId: 'exId-123', + value: 'value', + }, + source: 'Rudder', + type: 'Order completed', + }, + profile: { + identifiers: [{ type: 'email', value: 'testemail1@email' }], + source: 'Rudder', + type: 'Order completed', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderlabtest1.zendesk.com/api/v2/users/900113780483/events', + files: {}, + headers: { + Authorization: + 'Basic cnVkZGVybGFidGVzdDFAZW1haWwuY29tL3Rva2VuOnlQSndjTFRGU3N2SWtGaFkyM1N6aXR0SG9ZQURKUTdlS0RveE51NHg=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-App-Id': '263241', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: '223b5f40-9543-4456-a7aa-945c43048185', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'zendesk', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + traits: { + country: 'UK', + name: 'John Wick', + userId: 'exId-123', + email: 'testemail2@email', + }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + event: 'Order completed', + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + originalTimestamp: '2021-03-25T14:36:47.695Z', + properties: { + category: 'category', + label: 'label', + userId: 'exId-123', + value: 'value', + }, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + type: 'track', + userId: '0000000000', + }, + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + Config: { + apiToken: 'yPJwcLTFSsvIkFhY23SzittHoYADJQ7eKDoxNu4x', + createUsersAsVerified: true, + domain: 'rudderlabtest2', + email: 'rudderlabtest2@email.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + destination: { + ID: '1qEz66UWpXTKwgCc8BPvyWPorpz', + Name: 'Zendesk', + Config: { + apiToken: 'yPJwcLTFSsvIkFhY23SzittHoYADJQ7eKDoxNu4x', + createUsersAsVerified: true, + domain: 'rudderlabtest2', + email: 'rudderlabtest2@email.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + }, + error: + "Failed to fetch user with email: testemail2@email due to Couldn't find user: John Wick", + statTags: { + destType: 'ZENDESK', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; +module.exports = { + data, +}; diff --git a/test/integrations/destinations/zendesk/router/data.js b/test/integrations/destinations/zendesk/router/data.js new file mode 100644 index 0000000000..92bf703703 --- /dev/null +++ b/test/integrations/destinations/zendesk/router/data.js @@ -0,0 +1,436 @@ +const data = [ + { + name: 'zendesk', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.0-beta.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'example124@email.com', + name: 'abcd124', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '0bab70e8-bf2f-449a-a19b-ca6e3bfed9b7', + originalTimestamp: '2020-03-23T18:27:28.98Z', + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51573', + sentAt: '2020-03-23T18:27:28.981Z', + timestamp: '2020-03-23T23:57:29.021+05:30', + type: 'identify', + userId: 'abcd-124', + }, + }, + ], + destType: 'zendesk', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + 'X-Zendesk-Marketplace-App-Id': '263241', + }, + params: {}, + body: { + JSON: { + user: { + email: 'example124@email.com', + name: 'abcd124', + external_id: 'abcd-124', + user_fields: { + id: 'abcd-124', + }, + verified: true, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + }, + ], + }, + }, + }, + }, + { + name: 'zendesk', + description: 'Test 1', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.0-beta.2', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.0-beta.2', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'example124@email.com', + name: 'abcd124', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + groupId: 'group-124', + integrations: { + All: true, + }, + messageId: '2d54ba80-ce5f-4bcb-b1d7-7587e7a865fc', + originalTimestamp: '2020-03-23T18:27:28.983Z', + receivedAt: '2020-03-23T23:57:29.022+05:30', + request_ip: '[::1]:51574', + sentAt: '2020-03-23T18:27:28.983Z', + timestamp: '2020-03-23T23:57:29.022+05:30', + traits: { + domainNames: 'cw124.com', + email: 'group_email_124@xyz.com', + name: 'test-org124', + }, + type: 'group', + userId: 'abcd-124', + }, + }, + ], + destType: 'zendesk', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/organization_memberships.json', + headers: { + Authorization: + 'Basic cHJhYnJpc2hhQHJ1ZGRlcmxhYnMuY29tL3Rva2VuOmtGTGFGY25kQlI5WUhGeE5WcDdrUTV4eExyOXN5TFdvRThqd290NjA=', + 'Content-Type': 'application/json', + 'X-Zendesk-Marketplace-Name': 'RudderStack', + 'X-Zendesk-Marketplace-Organization-Id': '3339', + 'X-Zendesk-Marketplace-App-Id': '263241', + }, + params: {}, + body: { + JSON: { + organization_membership: { + user_id: 900113780483, + organization_id: 900001329943, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '297b0750-934b-4411-b66c-9b418cdbc0c9', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiToken: 'kFLaFcndBR9YHFxNVp7kQ5xxLr9syLWoE8jwot60', + createUsersAsVerified: true, + domain: 'rudderlabshelp', + email: 'prabrisha@rudderlabs.com', + password: 'Ey!i@2tn6YhSDpx', + removeUsersFromOrganization: true, + sendGroupCallsWithoutUserId: true, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + }, + ], + }, + }, + }, + }, + { + name: 'zendesk', + description: 'Test 2', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiToken: 'yPJwcLTFSsvIkFhY23SzittHoYADJQ7eKDoxNu4x', + createUsersAsVerified: true, + domain: 'rudderlabtest2', + email: 'rudderlabtest2@email.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + metadata: { + jobId: 3, + }, + message: { + anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', + channel: 'web', + context: { + traits: { + country: 'UK', + name: 'John Wick', + userId: 'exId-123', + email: 'testemail2@email', + }, + userAgent: + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', + }, + event: 'Order completed', + messageId: '017f5227-ead3-4b7d-9794-1465022327be', + originalTimestamp: '2021-03-25T14:36:47.695Z', + properties: { + category: 'category', + label: 'label', + userId: 'exId-123', + value: 'value', + }, + rudderId: 'd1b1b23f-c855-4b86-bad7-091f7bbe99fe', + type: 'track', + userId: '0000000000', + }, + }, + ], + destType: 'zendesk', + }, + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: { + output: [ + { + error: + "Failed to fetch user with email: testemail2@email due to Couldn't find user: John Wick", + statTags: { + destType: 'ZENDESK', + errorCategory: 'network', + errorType: 'aborted', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + metadata: [ + { + jobId: 3, + }, + ], + batched: false, + destination: { + Config: { + apiToken: 'yPJwcLTFSsvIkFhY23SzittHoYADJQ7eKDoxNu4x', + createUsersAsVerified: true, + domain: 'rudderlabtest2', + email: 'rudderlabtest2@email.com', + removeUsersFromOrganization: false, + sendGroupCallsWithoutUserId: false, + }, + DestinationDefinition: { + DisplayName: 'Zendesk', + ID: '1YknZ1ENqB8UurJQJE2VrEA61tr', + Name: 'ZENDESK', + }, + Enabled: true, + ID: '1Z3zFXE6zwvNJBVOUzCuJxeO51P', + Name: 'zendesk', + Transformations: [], + }, + }, + ], + }, + }, + }, + }, +]; + +module.exports = { + data, +};