Skip to content

feat(variables): add new system variables - #1546

Merged
viethung0o0 merged 1 commit into
mainfrom
feat/system-variables-chatrace-parity
Oct 26, 2026
Merged

viethung0o0 merged 1 commit into
mainfrom
feat/system-variables-chatrace-parity

Conversation

@viethung0o0

@viethung0o0 viethung0o0 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add 15 system variables: last_btt_title, empty, last_text_input, page_api_key, last_ad_headline, last_ad_body, last_story_id, booking_id, last_points, last_lead_id, last_form_id, last_form_name, last_adgroup_id, admin_name and admin_team_name.
  • Store the data they need: Instagram story id, WhatsApp ad body, and form, form name and ad group for Messenger Lead Ads. Older records render blank, with no backfill.
  • admin_name and admin_team_name resolve for flows sent from the inbox, and the sender is passed through flow jobs as an optional field. Teams are the sender's own, joined with ", ". The sender is not kept across a Wait step.
  • Database-backed variables are looked up only when used, and are left out of the Execute JavaScript input.
  • Add the new variables to the {{ picker, with translations for all locales.
  • Add three migrations: new columns, then two CONCURRENTLY index migrations. They need to be applied before the worker is deployed.
  • Add an opt-in test:db suite that runs signed webhooks through the real handlers against a throwaway database.

Verification

  • pnpm lint, db:check-drift and i18n:check
  • check-types for variables, business, database, worker, worker-config, sdk, messenger, whatsapp and builder
  • Unit tests for the same packages, and pnpm --filter worker test:db

@github-actions github-actions Bot added the feature New feature or request label Oct 23, 2026
@viethung0o0 viethung0o0 changed the title feat(variables): add missing Chatrace system variables feat(variables): add new system variables Oct 23, 2026
@viethung0o0
viethung0o0 force-pushed the feat/system-variables-chatrace-parity branch from e72c91f to 4b20a3a Compare October 23, 2026 12:38
@viethung0o0
viethung0o0 marked this pull request as ready for review October 24, 2026 10:55
@viethung0o0
viethung0o0 force-pushed the feat/system-variables-chatrace-parity branch from c8ba872 to d573397 Compare October 26, 2026 03:18
@viethung0o0
viethung0o0 merged commit caef459 into main Oct 26, 2026
4 checks passed
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants