Skip to main content
Version: 6.14

StaySafe 4 Lone Worker Integration

StaySafe 4 is a UK based lone worker safety app and monitoring platform. StaySafe 4 integrates with Patriot via the LogSignal endpoint of the Patriot JSON API (v3), allowing StaySafe Hub to post lone worker session and alert events directly into Patriot in real-time. No dedicated Patriot receiver task is required for this integration.

Prerequisites​

How the Integration Works​

StaySafe 4 can be configured on a per organisation or per team basis to POST a payload to a Patriot LogSignal URL. A new request contains one event and is sent in real-time each time an event is triggered on a user's device.

Example payload:

{
"clientNo": "3176BASE99",
"notes": "Session start note",
"rawData": "Event timestamp 2020-06-03T12:39:20Z",
"typeNo": 1,
"longitude": -0.126416,
"latitude": 51.503186,
"media": "url:https://hub.staysafeapp.net/map/session/61b2b584-4c08-412f-8910-b476ca886c7e"
}
FieldDescription
clientNoThe Patriot Client No. the event should be logged against. See Linking StaySafe Users to Patriot Clients below.
notesAdditional notes logged with the signal. Not seen by operators.
rawDataAdditional raw event information, visible to operators in the expanded signal view.
typeNoThe Patriot event type number for the StaySafe event being reported. See Event Mapping below.
longitude / latitudeGPS location of the StaySafe user at the time of the event, if available.
mediaA link to the live StaySafe Hub map/session for the event, prefixed with url:.

See the JSON API Setup Tutorial for a full description of every field supported by the Patriot JSON API.

Linking StaySafe Users to Patriot Clients​

StaySafe device users are linked to Patriot clients via the Patriot Client No. This must be set against each user in StaySafe Hub, in the Custom Attributes section of their user profile.

See StaySafe's Response Partner Identification (Australia) help article for instructions on setting this Custom Attribute in StaySafe Hub.

Event Mapping​

StaySafe events are mapped to Patriot event types below. It is the Patriot typeNo which is passed across via the API.

NamePatriot typeNoDescription
Session Start1Create a new session
Session Extend2Extend an active session
Session End3End an active session
Position Update4Update location information
Session Expired Alert5A session expired
Panic Alert6A panic alert is triggered
Duress Alert7A duress alert is triggered
Battery Alert8A low battery alert is triggered
Non-Movement Alert9A non-movement alert is triggered
Missed Session Check-In10A session check-in expired
Session Check-In11A session check-in is triggered
Fall Detected12A fall detected alert is triggered
Start Driving13Start driving during a session
Stop Driving14Stop driving during a session
Driving Expired15Expected driving duration expired

JSON API Setup​

Set up a JSON API Security Group and User for StaySafe by following the JSON API Setup Tutorial, ensuring the "Log Signal" option is enabled on the Security Group.

Provide StaySafe with the LogSignal URL and the login details of the User you create, so they can configure the integration in StaySafe Hub.

Patriot Client Setup​

A Patriot client for StaySafe is added in the normal way from the Add New Client dialog in the Clients menu. The Client No. must match the Patriot Client No. entered against the user in StaySafe Hub (see Linking StaySafe Users to Patriot Clients above).

Events​

Clients need to be set up with a StaySafe Event Type Template on the Event Types tab, using the Event Mapping above. A copy of the StaySafe Event Type Template, ready for Patriot import, is available from Receivers & Format Templates.

Mapping​

If live tracking of StaySafe users is required, activate the "Mobile Client" check box on the Mapping tab. Please refer to Patriot's Mapping module documentation for more information. If you do not have the Mapping module registered, then you should refer to Lite Mapping.

More Information​