Pass-through integration for local government · records are never stored System status1-559-251-7767Sentra familySign in
SentraBridgeIntegration platform
ExampleTemplate

311 triage: route every request to the right system

Cleans and checks changed 311 requests, sends bad ones to a data-quality sub-flow, checks the city database to see if each is new, then routes new potholes, lights and trees to Scheduler crews, code cases to the ArcGIS map, and the rest to an SFTP file. Changed requests are upserted into the database with map points, and a summary by department is emailed.

This flow

18 steps

StartsOn a schedule
SystemsSentra 311, Sentra Scheduler, PostgreSQL / PostGIS, Esri ArcGIS feature layer, SFTP server
Branches4
Stored recordsNone: pass-through
§ The flow

The whole flow, as it appears on the canvas.

Scroll sideways on small screens. Colors show the kind of step: start, read, change, decide, write.

Flow diagram: 311 triage: route every request to the right systemCleans and checks changed 311 requests, sends bad ones to a data-quality sub-flow, checks the city database to see if each is new, then routes new potholes, lights and trees to Scheduler crews, code cases to the ArcGIS map, and the rest to an SFTP file. Changed requests are upserted into the database with map points, and a summary by department is emailed.Every 15 minutesOn a scheduleChanged 311 requestsGet records · Sentra 311Clean and checkApply rulesData quality alertRun another flowCount by departmentSummarizeAlready in the database?Look up in database · PostgreSQLEmail operationsSend emailNew request?If / elseCrew work?If / elseName like the columnsMap fieldsShape as a crew visitMap fieldsCode enforcement?If / elseUpdate the database copyWrite to database · PostgreSQLCreate Scheduler visitSend records · Sentra SchedulerMap attributesMap fieldsEverything else to SFTPWrite file · SFTPMake map pointMake map pointAdd to the code-casemapSend records · ArcGISInvalidYesYesNoYesNoNo
StartReadFilesDatabaseChangeDecideWriteAct
§ Step by step

What each step does.

  1. 01 · Start · On a schedule

    Every 15 minutes

    • Every 15 minutes (workspace time zone)

    Then: Changed 311 requests

  2. 02 · Read · Get records · Sentra 311

    Changed 311 requests

    • Reads Service requests from Sentra 311
    • Only records changed since the last good run
    • At most 1,000 records per run

    Then: Clean and check

  3. 03 · Change · Apply rules

    Clean and check

    • description: collapse
    • department: copy dept_code
    • dept_code: translate with the value map Department codes
    • address: required (else “No address”)
    • lat: is number (else “No map location”)
    • Records that fail a check leave by the Invalid output

    Then: Already in the database?; Count by department; Invalid → Data quality alert

  4. 04 · Change · Summarize

    Count by department

    • Counts records by dept_code

    Then: Email operations

  5. 05 · Database · Look up in database · PostgreSQL / PostGIS

    Already in the database?

    • Looks for a row in service_requests where request_id matches {{id}}
    • Saves it on the record as existing

    Then: New request?

  6. 06 · Act · Run another flow

    Data quality alert

  7. 07 · Act · Send email

    Email operations

  8. 08 · Decide · If / else

    New request?

    • Yes when existing is empty

    Then: Yes → Crew work?; No → Name like the columns

  9. 09 · Decide · If / else

    Crew work?

    • Yes when category is one of Pothole, Streetlight out, Tree down

    Then: Yes → Shape as a crew visit; No → Code enforcement?

  10. 10 · Change · Map fields

    Name like the columns

    • Shapes each record into 11 fields: request_id, number, category, department, status, address, description, created_at, updated_at, lat…

    Then: Update the database copy

  11. 11 · Change · Map fields

    Shape as a crew visit

    • Shapes each record into 6 fields: description, site_address, crew_id, priority, external_ref, scheduled_for

    Then: Create Scheduler visit

  12. 12 · Decide · If / else

    Code enforcement?

    • Yes when department is Code Enforcement

    Then: Yes → Map attributes; No → Everything else to SFTP

  13. 13 · Database · Write to database · PostgreSQL / PostGIS

    Update the database copy

    • Upserts rows in service_requests keyed on request_id
    • Builds a map point in geom (SRID 4326)
  14. 14 · Write · Send records · Sentra Scheduler

    Create Scheduler visit

    • Creates Visits in Sentra Scheduler
  15. 15 · Change · Map fields

    Map attributes

    • Shapes each record into 6 fields: ref, status, address, category, lat, lng

    Then: Make map point

  16. 16 · Files · Write file · SFTP server

    Everything else to SFTP

    • Writes CSV file other-311-{{ $today }}.csv to outbox
    • One file with every record
  17. 17 · Database · Make map point

    Make map point

    • Builds an ArcGIS map point from lat and lng
    • Drops records without coordinates

    Then: Add to the code-case map

  18. 18 · Write · Send records · Esri ArcGIS feature layer

    Add to the code-case map

    • Creates Features in Esri ArcGIS feature layer
§ Value maps

Code tables that ship with it.

Each client edits its own copy, so one template fits every municipality.

Department codes
fromto
Public WorksPW
Code EnforcementCE
ParksPRK
UtilitiesUTL
SanitationSAN
Department names to the finance system's codes. Unknown values: GEN
§ Systems

Connectors used

Swap any of them for another system with the same kind of data.

Run this flow on your systems.

We'll set up a workspace with your systems in a sandbox and build your first flow with you.