Sponsored Campaigns – How‑To Guide
Step‑by‑step instructions for creating, managing and using Free Internet campaigns.
Feature flag: ensure FEATURE_FREE_INTERNET_CAMPAIGNS=1 is set in the backend environment. Admin endpoints and UI will only be available when the flag is enabled.
1) Concepts
- Campaign: Defines the sponsored product, corporate payer, discount/markup, and per‑device limit.
- Video: Media asset attached to a campaign. Supports
cdn, external, youtube, vimeo.
- Reservation: Short‑lived hold while a user watches; prevents overspend during bursts.
- Redemption: Successful completion that issued a voucher and charged the corporate account.
2) Create a Campaign
- Open Admin → Campaigns.
- Click Add campaign (if present) or use your API to seed initial data.
- Provide:
- Name
- Product: must exist under Products
- Corporate Customer Name: exactly as in Porta (resolved to
i_customer)
- Discount %, Verification Markup % (optional)
- Per‑device limit, Status (active to enable)
- Save. The backend will cache the corporate balance (inverted so positive means funds available).
3) Add/Manage Videos
- Select a campaign from the list.
- Scroll to the Videos section and click Add video.
- Enter video URL and choose the Source:
cdn/external: regular video file/stream. You can enable verification.
youtube/vimeo: embedded players; verification is automatically disabled.
- Optionally set acceptance criteria (required percent watched, etc.).
4) Refresh Balance
From a campaign row, use Refresh balance to pull the latest corporate balance from Porta. The system also attempts a just‑in‑time refresh when a campaign is borderline.
5) Completing a Campaign
When funds are exhausted or you want to stop the campaign, use Complete. This sets status to completed and removes it from eligibility checks.
6) Portal Flow (User Experience)
- Portal page calls
/api/campaigns/free-internet/available with FAS snapshot.
- If eligible, the backend creates a reservation and returns a watch token and video info.
- On completion, the portal calls
/complete. Backend charges corporate, issues a voucher, blocks it, records redemption, and records a session. AP access is enforced by OpenNDS AuthMon polling our backend (no direct push).
7) Troubleshooting
- No free option: ensure campaign status is
active, product is valid, balance is above threshold, and a video is active.
- Verification failed: check heartbeats and acceptance thresholds; consider disabling verification for testing.
- Porta errors: verify credentials and corporate
i_customer; use Refresh balance.
8) References
- Backend endpoints:
/api/campaigns/free-internet/*
- Flow document: free_internet_flow.md (developer oriented)
© INET Wi‑Fi Portal