From 2a2c48fabbd8917f82458d0114a69d08bef975fb Mon Sep 17 00:00:00 2001 From: raj pandey Date: Thu, 26 Feb 2026 23:10:29 +0530 Subject: [PATCH] fix: added filter for lytics audience --- packages/contentstack-variants/src/import/audiences.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/contentstack-variants/src/import/audiences.ts b/packages/contentstack-variants/src/import/audiences.ts index 02b3857eda..d4f682859f 100644 --- a/packages/contentstack-variants/src/import/audiences.ts +++ b/packages/contentstack-variants/src/import/audiences.ts @@ -89,9 +89,16 @@ export default class Audiences extends PersonalizationAdapter { } log.debug(`Processing audience: ${name} (${uid})`, this.config.context); + // Skip Lytics audiences - they cannot be created via API (synced from Lytics) + if ((audience as any).source?.toUpperCase() === 'LYTICS') { + log.debug(`Skipping Lytics audience: ${name} (${uid})`, this.config.context); + this.updateProgress(true, `audience: ${name} (skipped - Lytics)`, undefined, PROCESS_NAMES.AUDIENCES); + continue; + } + try { //check whether reference attributes exists or not - if (definition.rules?.length) { + if (definition?.rules?.length) { log.debug( `Processing ${definition.rules.length} definition rules for audience: ${name}`, this.config.context,