Marketing · Digital games (lottery)
Embeds the external digital-games (lottery) management tool inside the back office using the URL configured on the centre’s lottery module.
| Area | Marketing |
| Routes | marketing.lottery |
| Centre modules | lottery |
| Staff levels | root · admin · manager · crmmanager · weboperator · owner |
| Models | lottery · module-lottery |
| UI label | title.header.marketing.lottery / menu.navbar.marketing.lottery |
| Coverage | 3 use cases · 1 happy · 2 failure |
How it works
A thin integration: the controller computes externalURL from the centre configuration and the template renders it in an iframe. Also referenced from the app-button manager as the lotteries MOF type and from the centre form, which exposes a lottery QR URL template (copyUrlLotteryQr). Because it is an embed, the back office has no visibility into failures inside the external tool.
Use cases
Why someone opens this (3)
- Running a scratch-card or spin-the-wheel game as part of a centre activity.
- Giving marketing staff one place to manage games without a second login.
- Linking an app button straight to a specific game.
Path map
flowchart LR F(["Digital games lottery"]):::feat F --> H1["Games tool opened in-app"]:::ok F -.-> X1["Module disabled or URL unset"]:::bad F -.-> X2["External tool unavailable"]:::bad classDef feat fill:#b0432c,stroke:#b0432c,color:#ffffff,font-weight:bold classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13
Happy paths
Games tool opened in-app
- Centre has the lottery module enabled with a configured URL.
- User opens Marketing → Digital games.
- The external tool loads in the iframe, authenticated by the embedded URL.
Failure paths
Module disabled or URL unset
Cause —
lotterymodule off or no URL configured.What happens —
module-lottery#canAccesshides the menu entry; with a blank URL the frame renders empty with no explanatory message.
External tool unavailable
Cause — Provider down or URL wrong.
What happens — No in-app error handling for iframe load failures; the fallback copy
error_browser_iframeonly covers browsers without iframe support.
QA checklist
Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.
- ✅ Games tool opened in-app
- ⛔ Module disabled or URL unset
- ⛔ External tool unavailable
Implementation
app/controllers/marketing/lottery.jsapp/routes/marketing/lottery.jsapp/models/lottery.jsapp/models/module-lottery.jsapp/abilities/module-lottery.js
Translation keys (5)
Key English title.header.marketing.lotteryDigital games menu.navbar.marketing.lotteryDigital games mof-type.digital-gamesDigital games modules-lotteryDigital games error_browser_iframeYour browser does not support iframes
Related
- Same area — Activity list & duplication · Activity editor (loyalty mechanics, rules & targeting) · Activity report & PDF · Activity campaigns (programme grouping) · Email campaign list, duplication & stop · Email campaign builder (wizard, A-B test, scheduling) · Fidcard · Present cards (Fideliza gift cards) · Book appointment
- Behind the same module — Activity editor (loyalty mechanics, rules & targeting)
Generated from doc/feature-inventory.json · id marketing-lottery · commit 276788ca6