Skip to content

Comments

plugin-flow-builder: resolve Whatsapp template for diferrents locales#3174

Open
Iru89 wants to merge 4 commits intomasterfrom
BLT-2190-plugin-flow-builder-resolve-whatsapp-template-using-locale
Open

plugin-flow-builder: resolve Whatsapp template for diferrents locales#3174
Iru89 wants to merge 4 commits intomasterfrom
BLT-2190-plugin-flow-builder-resolve-whatsapp-template-using-locale

Conversation

@Iru89
Copy link
Contributor

@Iru89 Iru89 commented Feb 20, 2026

Description

This PR adds locale-based resolution for WhatsApp templates in the Flow Builder plugin. Previously, WhatsApp template content was stored at a single level. Now, the content is organized by locale, allowing different template configurations per language.

Changes

New Interface: HtWhatsappTemplateContentByLocale

A new interface has been introduced to encapsulate locale-specific template content:

  • template: The WhatsApp template definition
  • header_variables: Optional header variables with type, values, and media
  • variable_values: Template variable values
  • url_variable_values: Optional URL variable values

Updated HtWhatsappTemplateNode Structure

The node content structure has been modified:

Before:

content: {
  template: HtWhatsAppTemplate
  header_variables?: {...}
  variable_values: Record<string, string>
  buttons: HtButton[]
  url_variable_values?: Record<string, string>
}

After:

content: {
  by_locale: Record<string, HtWhatsappTemplateContentByLocale>
  buttons: HtButton[]
}

Updated FlowWhatsappTemplate.fromHubtypeCMS

  • Now accepts a currentLocale parameter
  • Added getContentByLocale private method to resolve content based on the current locale
  • Throws an error if no content is found for the specified locale

Updated FlowFactory

  • Passes the current locale when creating FlowWhatsappTemplate instances

Notes

  • This is a breaking change in the CMS data structure. Ensure the Flow Builder CMS has been updated to provide the new by_locale structure before deploying.
  • Console logs are present for debugging - these should be removed before merging to production.

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@Iru89 Iru89 force-pushed the BLT-2190-plugin-flow-builder-resolve-whatsapp-template-using-locale branch from 7eeeaee to fc95550 Compare February 20, 2026 14:44
@Iru89 Iru89 changed the title WIP plugin-flow-builder: resolve Whatsapp template for diferrents locales Feb 20, 2026
@Iru89 Iru89 self-assigned this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant