Thank you for the great webinar. I know how to create a webhook for Survey123 but can you tell me how you setup the webhook to create an assignment in Workforce?
Thank you,
Michelle
I can answer that one. The assignments in Workforce are managed through a feature service that gets automatically created with the Workforce project. You can add a work assignments by simply adding a feature to that feature service. To do that you call the applyEdits operation on the feature service. Below is a screen shot of how we setup Integromat to update the feature service:
And below is the json that we put into the adds key:
[{"geometry":{"x":{{1.feature.geometry.x}},"y":{{1.feature.geometry.y}},"spatialReference":{"wkid":{{1.feature.geometry.spatialReference.wkid}}}},"attributes":{"status":0,"description":"{{1.feature.attributes.damageFeature}} {{1.feature.attributes.assetID}} has the condition of {{1.feature.attributes.bridgeStatus}}. {{1.feature.attributes.featureComments}}
Bridge located on Route {{1.feature.attributes.routeID}} at measure {{1.feature.attributes.begin_Log}}. Inspected by {{1.feature.attributes.fieldInspector}} {{1.feature.attributes.fieldPhone}}.","notes":"","priority":null,"assignmentType":1,"workOrderId":null,"dueDate":null,"workerId":null,"location":"{{1.feature.attributes.assetID}} @ {{1.feature.attributes.routeID}} and {{1.feature.attributes.begin_Log}}","declinedComment":null,"assignedDate":null,"assignmentRead":null,"inProgressDate":null,"completedDate":null,"declinedDate":null,"pausedDate":null,"dispatcherId":1}}]
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.