From e944e1de6b63c3b2f55b7ca0271ad025451dba43 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Tue, 3 Sep 2024 14:15:02 +0530 Subject: [PATCH 01/10] feat: onboard X(Twiiter) Audience --- .../destinations/x_audience/db-config.json | 26 ++++++ .../destinations/x_audience/schema.json | 24 +++++ .../destinations/x_audience/ui-config.json | 89 +++++++++++++++++++ .../validation/destinations/x_audience.json | 20 +++++ 4 files changed, 159 insertions(+) create mode 100644 src/configurations/destinations/x_audience/db-config.json create mode 100644 src/configurations/destinations/x_audience/schema.json create mode 100644 src/configurations/destinations/x_audience/ui-config.json create mode 100644 test/data/validation/destinations/x_audience.json diff --git a/src/configurations/destinations/x_audience/db-config.json b/src/configurations/destinations/x_audience/db-config.json new file mode 100644 index 000000000..a8787b971 --- /dev/null +++ b/src/configurations/destinations/x_audience/db-config.json @@ -0,0 +1,26 @@ +{ + "name": "X_AUDIENCE", + "displayName": "X Audience (formerly Twitter Audience)", + "config": { + "auth": { "type": "OAuth", "role": "x_audience", "rudderScopes": ["delivery"] }, + "transformAtV1": "router", + "excludeKeys": [], + "supportedSourceTypes": ["cloud", "warehouse"], + "supportedConnectionModes": { + "cloud": ["cloud"], + "warehouse": ["cloud"] + }, + "supportsBlankAudienceCreation": true, + "syncBehaviours": ["mirror"], + "disableJsonMapper": true, + "supportsVisualMapper": true, + "destConfig": { + "defaultConfig": ["rudderAccountId", "audienceId", "accountId", "enableHash"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] + }, + "secretKeys": [], + "supportedMessageTypes": { "cloud": ["record"] } + }, + "options": { "isBeta": true } +} diff --git a/src/configurations/destinations/x_audience/schema.json b/src/configurations/destinations/x_audience/schema.json new file mode 100644 index 000000000..137cda34b --- /dev/null +++ b/src/configurations/destinations/x_audience/schema.json @@ -0,0 +1,24 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["accountId"], + "properties": { + "accountId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$" + }, + "enableHash": { + "type": "boolean", + "default": false + }, + "connectionMode": { + "type": "object", + "properties": { + "cloud": { "type": "string", "enum": ["cloud"] }, + "warehouse": { "type": "string", "enum": ["cloud"] } + } + } + } + } +} diff --git a/src/configurations/destinations/x_audience/ui-config.json b/src/configurations/destinations/x_audience/ui-config.json new file mode 100644 index 000000000..b6e5957a9 --- /dev/null +++ b/src/configurations/destinations/x_audience/ui-config.json @@ -0,0 +1,89 @@ +{ + "description": "GENERATED CODE DO NOT EDIT", + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection settings", + "note": "Update your connection settings here", + "icon": "settings", + "fields": [ + { + "configKey": "accountId", + "type": "nestedSelect", + "label": "Select your Account", + "note": "Select Account -> Account Settings -> General -> AccountId", + "apiName": "getXAccounts", + "placeholder": "Select account details", + "preRequisites": { + "fields": [ + { + "configKey": "rudderAccountId", + "exists": true + } + ] + } + } + ] + } + ] + }, + { + "groups": [ + { + "title": "Connection mode", + "note": [ + "Update how you want to route events from your source to destination. ", + { + "text": "Get help deciding", + "link": "https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/" + } + ], + "icon": "sliders", + "fields": [] + } + ] + } + ] + }, + { + "title": "Configuration settings", + "note": "Manage the settings for your destination", + "sections": [ + { + "title": "Destination settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", + "groups": [ + { + "title": "Optional configuration settings", + "fields": [ + { + "type": "checkbox", + "label": "Enable user data hashing", + "note": [ + "Enabling this will hash all the user data before sending it to X(Twitter)", + "Do not enable it if you already pass hash data to rudderstack" + ], + "configKey": "enableHash", + "default": false + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [] + } + } +} diff --git a/test/data/validation/destinations/x_audience.json b/test/data/validation/destinations/x_audience.json new file mode 100644 index 000000000..f33b27a76 --- /dev/null +++ b/test/data/validation/destinations/x_audience.json @@ -0,0 +1,20 @@ +[ + { + "testTitle": "With all required configs", + "config": { + "rudderAccountId": "test-host", + "accountId": "test-account-id", + "audienceId": "test-audience-id" + }, + "result": true + }, + { + "testTitle": "With missing accountId", + "config": { + "rudderAccountId": "test-host", + "audienceId": "test-audience-id" + }, + "result": false, + "err": [" must have required property 'accountId'"] + } +] From 51a7fd452a4e59c1ff64803c4daef086afc9d5ce Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Mon, 9 Sep 2024 09:27:23 +0530 Subject: [PATCH 02/10] feat: onboard Amazon Audience --- .../amazon_audience/db-config.json | 35 +++++ .../destinations/amazon_audience/schema.json | 49 ++++++ .../amazon_audience/ui-config.json | 146 ++++++++++++++++++ .../destinations/amazon_audience.json | 30 ++++ 4 files changed, 260 insertions(+) create mode 100644 src/configurations/destinations/amazon_audience/db-config.json create mode 100644 src/configurations/destinations/amazon_audience/schema.json create mode 100644 src/configurations/destinations/amazon_audience/ui-config.json create mode 100644 test/data/validation/destinations/amazon_audience.json diff --git a/src/configurations/destinations/amazon_audience/db-config.json b/src/configurations/destinations/amazon_audience/db-config.json new file mode 100644 index 000000000..64967d529 --- /dev/null +++ b/src/configurations/destinations/amazon_audience/db-config.json @@ -0,0 +1,35 @@ +{ + "name": "AMAZON_AUDIENCE", + "displayName": "Amazon Audience", + "config": { + "auth": { "type": "OAuth", "role": "amazon_audience", "rudderScopes": ["delivery"] }, + "transformAtV1": "router", + "excludeKeys": [], + "supportedSourceTypes": ["cloud", "warehouse"], + "supportedConnectionModes": { + "cloud": ["cloud"], + "warehouse": ["cloud"] + }, + "supportsBlankAudienceCreation": true, + "syncBehaviours": ["mirror"], + "disableJsonMapper": true, + "supportsVisualMapper": true, + "destConfig": { + "defaultConfig": [ + "rudderAccountId", + "audienceId", + "authServer", + "advertiserId", + "externalAudienceId", + "ttl", + "dataSourceCountry", + "enableHash" + ], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"] + }, + "secretKeys": [], + "supportedMessageTypes": { "cloud": ["record"] } + }, + "options": { "isBeta": true } +} diff --git a/src/configurations/destinations/amazon_audience/schema.json b/src/configurations/destinations/amazon_audience/schema.json new file mode 100644 index 000000000..a4652dc41 --- /dev/null +++ b/src/configurations/destinations/amazon_audience/schema.json @@ -0,0 +1,49 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["advertiserId"], + "properties": { + "authServer": { + "type": "string", + "enum": ["NA"], + "default": "NA" + }, + "advertiserId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$" + }, + "externalAudienceId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$" + }, + "ttl": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^[0-9]\\d*$" + }, + "enableHash": { + "type": "boolean", + "default": false + }, + "dataSourceCountry": { + "type": "array", + "items": { + "type": "object", + "properties": { + "country": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,5})$" + } + } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "cloud": { "type": "string", "enum": ["cloud"] }, + "warehouse": { "type": "string", "enum": ["cloud"] } + } + } + } + } +} diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json new file mode 100644 index 000000000..0fd98b56e --- /dev/null +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -0,0 +1,146 @@ +{ + "description": "GENERATED CODE DO NOT EDIT", + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection settings", + "note": "Update your connection settings here", + "icon": "settings", + "fields": [ + { + "configKey": "advertiserId", + "type": "nestedSelect", + "label": "Select your Account", + "apiName": "getAmazonAdvertiser", + "placeholder": "Select Advertiser Id details", + "preRequisites": { + "fields": [ + { + "configKey": "rudderAdvertiserId", + "exists": true + } + ] + } + }, + { + "type": "singleSelect", + "label": "Authorization servers", + "note": " Support for more servers will be supported soon", + "configKey": "authServer", + "options": [ + { + "name": "North America", + "value": "NA" + } + ], + "default": "NA" + } + ] + } + ] + }, + { + "groups": [ + { + "title": "Connection mode", + "note": [ + "Update how you want to route events from your source to destination. ", + { + "text": "Get help deciding", + "link": "https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/" + } + ], + "icon": "sliders", + "fields": [] + } + ] + } + ] + }, + { + "title": "Configuration settings", + "note": "Manage the settings for your destination", + "sections": [ + { + "title": "Destination settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", + "groups": [ + { + "title": "Optional configuration settings", + "fields": [ + { + "type": "checkbox", + "label": "Enable user data hashing", + "note": [ + "Enabling this will hash all the user data before sending it to X(Twitter)", + "Do not enable it if you already pass hash data to rudderstack" + ], + "configKey": "enableHash", + "default": false + } + ] + }, + { + "title": "Optional Audience Creation Configuration settings", + "fields": [ + { + "configKey": "externalAudienceId", + "type": "textInput", + "label": "Type External Audience Id to use while creating Audience", + "placeholder": "Default: Rudderstack Audience", + "default": "Rudderstack Audience" + }, + { + "configKey": "ttl", + "type": "textInput", + "label": "Time To Live", + "placeholder": "Default: 34300800(13 Months)", + "note": [ + "Refer below link for more info", + { + "text": "Time To live", + "link": "https://advertising.amazon.com/API/docs/en-us/guides/amazon-marketing-cloud/audiences/audience-management-service#:~:text=a%20given%20invocation.-,Note,-The%20time%2Dto" + } + ], + "default": "34300800" + }, + { + "type": "tagInput", + "label": "Data Source Countries", + "configKey": "dataSourceCountry", + "tagKey": "country", + "placeholder": "e.g: US", + "note": [ + "Refer below link for more info", + { + "text": "Time To live", + "link": "https://advertising.amazon.com/API/docs/en-us/guides/amazon-marketing-cloud/audiences/audience-management-service#:~:text=a%20given%20invocation.-,Note,-The%20time%2Dto" + } + ], + "default": [ + { + "traits": "US" + } + ] + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [] + } + } +} diff --git a/test/data/validation/destinations/amazon_audience.json b/test/data/validation/destinations/amazon_audience.json new file mode 100644 index 000000000..88ef81c9a --- /dev/null +++ b/test/data/validation/destinations/amazon_audience.json @@ -0,0 +1,30 @@ +[ + { + "testTitle": "With all required configs", + "config": { + "rudderAccountId": "test-host", + "ttl": "1230", + "enableHash": true, + "dataSourceCountry": [ + { + "country": "US" + }, + { + "country": "CAN" + } + ], + "advertiserId": "test-advertiser-id", + "audienceId": "test-audience-id" + }, + "result": true + }, + { + "testTitle": "With missing accountId", + "config": { + "rudderAccountId": "test-host", + "audienceId": "test-audience-id" + }, + "result": false, + "err": [" must have required property 'advertiserId'"] + } +] From 99ac290d88ab9c84e1854eb6f6f7b8f701e35204 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Sun, 15 Sep 2024 13:31:41 +0530 Subject: [PATCH 03/10] fix: added regexes in UI --- .../destinations/amazon_audience/db-config.json | 1 + .../destinations/amazon_audience/schema.json | 4 ++-- .../destinations/amazon_audience/ui-config.json | 6 +++++- test/data/validation/destinations/amazon_audience.json | 7 +++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/configurations/destinations/amazon_audience/db-config.json b/src/configurations/destinations/amazon_audience/db-config.json index 64967d529..535c31e97 100644 --- a/src/configurations/destinations/amazon_audience/db-config.json +++ b/src/configurations/destinations/amazon_audience/db-config.json @@ -10,6 +10,7 @@ "cloud": ["cloud"], "warehouse": ["cloud"] }, + "isAudienceSupported": true, "supportsBlankAudienceCreation": true, "syncBehaviours": ["mirror"], "disableJsonMapper": true, diff --git a/src/configurations/destinations/amazon_audience/schema.json b/src/configurations/destinations/amazon_audience/schema.json index a4652dc41..1e272bee6 100644 --- a/src/configurations/destinations/amazon_audience/schema.json +++ b/src/configurations/destinations/amazon_audience/schema.json @@ -2,7 +2,7 @@ "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", - "required": ["advertiserId"], + "required": ["authServer"], "properties": { "authServer": { "type": "string", @@ -32,7 +32,7 @@ "properties": { "country": { "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,5})$" + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" } } } diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json index 0fd98b56e..87fd3f584 100644 --- a/src/configurations/destinations/amazon_audience/ui-config.json +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -22,7 +22,7 @@ "preRequisites": { "fields": [ { - "configKey": "rudderAdvertiserId", + "configKey": "rudderAccountId", "exists": true } ] @@ -95,6 +95,8 @@ "type": "textInput", "label": "Type External Audience Id to use while creating Audience", "placeholder": "Default: Rudderstack Audience", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$", + "regexErrorMessage": "Invalid External Audience Id", "default": "Rudderstack Audience" }, { @@ -102,6 +104,8 @@ "type": "textInput", "label": "Time To Live", "placeholder": "Default: 34300800(13 Months)", + "regexErrorMessage": "ttl should be in number", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^[0-9]\\d*$", "note": [ "Refer below link for more info", { diff --git a/test/data/validation/destinations/amazon_audience.json b/test/data/validation/destinations/amazon_audience.json index 88ef81c9a..14524238a 100644 --- a/test/data/validation/destinations/amazon_audience.json +++ b/test/data/validation/destinations/amazon_audience.json @@ -22,9 +22,12 @@ "testTitle": "With missing accountId", "config": { "rudderAccountId": "test-host", - "audienceId": "test-audience-id" + "audienceId": "test-audience-id", + "advertiserId": "" }, "result": false, - "err": [" must have required property 'advertiserId'"] + "err": [ + "advertiserId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$\"" + ] } ] From fd93674da9723841e9a74e6ea78b23df5abb11d3 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Wed, 18 Sep 2024 18:59:24 +0530 Subject: [PATCH 04/10] fix: tag input --- .../destinations/amazon_audience/schema.json | 6 +++--- .../destinations/amazon_audience/ui-config.json | 12 ++++++------ .../validation/destinations/amazon_audience.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/configurations/destinations/amazon_audience/schema.json b/src/configurations/destinations/amazon_audience/schema.json index 1e272bee6..b6b9f1330 100644 --- a/src/configurations/destinations/amazon_audience/schema.json +++ b/src/configurations/destinations/amazon_audience/schema.json @@ -6,12 +6,12 @@ "properties": { "authServer": { "type": "string", - "enum": ["NA"], - "default": "NA" + "enum": ["North America"], + "default": "North America" }, "advertiserId": { "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$" + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,150})$" }, "externalAudienceId": { "type": "string", diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json index 87fd3f584..7a2048904 100644 --- a/src/configurations/destinations/amazon_audience/ui-config.json +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -36,10 +36,10 @@ "options": [ { "name": "North America", - "value": "NA" + "value": "North America" } ], - "default": "NA" + "default": "North America" } ] } @@ -68,12 +68,11 @@ "note": "Manage the settings for your destination", "sections": [ { - "title": "Destination settings", - "note": "Configure advanced destination-specific settings here", - "icon": "settings", "groups": [ { "title": "Optional configuration settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", "fields": [ { "type": "checkbox", @@ -89,6 +88,7 @@ }, { "title": "Optional Audience Creation Configuration settings", + "icon": "settings", "fields": [ { "configKey": "externalAudienceId", @@ -130,7 +130,7 @@ ], "default": [ { - "traits": "US" + "country": "US" } ] } diff --git a/test/data/validation/destinations/amazon_audience.json b/test/data/validation/destinations/amazon_audience.json index 14524238a..2033585c0 100644 --- a/test/data/validation/destinations/amazon_audience.json +++ b/test/data/validation/destinations/amazon_audience.json @@ -27,7 +27,7 @@ }, "result": false, "err": [ - "advertiserId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,50})$\"" + "advertiserId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,150})$\"" ] } ] From c9aa2c632897e22edad9cee777eb40780073340c Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:02:54 +0530 Subject: [PATCH 05/10] chore: update src/configurations/destinations/amazon_audience/ui-config.json Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> --- src/configurations/destinations/amazon_audience/ui-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json index 7a2048904..0da9c78b9 100644 --- a/src/configurations/destinations/amazon_audience/ui-config.json +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -31,7 +31,7 @@ { "type": "singleSelect", "label": "Authorization servers", - "note": " Support for more servers will be supported soon", + "note": " Support for more servers will be added soon", "configKey": "authServer", "options": [ { From 4972d80fc02dd57fcda11a310e805d49e7de7f28 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Wed, 9 Oct 2024 10:43:36 +0530 Subject: [PATCH 06/10] chore: address comments --- .../destinations/amazon_audience/db-config.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/configurations/destinations/amazon_audience/db-config.json b/src/configurations/destinations/amazon_audience/db-config.json index 535c31e97..42545f2e3 100644 --- a/src/configurations/destinations/amazon_audience/db-config.json +++ b/src/configurations/destinations/amazon_audience/db-config.json @@ -5,9 +5,8 @@ "auth": { "type": "OAuth", "role": "amazon_audience", "rudderScopes": ["delivery"] }, "transformAtV1": "router", "excludeKeys": [], - "supportedSourceTypes": ["cloud", "warehouse"], + "supportedSourceTypes": [ "warehouse"], "supportedConnectionModes": { - "cloud": ["cloud"], "warehouse": ["cloud"] }, "isAudienceSupported": true, @@ -26,7 +25,6 @@ "dataSourceCountry", "enableHash" ], - "cloud": ["connectionMode", "consentManagement"], "warehouse": ["connectionMode", "consentManagement"] }, "secretKeys": [], From 3bd84a52c5d35e24678a19ec7f5b2a4130101531 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Wed, 9 Oct 2024 10:52:55 +0530 Subject: [PATCH 07/10] fix: consents --- .../amazon_audience/db-config.json | 3 ++- .../destinations/amazon_audience/schema.json | 12 +++++++++ .../amazon_audience/ui-config.json | 26 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/configurations/destinations/amazon_audience/db-config.json b/src/configurations/destinations/amazon_audience/db-config.json index 42545f2e3..9cc00d2ee 100644 --- a/src/configurations/destinations/amazon_audience/db-config.json +++ b/src/configurations/destinations/amazon_audience/db-config.json @@ -23,7 +23,8 @@ "externalAudienceId", "ttl", "dataSourceCountry", - "enableHash" + "enableHash", + "oneTrustCookieCategories" ], "warehouse": ["connectionMode", "consentManagement"] }, diff --git a/src/configurations/destinations/amazon_audience/schema.json b/src/configurations/destinations/amazon_audience/schema.json index b6b9f1330..09ec33567 100644 --- a/src/configurations/destinations/amazon_audience/schema.json +++ b/src/configurations/destinations/amazon_audience/schema.json @@ -37,6 +37,18 @@ } } }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json index 0da9c78b9..92d9e417d 100644 --- a/src/configurations/destinations/amazon_audience/ui-config.json +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -135,6 +135,32 @@ ] } ] + }, + { + "title": "OneTrust cookie consent settings", + "note": [ + "Enter your OneTrust category names if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" + }, + "about RudderStack's OneTrust Consent Manager feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Cookie category name", + "note": "Input your OneTrust category names by pressing 'Enter' after each entry", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: Credit card visit", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ] } ] } From 278b35ac53bfc196446cdc2c5ae63661278549d6 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Wed, 9 Oct 2024 12:07:21 +0530 Subject: [PATCH 08/10] fix: consents+1 --- .../amazon_audience/db-config.json | 1 + .../destinations/amazon_audience/schema.json | 51 +++++++++ .../amazon_audience/ui-config.json | 103 ++++++++++++++++-- 3 files changed, 147 insertions(+), 8 deletions(-) diff --git a/src/configurations/destinations/amazon_audience/db-config.json b/src/configurations/destinations/amazon_audience/db-config.json index 9cc00d2ee..d3623c16d 100644 --- a/src/configurations/destinations/amazon_audience/db-config.json +++ b/src/configurations/destinations/amazon_audience/db-config.json @@ -14,6 +14,7 @@ "syncBehaviours": ["mirror"], "disableJsonMapper": true, "supportsVisualMapper": true, + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], "destConfig": { "defaultConfig": [ "rudderAccountId", diff --git a/src/configurations/destinations/amazon_audience/schema.json b/src/configurations/destinations/amazon_audience/schema.json index 09ec33567..32ab9cf56 100644 --- a/src/configurations/destinations/amazon_audience/schema.json +++ b/src/configurations/destinations/amazon_audience/schema.json @@ -49,6 +49,57 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json index 92d9e417d..5d91f2246 100644 --- a/src/configurations/destinations/amazon_audience/ui-config.json +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -135,25 +135,32 @@ ] } ] - }, + } + ] + }, + { + "title": "Other settings", + "note": "Configure advanced RudderStack features here", + "icon": "otherSettings", + "groups": [ { - "title": "OneTrust cookie consent settings", + "title": "OneTrust consent settings", "note": [ - "Enter your OneTrust category names if you have them configured. ", + "Enter your OneTrust consent category IDs if you have them configured. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", { "text": "Learn more ", - "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" }, - "about RudderStack's OneTrust Consent Manager feature." + "about RudderStack's OneTrust Consent Management feature." ], "fields": [ { "type": "tagInput", - "label": "Cookie category name", - "note": "Input your OneTrust category names by pressing 'Enter' after each entry", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", "configKey": "oneTrustCookieCategories", "tagKey": "oneTrustCookieCategory", - "placeholder": "e.g: Credit card visit", + "placeholder": "e.g: C0001", "default": [ { "oneTrustCookieCategory": "" @@ -171,6 +178,86 @@ "title": "Web SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } From 941cf61ad0d913ba961c687c5c8a16584da89b9a Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Wed, 9 Oct 2024 12:32:15 +0530 Subject: [PATCH 09/10] fix: consents+2 --- .../amazon_audience/db-config.json | 12 +++-- .../destinations/amazon_audience/schema.json | 36 +++++++++++--- .../amazon_audience/ui-config.json | 47 +++++++++++++++++-- 3 files changed, 79 insertions(+), 16 deletions(-) diff --git a/src/configurations/destinations/amazon_audience/db-config.json b/src/configurations/destinations/amazon_audience/db-config.json index d3623c16d..7ea203fc4 100644 --- a/src/configurations/destinations/amazon_audience/db-config.json +++ b/src/configurations/destinations/amazon_audience/db-config.json @@ -5,7 +5,7 @@ "auth": { "type": "OAuth", "role": "amazon_audience", "rudderScopes": ["delivery"] }, "transformAtV1": "router", "excludeKeys": [], - "supportedSourceTypes": [ "warehouse"], + "supportedSourceTypes": ["warehouse"], "supportedConnectionModes": { "warehouse": ["cloud"] }, @@ -24,10 +24,14 @@ "externalAudienceId", "ttl", "dataSourceCountry", - "enableHash", - "oneTrustCookieCategories" + "enableHash" ], - "warehouse": ["connectionMode", "consentManagement"] + "warehouse": [ + "oneTrustCookieCategories", + "connectionMode", + "consentManagement", + "ketchConsentPurposes" + ] }, "secretKeys": [], "supportedMessageTypes": { "cloud": ["record"] } diff --git a/src/configurations/destinations/amazon_audience/schema.json b/src/configurations/destinations/amazon_audience/schema.json index 32ab9cf56..e06a702c1 100644 --- a/src/configurations/destinations/amazon_audience/schema.json +++ b/src/configurations/destinations/amazon_audience/schema.json @@ -38,13 +38,18 @@ } }, "oneTrustCookieCategories": { - "type": "array", - "items": { - "type": "object", - "properties": { - "oneTrustCookieCategory": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + "type": "object", + "properties": { + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } } } } @@ -100,6 +105,23 @@ } } }, + "ketchConsentPurposes": { + "type": "object", + "properties": { + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json index 5d91f2246..ad974857f 100644 --- a/src/configurations/destinations/amazon_audience/ui-config.json +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -78,7 +78,7 @@ "type": "checkbox", "label": "Enable user data hashing", "note": [ - "Enabling this will hash all the user data before sending it to X(Twitter)", + "Enabling this will hash all the user data before sending it to Amazon Audience", "Do not enable it if you already pass hash data to rudderstack" ], "configKey": "enableHash", @@ -124,7 +124,7 @@ "note": [ "Refer below link for more info", { - "text": "Time To live", + "text": "Data Source Countries", "link": "https://advertising.amazon.com/API/docs/en-us/guides/amazon-marketing-cloud/audiences/audience-management-service#:~:text=a%20given%20invocation.-,Note,-The%20time%2Dto" } ], @@ -156,8 +156,8 @@ "fields": [ { "type": "tagInput", - "label": "Consent categories", - "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "label": "OneTrust consent category IDs", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", "configKey": "oneTrustCookieCategories", "tagKey": "oneTrustCookieCategory", "placeholder": "e.g: C0001", @@ -165,7 +165,19 @@ { "oneTrustCookieCategory": "" } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -209,6 +221,31 @@ "default": "oneTrust", "required": true }, + { + "type": "tagInput", + "label": "Ketch consent purpose IDs", + "note": "Input your Ketch consent purpose IDs by pressing 'Enter' after each entry.", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "placeholder": "e.g: marketing", + "default": [ + { + "purpose": "" + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, { "type": "singleSelect", "label": "the required consent logic", From eaa93d3d605f0970c7a4a44db9867fbdc87fb295 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Wed, 9 Oct 2024 16:10:11 +0530 Subject: [PATCH 10/10] chore: remove extra line from ui config --- src/configurations/destinations/amazon_audience/ui-config.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json index ad974857f..86ccce9c6 100644 --- a/src/configurations/destinations/amazon_audience/ui-config.json +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -1,5 +1,4 @@ { - "description": "GENERATED CODE DO NOT EDIT", "uiConfig": { "baseTemplate": [ {