From 84bcfb1e3f6e26dc0817b79fb6b14fb91754824a Mon Sep 17 00:00:00 2001 From: gs-nwolfe Date: Fri, 13 Sep 2024 16:52:38 -0700 Subject: [PATCH] feat: Gainsight PX integration --- .../gainsight_px_browser/db-config.json | 35 +++ .../gainsight_px_browser/schema.json | 3 + .../gainsight_px_browser/ui-config.json | 231 ++++++++++++++++++ 3 files changed, 269 insertions(+) create mode 100644 src/configurations/destinations/gainsight_px_browser/db-config.json create mode 100644 src/configurations/destinations/gainsight_px_browser/schema.json create mode 100644 src/configurations/destinations/gainsight_px_browser/ui-config.json diff --git a/src/configurations/destinations/gainsight_px_browser/db-config.json b/src/configurations/destinations/gainsight_px_browser/db-config.json new file mode 100644 index 000000000..6ca084515 --- /dev/null +++ b/src/configurations/destinations/gainsight_px_browser/db-config.json @@ -0,0 +1,35 @@ +{ + "name": "GAINSIGHT_PX_BROWSER", + "displayName": "Gainsight PX", + "config": { + "transformAtV1": "processor", + "saveDestinationResponse": true, + "includeKeys": [ + "apiKey", + "dataCenter", + "extraConfig", + "blacklistedEvents", + "whitelistedEvents", + "oneTrustCookieCategories", + "eventFilteringOption", + "consentManagement" + ], + "excludeKeys": [], + "supportedSourceTypes": ["web"], + "supportedConnectionModes": { "web": ["device"] }, + "supportedMessageTypes": { "device": { "web": ["identify", "track", "group"] } }, + "destConfig": { + "defaultConfig": [ + "apiKey", + "dataCenter", + "extraConfig", + "blacklistedEvents", + "whitelistedEvents", + "eventFilteringOption", + "oneTrustCookieCategories" + ], + "web": ["useNativeSDK", "connectionMode", "consentManagement"] + }, + "secretKeys": ["apiKey"] + } +} diff --git a/src/configurations/destinations/gainsight_px_browser/schema.json b/src/configurations/destinations/gainsight_px_browser/schema.json new file mode 100644 index 000000000..fddffa4cc --- /dev/null +++ b/src/configurations/destinations/gainsight_px_browser/schema.json @@ -0,0 +1,3 @@ +{ + "configSchema": null +} diff --git a/src/configurations/destinations/gainsight_px_browser/ui-config.json b/src/configurations/destinations/gainsight_px_browser/ui-config.json new file mode 100644 index 000000000..41e5f59dc --- /dev/null +++ b/src/configurations/destinations/gainsight_px_browser/ui-config.json @@ -0,0 +1,231 @@ +{ + "uiConfig": [ + { + "title": "Connection Settings", + "fields": [ + { + "type": "textInput", + "label": "Product Key", + "value": "productKey", + "regex": "^(AP-[A-Z]{10,30}-[1-2](-[1-4])*)$", + "regexErrorMessage": "Invalid Product KEY", + "required": true, + "placeholder": "e.g: AP-XXXXXXXXXXXXX-2", + "secret": true + }, + { + "type": "singleSelect", + "label": "Data Center", + "value": "dataCenter", + "required": true, + "placeholder": "e.g: AP-XXXXXXXXXXXXX-2", + "options": [ + { + "name": "US", + "value": "US" + }, + { + "name": "EU", + "value": "EU" + }, + { + "name": "US2", + "value": "US2" + } + ], + "defaultOption": { + "name": "US", + "value": "US" + } + }, + { + "type": "textareaInput", + "subType": "JSON", + "label": "Additional Configuration", + "labelNote": "Optional configuration flags as Javascript object", + "value": "extraConfig", + "regex": ".*", + "required": false + } + ] + }, + { + "title": "Native SDK", + "fields": [ + { + "type": "defaultCheckbox", + "label": "Use device-mode to send events", + "value": "useNativeSDK", + "default": true + } + ] + }, + { + "title": "Client-side Events Filtering", + "sectionNote": "Applicable only for device-mode integrations. If enabled, it works only with either allowlisted or denylisted events", + "fields": [ + { + "type": "singleSelect", + "value": "eventFilteringOption", + "required": false, + "options": [ + { + "name": "Disable", + "value": "disable" + }, + { + "name": "Allowlist", + "value": "whitelistedEvents" + }, + { + "name": "Denylist", + "value": "blacklistedEvents" + } + ], + "defaultOption": { + "name": "Disable", + "value": "disable" + } + }, + { + "type": "dynamicCustomForm", + "value": "whitelistedEvents", + "label": "Allowlist", + "customFields": [ + { + "type": "textInput", + "value": "eventName", + "required": false, + "placeholder": "e.g: Anonymous Page Visit" + } + ] + }, + { + "type": "dynamicCustomForm", + "value": "blacklistedEvents", + "label": "Denylist", + "customFields": [ + { + "type": "textInput", + "value": "eventName", + "required": false, + "placeholder": "e.g: Credit Card Added" + } + ] + } + ] + }, + { + "title": "Consent Settings", + "fields": [ + { + "type": "dynamicCustomForm", + "value": "oneTrustCookieCategories", + "label": "OneTrust Consent Categories", + "footerNote": "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.", + "customFields": [ + { + "type": "textInput", + "placeholder": "C0001", + "value": "oneTrustCookieCategory", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "label": "Category ID", + "required": false + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "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.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] + } + ] +}