Skip to content

Ensure bsuid is included and add tracking fields#1236

Open
japarradev wants to merge 34 commits into
codigoencasa:builderbot-devfrom
japarradev:builderbot
Open

Ensure bsuid is included and add tracking fields#1236
japarradev wants to merge 34 commits into
codigoencasa:builderbot-devfrom
japarradev:builderbot

Conversation

@japarradev

Copy link
Copy Markdown

Que tipo de Pull Request es?

  • Mejoras
  • Bug
  • Docs / tests

Descripción

Se ha modificado el ciclo de vida y la estructura del contexto del proveedor de Meta (provider-meta) para mejorar la trazabilidad y atribución de los mensajes entrantes, especialmente aquellos derivados de campañas publicitarias.

🚀 Cambios introducidos:

  1. Inclusión implícita de BSUID: Se asegura de forma automática que el identificador único con alcance comercial (Business-Scoped User ID - BSUID) esté presente en el ciclo de vida del flujo del proveedor de Meta, previniendo fallos o pérdidas de contexto cuando este valor venga ausente en ciertos payloads nativos de la API de Meta.

  2. Soporte para Atribución de Anuncios (Click-to-WhatsApp Ads):
    Se extendieron las propiedades de almacenamiento del contexto del proveedor para mapear y capturar de forma nativa los siguientes metadatos críticos de referidos:

    • source_id: El identificador de origen del anuncio o canal.
    • ctwa_clid: El ID de clic del anuncio de Facebook/Instagram (Click-to-WhatsApp Ads Click ID).

claude and others added 30 commits March 26, 2026 10:08
…integration

Introduces a new plugin category (packages/plugins/) and the first plugin: @builderbot/plugin-chatwoot.
The plugin automatically creates inboxes, saves contacts, and syncs conversations with Chatwoot
using a simple DX: createChatwootPlugin({ token, url, accountId }) + chatwoot.attach(bot).

https://claude.ai/code/session_01KYzSLXHCUPi1G8rR6GDcKm
…t-plugin-package-pm1iX

feat(plugin-chatwoot): add Chatwoot plugin package for automatic CRM integration
… note (PTT)

- sendAudio() now auto-converts MP3/WAV/etc to OGG/Opus using utils.convertAudio()
- All audio messages now sent with voice: true for PTT (green bubble) instead of audio file (orange)
- sendMedia() no longer double-converts audio (removed MP3 intermediate step)
- Updated tests for new behavior

Fixes audio arriving as 'orange file' instead of voice note
fix(provider-baileys): fallback @lid JID when remoteJidAlt is absent …
Ensure the BSUID is implicitly included in the Meta provider
lifecycle when it is missing from the incoming payload, and extend
the provider context structure to capture new tracking properties
from Click-to-WhatsApp ads, specifically mapping source_id and
ctwa_clid (ads click ID) to support granular referral attribution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants