Workflow Logs
Contents |
Workflow Logs
Each screen can be tagged with a "log" which translates to the activity log on the web portal.
Logs are generally sent from the device when the user opens the screen on the device, you can use either preset or create your own logs.
Create your own
To create your own log you can specify a string of upto 255 chars
"log":"Viewed Dynamic Screen 1"
Note: any activities that contain underscores will automatically have their underscores removed when viewing on the portal. The activities remain unchagned when using the API
Preset
Preset activites are avaliable that when triggered also update the job status on the web portal to reflect the jobs progress. These preset activies are also used for filtering and working out job durations / arrival times.
You should make sure you include some of the key log's in your workflow so the users on the portal can see the job progress correctly.
preset activities can be identifed as they are all in upper case and seperated with underscores.
"log":"JOB_STARTED"
Automatically generated logs
Some screens also send their own logs as part of their functionality, for example the parts screen will manage its own "Part added" and "Part removed" as will putting the job on hold etc.
Note regarding trigger / duplication
As default the application prevents the same activity being sent twice in a row, this prevents duplication when rotating the screen.
If for some reason this is desired behaviour then you can add an attribute to the screen to disable this functionality
"attributes":{"allow_duplicate_logs":true}
Examples
{
"id":"view_job",
"order_id":0,
"name":"View Job",
"preset_activity":"ViewJobActivity",
"log":"JOB_VIEWED",
}
{
"id":"view_job",
"order_id":0,
"name":"View Job",
"preset_activity":"ViewJobActivity",
"log":"Dynamic activity log",
"attributes":{"allow_duplicate_logs":true}
}
Default Logs
JOB_VIEWED JOB_STARTED JOB_ARRIVED JOB_ASSESSED PART_ADDED JOB_FINISHED SAFETY_CHECKED SATISFACTION JOB_COMPLETED JOB_PHOTO_TAKEN JOB_FAILED PHONED_CUSTOMER ON_HOLD PART_REMOVED OFF_HOLD APPLIANCE_ADDED FAULT_ADDED PRE_JOB_CHECKED FAULT_REMOVED PHONED_OWNER CALLED_CUSTOMER_1 CALLED_CUSTOMER_2 PHOTO_TAKEN JOB_FAULT_PHOTO_TAKEN PRE_JOB_CHECK_PHOTO_TAKEN JOB_NOTES_ADDED ASSET_SCANNED ASSET_PHOTO_TAKEN JOB_UNASSIGNED POST_JOB_CHECK_PHOTO_TAKEN