From 8af7a6332661aeb45aae82fd054f2b895b0e93c7 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Tue, 1 Aug 2023 16:44:50 +0530 Subject: [PATCH 1/6] feat: active campaign hybrid mode --- .../active_campaign/db-config.json | 19 +- .../destinations/active_campaign/schema.json | 12 ++ .../active_campaign/ui-config.json | 200 ++++++++++++------ 3 files changed, 165 insertions(+), 66 deletions(-) diff --git a/src/configurations/destinations/active_campaign/db-config.json b/src/configurations/destinations/active_campaign/db-config.json index 21d932cc1..8c3313c53 100644 --- a/src/configurations/destinations/active_campaign/db-config.json +++ b/src/configurations/destinations/active_campaign/db-config.json @@ -22,8 +22,25 @@ "shopify" ], "supportedMessageTypes": ["identify", "page", "screen", "track"], + "supportedConnectionModes": { + "android": ["cloud", "device"], + "web": ["cloud", "device", "hybrid"], + "ios": ["cloud", "device"], + "flutter": ["cloud", "device"], + "reactnative": ["cloud", "device"] + }, + "hybridModeCloudEventsFilter": { + "web": { + "messageType": ["track", "group", "identify"] + } + }, "destConfig": { - "defaultConfig": ["apiUrl", "apiKey", "eventKey", "actid", "oneTrustCookieCategories"] + "defaultConfig": ["apiUrl", "apiKey", "eventKey", "actid", "oneTrustCookieCategories"], + "android": ["useNativeSDK", "connectionMode"], + "ios": ["useNativeSDK", "connectionMode"], + "reactnative": ["useNativeSDK", "connectionMode"], + "flutter": ["useNativeSDK", "connectionMode"], + "web": ["useNativeSDK", "connectionMode"] }, "secretKeys": ["apiKey", "eventKey", "actid"] } diff --git a/src/configurations/destinations/active_campaign/schema.json b/src/configurations/destinations/active_campaign/schema.json index bda1a3e51..84ecf1223 100644 --- a/src/configurations/destinations/active_campaign/schema.json +++ b/src/configurations/destinations/active_campaign/schema.json @@ -28,6 +28,18 @@ } } } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { "type": "boolean" } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "web": { "type": "string", "enum": ["cloud", "device", "hybrid"] } + } } } } diff --git a/src/configurations/destinations/active_campaign/ui-config.json b/src/configurations/destinations/active_campaign/ui-config.json index e3b2bc399..f29f2044c 100644 --- a/src/configurations/destinations/active_campaign/ui-config.json +++ b/src/configurations/destinations/active_campaign/ui-config.json @@ -1,70 +1,140 @@ { - "uiConfig": [ - { - "title": "Connection Settings", + "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": [ + { + "type": "textInput", + "label": "API Key", + "value": "apiKey", + "regex": ".*", + "required": true, + "placeholder": "e.g. c59e3838caa934b535c1fd342dfds23452dfcccf95c16787304e7a0c0e8051b326451bb2", + "secret": true, + "footerNote": "Your API Access Key" + }, + { + "type": "textInput", + "label": "API Url", + "configKey": "apiUrl", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$", + "regexErrorMessage": "Invalid URL", + "required": true, + "placeholder": "e.g. https://accountname.api-us1.com", + "note": "Your API Access URL" + } + ] + } + ] + }, + { + "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": "Event Settings", + "icon": "file", + "fields": [ + { + "type": "textInput", + "label": "Event Key", + "configKey": "eventKey", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Event Key", + "required": false, + "placeholder": "e.g. c2a856fddc721350dec4fbbc2e5c43a7ddfaaa03", + "secret": true, + "note": "Your Event Key" + }, + { + "type": "textInput", + "label": "ActID", + "configKey": "actid", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid ActID", + "required": false, + "placeholder": "e.g. 276450567", + "secret": true, + "note": "Your ActId" + } + ] + } + ] + }, + { + "title": "Other settings", + "note": "Configure advanced RudderStack features here", + "icon": "otherSettings", + "groups": [ + { + "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": "" + } + ] + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "SDK settings", + "note": "not visible in the ui", "fields": [ - { - "type": "textInput", - "label": "API Url", - "value": "apiUrl", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$", - "regexErrorMessage": "Invalid URL", - "required": true, - "placeholder": "e.g. https://accountname.api-us1.com", - "footerNote": "Your API Access URL" - }, - { - "type": "textInput", - "label": "API Key", - "value": "apiKey", - "regex": ".*", - "required": true, - "placeholder": "e.g. c59e3838caa934b535c1fd342dfds23452dfcccf95c16787304e7a0c0e8051b326451bb2", - "secret": true, - "footerNote": "Your API Access Key" - }, - { - "type": "textInput", - "label": "Event Key", - "value": "eventKey", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Event Key", - "required": false, - "placeholder": "e.g. c2a856fddc721350dec4fbbc2e5c43a7ddfaaa03", - "secret": true, - "footerNote": "Your Event Key" - }, - { - "type": "textInput", - "label": "ActID", - "value": "actid", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid ActID", - "required": false, - "placeholder": "e.g. 276450567", - "secret": true, - "footerNote": "Your ActId" - } - ] - }, - { - "title": "Consent Settings", - "fields": [ - { - "type": "dynamicCustomForm", - "value": "oneTrustCookieCategories", - "label": "OneTrust Cookie Categories", - "customFields": [ - { - "type": "textInput", - "placeholder": "Marketing", - "value": "oneTrustCookieCategory", - "label": "Category Name/ID", - "required": false - } - ] - } ] } - ] + } } + From 668907ce09ffe9b893c643d9246175482b9404d9 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Mon, 21 Aug 2023 18:19:08 +0530 Subject: [PATCH 2/6] fix: updated configKey value --- .../destinations/active_campaign/db-config.json | 6 +----- .../destinations/active_campaign/ui-config.json | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/configurations/destinations/active_campaign/db-config.json b/src/configurations/destinations/active_campaign/db-config.json index 8c3313c53..3ffdc1e23 100644 --- a/src/configurations/destinations/active_campaign/db-config.json +++ b/src/configurations/destinations/active_campaign/db-config.json @@ -6,7 +6,7 @@ "transformAtV1": "router", "saveDestinationResponse": true, "isAudienceSupported": true, - "includeKeys": ["oneTrustCookieCategories"], + "includeKeys": ["oneTrustCookieCategories", "connectionMode"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -36,10 +36,6 @@ }, "destConfig": { "defaultConfig": ["apiUrl", "apiKey", "eventKey", "actid", "oneTrustCookieCategories"], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"], - "reactnative": ["useNativeSDK", "connectionMode"], - "flutter": ["useNativeSDK", "connectionMode"], "web": ["useNativeSDK", "connectionMode"] }, "secretKeys": ["apiKey", "eventKey", "actid"] diff --git a/src/configurations/destinations/active_campaign/ui-config.json b/src/configurations/destinations/active_campaign/ui-config.json index f29f2044c..7da487760 100644 --- a/src/configurations/destinations/active_campaign/ui-config.json +++ b/src/configurations/destinations/active_campaign/ui-config.json @@ -15,7 +15,7 @@ { "type": "textInput", "label": "API Key", - "value": "apiKey", + "configKey": "apiKey", "regex": ".*", "required": true, "placeholder": "e.g. c59e3838caa934b535c1fd342dfds23452dfcccf95c16787304e7a0c0e8051b326451bb2", From 3bcef19937835008ba96dafc75367dd897e3e652 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Thu, 31 Aug 2023 18:18:57 +0530 Subject: [PATCH 3/6] chore: pass actId to web sdk --- src/configurations/destinations/active_campaign/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/active_campaign/db-config.json b/src/configurations/destinations/active_campaign/db-config.json index 3ffdc1e23..33f9fb77c 100644 --- a/src/configurations/destinations/active_campaign/db-config.json +++ b/src/configurations/destinations/active_campaign/db-config.json @@ -6,7 +6,7 @@ "transformAtV1": "router", "saveDestinationResponse": true, "isAudienceSupported": true, - "includeKeys": ["oneTrustCookieCategories", "connectionMode"], + "includeKeys": ["oneTrustCookieCategories", "connectionMode", "actid"], "excludeKeys": [], "supportedSourceTypes": [ "android", From cd8ec3fa14074489ba0382c337dd63fd5dd56f3f Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Fri, 1 Sep 2023 17:11:21 +0530 Subject: [PATCH 4/6] fix: script schema.json fix --- src/configurations/destinations/active_campaign/schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/configurations/destinations/active_campaign/schema.json b/src/configurations/destinations/active_campaign/schema.json index 84ecf1223..56c0af9e8 100644 --- a/src/configurations/destinations/active_campaign/schema.json +++ b/src/configurations/destinations/active_campaign/schema.json @@ -41,6 +41,7 @@ "web": { "type": "string", "enum": ["cloud", "device", "hybrid"] } } } - } + }, + "additionalProperties": false } } From ddc7f9b8496e2edddef8e08b3b7c295ecd051ddd Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Fri, 1 Sep 2023 17:19:49 +0530 Subject: [PATCH 5/6] fix: script schema.json fix --- src/configurations/destinations/active_campaign/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/active_campaign/schema.json b/src/configurations/destinations/active_campaign/schema.json index 56c0af9e8..f536fbe0f 100644 --- a/src/configurations/destinations/active_campaign/schema.json +++ b/src/configurations/destinations/active_campaign/schema.json @@ -42,6 +42,6 @@ } } }, - "additionalProperties": false + "additionalProperties": true } } From 7780150dd920a193b2e427fd2821afe9aae35289 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Mon, 4 Sep 2023 11:23:51 +0530 Subject: [PATCH 6/6] fix: cloud mode filters --- src/configurations/destinations/active_campaign/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/active_campaign/db-config.json b/src/configurations/destinations/active_campaign/db-config.json index 33f9fb77c..116bd33db 100644 --- a/src/configurations/destinations/active_campaign/db-config.json +++ b/src/configurations/destinations/active_campaign/db-config.json @@ -31,7 +31,7 @@ }, "hybridModeCloudEventsFilter": { "web": { - "messageType": ["track", "group", "identify"] + "messageType": ["track", "screen", "identify"] } }, "destConfig": {