Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/brand-concierge/brand-concierge-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ const BC_UI_EN = {
const BC_LOCALES = {
es: {
language: 'es-ES',
// Spanish Brand Concierge datastream (same IMS org as the default). Routes /es/ conversations
// to the Spanish concierge/manifest instead of the default English datastream.
datastreamId: '3098f7cc-36bb-4965-bea3-6e80fc59571e',
ui: {
triggerAriaLabel: 'Abrir el asistente de IA',
triggerAsk: 'Hacer una pregunta',
Expand Down Expand Up @@ -249,6 +252,9 @@ export function resolveBrandConciergeConfig(lang) {
...brandConciergeConfig.metadata,
...(overlay.language ? { language: overlay.language } : {}),
},
// Locale-specific Edge datastream, consumed in brand-concierge.js; falls back to the
// default bcDatastreamId when a locale defines none.
...(overlay.datastreamId ? { datastreamId: overlay.datastreamId } : {}),
};
}

Expand Down
8 changes: 6 additions & 2 deletions scripts/brand-concierge/brand-concierge.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,13 +862,17 @@ export async function initBrandConcierge() {
activeLang = getPathDetails().lang;
activeConfig = resolveBrandConciergeConfig(activeLang);

// Route to the locale's Brand Concierge datastream (e.g. the Spanish concierge on /es/),
// falling back to the default datastream for locales without an override.
const datastreamId = activeConfig.datastreamId ?? bcDatastreamId;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

activeConfig (with this new datastreamId key) is later spread wholesale into stylingConfigurations in getBootstrapOptions() (line 445), which only strips out stickySession and ui before forwarding the rest to the third-party BC web client via concierge.bootstrap().

Since resolveBrandConciergeConfig() now puts datastreamId at the top level of the returned config (brand-concierge-config.js:257), for the es locale it rides along into stylingConfigurations and gets sent to window.adobe.concierge.bootstrap() as if it were a styling/text value — it isn't destructured out the way ui is. English is unaffected (no datastreamId in the base config), so this is scoped to the new es path.

Likely harmless if the web client ignores unknown keys, but it's an unintended leak of internal routing config into the third-party client payload. Consider destructuring datastreamId out in getBootstrapOptions() alongside ui, or keeping it out of the resolveBrandConciergeConfig() return shape (e.g. a separate lookup) so it can't leak into stylingConfigurations.


createMountPoint();
injectAlloyStub();

try {
log('[BC] loading Web SDK (alloyBC instance)', { bcEdgeDomain, bcDatastreamId });
log('[BC] loading Web SDK (alloyBC instance)', { bcEdgeDomain, datastreamId, locale: activeLang });
await loadScript(bcAlloySdkUrl);
await configureWebSdk(bcDatastreamId, bcOrgId, bcEdgeDomain);
await configureWebSdk(datastreamId, bcOrgId, bcEdgeDomain);
log('[BC] Web SDK configured');

log('[BC] loading Web Client', bcWebClientUrl);
Expand Down
Loading