Select to view content in your preferred language

automatic workforce assignments

1060
2
05-15-2019 05:43 PM
JanaKaeppler1
Occasional Contributor

Hello GeoNet Community.

I wonder whether anyone would have experience in using automated processes in workforce. How would I achieve for workforce to automatically generate an unassigned assignment when a related Survey123 form has picked up certain data. My example here would be: A Survey123 form picks up identified welfare needs. As these needs get picked up an associated workforce project would then automatically create an unassigned assignment for each identified need? Is there a way this could be achieved? 

Many thanks!

Jana

0 Kudos
2 Replies
by Anonymous User
Not applicable

Hi Jana,

This is definitely possible but likely will involve some custom development. Basically you'll want to add a webhook to your survey that fires when a survey is submitted. You'll need to configure a web server to accept the payload from Survey123. When you receive the payload, you're web server will have to determine what to do, in this case you'll want it to create a new assignment in your workforce project. That web server will need to be publicly accessible. 

One possible way to do this is to use AWS Lambda with API Gateway. You would create some code as your lambda function and configure API gateway to expose that as a REST API. Then point your Survey123 webhook to this REST API.

Another option which is less ideal but possibly easier to implement is to have a script that runs on a schedule. It will check for new surveys in the feature layer and if there is a new survey it could create the Workforce assignment. 

We provide the Workforce Python API module that you may find useful, you certainly can use other tools/languages though. We have documented the Workforce schema and provided some information about automation here.

JanaKaeppler1
Occasional Contributor

Thanks Aaron, this is great advise and I will investigate these options.

Many thanks,

Jana

0 Kudos