Skip to content

Commit

Permalink
fix: complete UI for bluecore
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Feb 13, 2024
1 parent 4178a76 commit e6680bf
Show file tree
Hide file tree
Showing 4 changed files with 409 additions and 65 deletions.
2 changes: 1 addition & 1 deletion src/configurations/destinations/bluecore/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"cloud": ["identify", "track"]
},
"destConfig": {
"defaultConfig": ["bluecoreNamespace", "oneTrustCookieCategories"]
"defaultConfig": ["bluecoreNamespace", "eventsMapping", "oneTrustCookieCategories"]
},
"secretKeys": ["bluecoreNamespace"]
}
Expand Down
18 changes: 17 additions & 1 deletion src/configurations/destinations/bluecore/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,23 @@
"properties": {
"bluecoreNamespace": {
"type": "string",
"pattern": ".*"
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$"
},
"eventsMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"to": {
"type": "string",
"enum": ["viewed_product", "search", "add_to_cart", "remove_from_cart", "purchase", "wishlist", ""]
}
}
}
},
"oneTrustCookieCategories": {
"type": "array",
Expand Down
279 changes: 243 additions & 36 deletions src/configurations/destinations/bluecore/ui-config.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,247 @@
{
"uiConfig": [
{
"title": "Connection Settings",
"fields": [
{
"type": "textInput",
"label": "Bluecore namespace",
"value": "bluecoreNamespace",
"regex": ".*",
"required": true,
"placeholder": "e.g. b4a29abXXXXc8a18acd920ec1e2e",
"secret": true,
"footerNote": "Get it from the url https://app.bluecore.com/admin/dashboard/<namespace>"
}
]
"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": "Bluecore namespace",
"note": "Get it from the url https://app.bluecore.com/admin/dashboard/<namespace>",
"configKey": "bluecoreNamespace",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$",
"secret": true,
"regexErrorMessage": "Invalid Namespace",
"placeholder": "e.g. dummy_namespace"
}
]
}
]
},
{
"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": "Other settings",
"note": "Configure advanced RudderStack features here",
"icon": "otherSettings",
"groups": [
{
"title": "Client-side event filtering",
"note": "Decide what events are allowed (allowlisting) and blocked (denylisting)",
"preRequisites": {
"fields": [
{
"configKey": "connectionModes.webDevice",
"value": true
},
{
"configKey": "connectionModes.mobileDevice",
"value": true
}
],
"condition": "or"
},
"fields": [
{
"type": "singleSelect",
"label": "Choose if you want to turn on events filtering:",
"configKey": "eventFilteringOption",
"note": "You must select either allowlist or denylist to enable events filtering",
"options": [
{
"label": "No events filtering",
"value": "disable"
},
{
"label": "Filter via allowlist",
"value": "whitelistedEvents"
},
{
"label": "Filter via denylist",
"value": "blacklistedEvents"
}
],
"default": "disable"
},
{
"type": "tagInput",
"label": "Allowlisted events",
"note": "Input separate events by pressing ‘Enter’.\nInput the events you want to allowlist.",
"configKey": "whitelistedEvents",
"tagKey": "eventName",
"placeholder": "e.g: Anonymous page visit",
"default": [
{
"eventName": ""
}
],
"preRequisites": {
"fields": [
{
"configKey": "eventFilteringOption",
"value": "whitelistedEvents"
}
]
}
},
{
"type": "tagInput",
"label": "Denylisted events",
"note": "Input separate events by pressing ‘Enter’.\nInput the events you want to denylist. ",
"configKey": "blacklistedEvents",
"tagKey": "eventName",
"placeholder": "e.g: Anonymous page visit",
"default": [
{
"eventName": ""
}
],
"preRequisites": {
"fields": [
{
"configKey": "eventFilteringOption",
"value": "blacklistedEvents"
}
]
}
}
]
},
{
"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": ""
}
]
}
]
}
]
}
]
},
{
"title": "Mappings",
"hideEditIcon": true,
"sections": [
{
"groups": [
{
"title": "Rudderstack to Bluecore Event Mappings",
"fields": [
{
"type": "redirect",
"redirectGroupKey": "bluecoreEventMapping",
"label": "Event mappings"
}
]
}
]
}
]
}
],
"redirectGroups": {
"bluecoreEventMapping": {
"fields": [
{
"type": "mapping",
"label": "Mapping to trigger the Rudderstack events with standard Bluecore events",
"configKey": "eventsMapping",
"default": [],
"columns": [
{
"type": "textInput",
"key": "from",
"label": "Event Name",
"placeholder": "e.g: Custom Purchase Event"
},
{
"type": "singleSelect",
"key": "to",
"label": "Bluecore Standard Ecommerce Event",
"placeholder": "e.g: purchase",
"options": [
{
"name": "Viewed Product",
"value": "viewed_product"
},
{
"name": "Search",
"value": "search"
},
{
"name": "Add to Cart",
"value": "add_to_cart"
},
{
"name": "Remove From Cart",
"value": "remove_from_cart"
},
{
"name": "Wishlist",
"value": "wishlist"
},
{
"name": "Purchase",
"value": "purchase"
}
]
}
]
}
]
}
},
{
"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
}
]
}
]
"sdkTemplate": {
"title": "Web SDK settings",
"note": "not visible in the ui",
"fields": []
}
]
}
}
Loading

0 comments on commit e6680bf

Please sign in to comment.