ArcGIS Enterprise 11.1 introduces support for feature service and geoprocessing service webhooks. Service webhooks allow organizations to create automated and integrative workflows or modify existing workflows to be more efficient.
In their plenary demonstration, Lingtao and Bill explore the following ways an ArcGIS Enterprise organization using the Citizen Problem Reporter application can integrate the capabilities of service webhooks into their workflows:
- Leveraging feature service webhooks to automatically submit new work orders and send confirmation to the submitter
- Automating quality control for incoming work orders with geoprocessing service webhooks
Improve the request-to-work order pipeline using feature service webhooks
Since the Citizen Problem Reporter application provides community members 24/7 access to their city, the city needs to efficiently handle their incoming requests and submit accompanying work orders. Lingtao shows how the city can automate this process by integrating feature service webhooks into their workflow.
Creating a feature service webhook
Lingtao begins her demonstration by logging into the city’s ArcGIS Server Administrator API Directory to create a feature service webhook. She navigates to the feature service that powers the Citizen Problem Reporter app and creates a webhook that subscribes to the FeaturesCreated event trigger. A new feature is created whenever a new request is submitted through the reporter application, which triggers her webhook. Lingtao also sets the hook URL to point to the Power Automate Flow she created to act as the webhook receiver.
Now that she has created her feature service webhook, any new request submitted from the app will trigger the webhook and prompt her Flow into action.
Automating work order submissions with Power Automate
Lingtao’s Power Automate Flow sets off a series of events whenever her feature service webhook is triggered:
- It fetches the edits made from the request
- It creates a new work order in Microsoft Dynamics in a Submitted state
- It sends a confirmation email to the submitter. The email contains information about the request and a link to check the work order’s status.
Testing feature service webhook integration
Now that she has created her feature service webhook, Lingtao needs to confirm that its integrated successfully into the city’s workflow. She switches over to the Citizen Problem Reporter application on her phone and submits a new request, reporting on a fallen tree blocking a hiking trail.
After submitting her request, Lingtao shows that a new work order matching her request was created in Microsoft Dynamics and that she received a confirmation email for her submission. Her feature service webhook is working properly and the organization can now efficiently submit work order requests. She hands her presentation off to Bill, who shows how the city can leverage geoprocessing webhooks to automate the quality control on incoming work orders.
Automate quality control using geoprocessing service webhooks
Community members can use the Citizen Problem Reporter application to submit non-emergency requests whenever, and wherever, they are encountered. However, there are instances where community members may report on a non-emergency occurring outside of city limits, or multiple community members may submit a report for the same event. With these factors in mind, the city requires a form of quality control to ensure each request is unique and actionable for the city’s field teams. Bill shows how he created a geoprocessing service and webhook to efficiently handle this work with no human intervention.
Creating a geoprocessing service
Before his demonstration, Bill created a Python script that performs two key functions:
- It checks to see if the request was made within city limits
- It confirms the information included in the request’s category, request type, distance, and date isn’t the same as another work order.
He published this script tool as a geoprocessing service, which acts as the quality control for incoming work orders. Using a Power Automate Flow, this service runs each time a new work order record is inserted into the work order table.
Running the geoprocessing service
The Flow Bill created listens for new work order records being inserted into Microsoft Dynamics in a Submitted state. When a new record meets the criteria, the Flow runs the geoprocessing service.
While this Flow helps automate quality control, the work order system needs to know when the geoprocessing job is finished so that the work order’s status can be updated. To do this, Bill needs to leverage the capabilities of geoprocessing webhooks.
Creating a geoprocessing service webhook
Bill created a geoprocessing webhook for his quality control service, which triggers whenever the quality control job finishes. He also created a second Flow to act as the webhook receiver. Whenever the webhook triggers, his second Flow parses the webhook payload for job information and updates the work order record with its proper validation status.
With the geoprocessing service and its webhook in place, the work order system is now fully prepared to automatically validate Lingtao’s work order.
Testing geoprocessing webhook integration
When Lingtao submitted her request in the Citizen Problem Reporter app, a new work order was added to Microsoft Dynamics. When this happened, Bill’s first Flow ran the quality control geoprocessing service. Once the quality controls checks were performed, Bill’s webhook triggered and his second Flow updated her record with its proper validation status. Now that this workflow has run its course, Bill can refresh the Microsoft Dynamics work order dashboard to show that Lingtao’s work order has its status changed to Validated.
Conclusion
In their presentation, Lingtao and Bill showcased just two of the countless ways service webhooks integrate into an organization’s workflow. We cannot wait to see how you will integrate service webhooks into your workflows in the years to come.
For more information on service webhooks in ArcGIS Enterprise, or to learn more about all webhook types that Enterprise supports, use the links below to explore our documentation:
Did you miss the other features showcased in today’s plenary? Do you want to revisit the demonstrations from our talented coworkers? You can find the links to other companion blogs in our Dev Summit 2023 overview.
Commenting is not enabled for this article.