For Training
This is internal engineering/ops process, not a product training topic — there's nothing to teach clinic users, pharmacy staff, or customers about this PR. The audience here is whoever administers the team's sandbox environments (typically engineering, occasionally whoever runs demos/training sessions on main).
How to teach someone to configure the main sandbox
- Where the config lives. GitHub → this repository → Settings → Environments → sandbox. It's a flat list of variables (visible to anyone with repo read access) and secrets (masked, write-only once set).
- How to scope a setting.
- Prefix
SANDBOX_ALL_<KEY>to apply to every branch this mechanism touches. - Prefix
SANDBOX_MAIN_<KEY>to apply only tomain. (For any other branch, uppercase the branch name and replace non-alphanumeric characters with_— e.g. a branch calleddemo/q3becomesSANDBOX_DEMO_Q3_<KEY>.) - A branch-specific variable always wins over
SANDBOX_ALL_for the same key.
- The five keys that mean something special. After stripping the prefix:
WHATSAPP,TWO_REGIONS,CRON,QUEUEare on/off toggles (accepted truthy values:1,true,yes,on, case-insensitive — anything else reads as false).SEEDsets the seed mode (richorbasic). Everything else becomes an environment variable injected into the app containers — walk through the full mapping in Environment-sourced settings. - How to apply it. Setting the variable alone does nothing until a redeploy runs. Go to Actions → Sandbox Ops, choose the target branch and the
redeployaction, and run it. (reseed,reset-data,destroy, andupdate-docsdon't read this configuration at all.) - How to confirm it worked. Open the
Sandbox Opsrun, expand the "Compose sandbox settings from thesandboxenvironment" step, and check the🧪 sandbox settings (from environment)log group — it lists resolved toggles and injected env variable names.
A good first exercise
Have a new team member set SANDBOX_MAIN_WHATSAPP=true as a plain variable (no secrets needed for the toggle itself), run a redeploy on main, and confirm the change by visiting Settings → Integrations → WhatsApp Bot on the deployed sandbox — before, it shows "Feature Disabled" (see the Walkthrough); after a successful redeploy with the toggle on, it should no longer show that screen.