| Name ⇅ | Surname ⇅ | DOB ⇅ |
|---|
| Column | Type | Default | Notes |
|---|---|---|---|
| PKId | AutoNumber | — | Used in BlobName construction |
| FileName | Text (255) | — | Original file name |
| FileExtension | Text (10) | — | .xlsx |
| BlobName | Text (500) | — | Set after blob upload |
| AddedBy | UserId | — | GetUserId() |
| CreatedOn | DateTime | — | CurrDateTime() |
| IsProcessed | Boolean | False | Set True on BPT completion |
| ProcessedOn | DateTime | NullDate() | Set on BPT completion |
Context: The Government of Jupiter has contracted a third-party vendor to conduct census field operations. Vendor agents collect survey data through their own portal and store it in a vendor-side database exposed via a REST API.
Requirement: As a System, every night at 10:00 PM, a background OutSystems Timer named SyncVendorSurveyData must run automatically. The timer calls the vendor API, fetches new survey records submitted since the last sync, validates each record, and inserts them into the Survey entity — avoiding duplicates.
Vendor API: POST https://labs.lowcademy.com/apis/survey_api.php
Requires headers: key: 6221474d-b1e0-448f-901a-3d01885d3122 and secret: Lc@Census2026#SecretKey!
Returns a JSON array of records: { "data": [ {"Name":"...","Surname":"...","DOB":"YYYY-MM-DD"} ] }
Implementation steps: (1) Create a Consume REST API in OutSystems pointing to the vendor endpoint. (2) Configure OnBeforeRequest to inject auth headers. (3) Create Server Action VendorSync_FetchAndInsert that calls the REST method, loops the response list, checks for duplicate (Name + Surname + DOB match), and inserts new records. (4) Attach this Server Action to the Timer action. (5) Set Timer schedule to Daily at 22:00 in Service Center. (6) Log each sync run in VendorSyncLog (RunAt, RecordsFetched, RecordsInserted, Status).