Why the VTS Web Request Block Is Transforming Your E‑Learning Modules
For training managers, instructional designers, or HR leaders, two key challenges often recur in digital learning: data reliability (tracking, compliance, governance) and the customization of learning paths (profiles, permissions, goals). The VTS Web Request Block connects your experiences to your key systems — LMS/LRS, HRIS, CRM, BI tools, or internal platforms — and enables real-time data flow: scores, progress, quiz results, xAPI traces, path unlocking, and proof of learning. With VTS Editor, you can create connected, dynamic, and measurable modules without any technical skills.
Practically speaking, this API connector performs HTTP calls to your services: you provide the URL, authentication headers, method (GET/POST/POST Raw), the maximum timeout, and whether the scenario waits for the response. The response is stored in a VTS Editor variable to power your graph using Conditions, update Score/Progress, trigger Badges, or display targeted Messages.
In this article, you’ll learn how to configure the block step by step, apply it to five real-life use cases, and then secure and validate your integrations using simple best practices.
Step-by-Step Configuration of the VTS Web Request Block
Define the Endpoint and Authentication
Start with your service’s URL – for example: https://api.your-domain.com/v1/events
or https://.../users/{userId}/score
. Variables in curly braces are replaced at runtime by their corresponding VTS values (userId
, sessionId
, lang
, score
, etc.). On the security side, most APIs require headers such as:
Authorization: Bearer {token}
(OAuth2/JWT)x-api-key: {apiKey}
(dedicated API key)Content-Type: application/json
when sending JSON (POST Raw)- Custom headers:
locale
,version
,correlation-id
(for your logs), etc.
Best practice: store your secrets (token
, apiKey
) in variables initialized at the beginning of the module via an authentication request, rather than hard-coding them. This reduces risks and eases key rotation.
Select the Right Submission Method
- GET to retrieve data (profile, permissions, content, configuration). Parameters go in the URL:
?userId={userId}&lang={lang}
. - POST with key=value parameters for simple submissions (score, status, duration) when the endpoint expects form-encoded data.
- POST Raw to send structured JSON or XML content. JSON example:
{"userId":"{userId}","score":{score},"status":"completed","timestamp":"{isoNow}"}
. Since VTS Editor injects variables using{ }
, define custom delimiters if your content includes many special characters to avoid conflicts.
Insert Variables and Store the Response
You can insert variables anywhere — in the URL, headers, parameters, or body. In the VTS Web Request block configuration, choose a target variable (e.g., result
) to store the raw response. The scenario can then use result
in Conditions, Message, Score, Progress, etc., and instantly adapt the learning path.
Control the Flow: Wait, Timeout, and Outputs
The block provides two outputs: success (response received) and error (failure/timeout). By enabling “Wait for Request Completion”, the graph pauses until the response is received; otherwise, the experience continues during the call (asynchronous). Set a realistic timeout (5 to 10s) to avoid unnecessary blocking. Always provide a fallback route: instructional message, “Try again” button (with Counter + Wait), or an offline mode (local resources).
Read and Use the Response
- JSON:
fromJson(result)
converts the text response into dictionaries/lists. Then accessfromJson(result).data.score
orfromJson(result).status
. Before using a key, always verify it exists (via Conditions). - Regular Expressions:
regexMatch(result, "pattern")
to validate a format;extractText(result, "pattern", 1)
to extract a value from non-JSON responses. - Numeric:
toInteger(result)
if the API returns a plain number, ortoInteger(extractText(...))
to convert a string to an integer.
A Robust Graph Template
A proven flow involves chaining Web Request → Conditions → Feedback/Actions:
- On success: check for required fields; update Score/Progress/Badges; display a confirmation message.
- On error: inform the learner (“unstable connection” vs. “service unavailable”), offer a “Retry” button with a Counter to limit attempts, and plan an alternate path (Local resources, partial access).
- Desktop option: log a trace using the Recap block (error code, timestamp) to facilitate support.
Tip: group your “mini-chain” of calls (auth, send, read) into a Group set as a Function, then call it using Function Call from different scenes. This improves readability and maintainability.
High-Impact Use Cases with the VTS Web Request Block
Send Scores and Progress to Your LMS/LRS or Business Service
Goal: centralize tracking, trigger HR rules, and feed BI. At the end of a quiz or key scene, send a JSON POST Raw with userId
, scenarioId
, overall score, scores by skill, status (passed/failed
), time, and ISO timestamp. If successful, use Progress (completed + passed), assign a Badge and, if needed, unlock premium content via Check Score. On error, display a message and suggest a retry. For deployment and analytics, explore VTS Perform.
Retrieve Up-to-Date Content in Real Time
Goal: maintain your content without republishing. A GET such as /procedures?context={job}&lang={lang}
returns a JSON with titles and steps. Parse it with fromJson(result)
to populate lists, then inject that content into a Message, a Slideshow, or Clickable Zones. Perfect for frequently changing procedures (safety, compliance, offerings): you shorten update times. For your modules, see our formats for gamified e-learning modules.
Registration, Attendance, and Lightweight Proof of Learning
Goal: easily track engagement. Configure a webhook (Google Apps Script, Make, Zapier) and send a POST with name, email, entry/exit time, score, and IP (if your DPO authorizes). The response may include a registration ID: display it, and if generating a certificate, open the link via Open Web Page. To get started quickly, request a demonstration of VTS Editor.
Conditional Unlocking via Server-Side Verification
Goal: control access to sensitive or premium content. The learner enters a code via a Numerical Keypad; you validate it server-side via the VTS Web Request block. On success: Flag access_premium = True
, a Menu displays bonus chapters. On failure: clear message, increment of a Counter for retry attempts, and a remediation path. Useful for monetization, regulatory prerequisites, or restricted access (e.g., managers).
Centralized Rankings and Draws to Create Challenge
Goal: foster learner competition and ensure consistent randomization. Read a central seed to drive the randomness of your variables and make puzzles comparable. At the end of the journey, post scores, then retrieve a leaderboard to display. This format works great for sales challenges, safety days, or internal events. Be inspired by our client cases.
Security and Performance Best Practices for the VTS Web Request Block
Secure Your Calls
- Always use HTTPS; never HTTP.
- Do not expose secrets in the module. Better: use a middleware service to authenticate the user (JWT, OAuth2), sign requests to your internal services, and filter data.
- Minimize personal data (GDPR). Where possible, use an anonymous ID (
userHash
) rather than a named email. - Handle key/token rotation and session expiration.
- Document purpose, legal basis, and retention period in your GDPR register; inform learners if data is transferred to external services. See our privacy policy.
Ensure Experience Reliability
- Realistic timeout (5–10s) and always connect the “error” output.
- Retry policy with wait times (e.g. 1s then 5s) and attempt limits using a Counter.
- Helpful messaging: differentiate between network errors (“unstable connection, please try again”) and server issues (“service temporarily unavailable”).
- Alternative mode: enable Modify Resources to display a PDF or local procedure; notify with a Message.
Optimize Performance
- Only send/receive what’s essential; use pagination (
page
,limit
) on reads. - Cache “stable” responses in variables during the session (FAQ, code lists) to avoid frequent calls.
- Group sends: post at the end of a section rather than after each micro-action.
- Avoid calling the VTS Editor API Connector in loops or across multiple scene entries; centralize at the start/end of a sequence.
Comply with IS Constraints
- If your network requires a proxy/firewall, align with IT (whitelist Serious Factory domains, proxy setup). Test in a staging environment before production.
- On iOS/Android/Web, anticipate network limits and test your timeout behavior.
Test and Diagnose Quickly
- Preview (F5) and open the Variables Status window: you’ll see the raw response (
result
) and your parsed variables in real time. - Validate your JSON beforehand. In the module, safely access fields after
fromJson
by checking their presence via Conditions. - For non-JSON responses, start from a sample and stabilize your regular expression patterns (
regexMatch
/extractText
) before generalizing. - On desktop, use the Recap block to log steps and errors (code, message, timestamp) and speed up support.
Take Action: Connect VTS Editor to Your APIs
The VTS Web Request Block opens your modules to real enterprise data. Associated with the Score/Progress, Flags/Conditions, Badge, Message, or Menu blocks, it enables the design of adaptive, auditable scenarios driven by your systems. For training managers, this means robust tracking; for instructional designers, vibrant content; for HR, a scalable foundation. Try the suite for free: Try Virtual Training Suite.
Quick Deployment Checklist
- Identify the target API endpoints (auth, read, write) and clarify the minimum required data (GDPR).
- Secure access (HTTPS, tokens, middleware if needed).
- Prototype a first GET profile in VTS Editor; display the result in a Message.
- Parse the response (
fromJson
, regex) and route with Conditions. - Handle errors (timeout, retry, clear message, fallback mode).
- Test in a sandbox with sample data; measure latency and error rates.
- Industrialize: encapsulate reusable flows in Function; track usage and iterate. Need help? Check out our training & support services.
Go Further
- Centralize distribution, authentication and analytics with VTS Perform; badges and statistics sync automatically.
- Use Variables as a local cache: to customize calls (language, context), share status between scenarios, or control randomness via a server seed.
- Export in SCORM for your LMS and complement tracking with targeted Web Requests (business KPIs, attendance, validations).
- Explore our solutions and inspiring cases: Serious Factory.
References and Useful Resources
- Gamification and Learning Performance: Hamari, J., Koivisto, J., & Sarsa, H. (2014). Does Gamification Work? A Literature Review. HICSS. Read on IEEE Xplore.
- Learning Analytics Overview: Society for Learning Analytics Research, Handbook of Learning Analytics (2nd ed.). Access the Handbook.
- Learning Tracking with xAPI: Advanced Distributed Learning Initiative. Experience API Introduction.
- VTS Data-Driven Engagement: Manpower Academy. Client case.