diff --git a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts index f6cab1e7..83b19025 100644 --- a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts +++ b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts @@ -1576,6 +1576,7 @@ private async sendButtonList(to: string, buttons: string[]) { return 'No marketing templates found.'; } + // Log YAML formatted data console.log(GBUtil.toYAML(marketingTemplates)); const latestTemplate = marketingTemplates[0]; const templateId = latestTemplate.id; @@ -1595,7 +1596,9 @@ private async sendButtonList(to: string, buttons: string[]) { throw new Error(analyticsData.error?.message || 'Failed to fetch analytics'); } + // Log YAML formatted analytics data console.log(GBUtil.toYAML(analyticsData)); + const dataPoints = analyticsData.template_analytics?.data[0]?.data_points || []; if (dataPoints.length === 0) { return 'No analytics data available for the specified template.';