Select to view content in your preferred language

ArcGIS Online Hosted feature Service and View Webhooks

103
1
a month ago
DavidPike
MVP Notable Contributor

Hi all,

  • ArcGIS Online (AGOL) and Survey 123 - Private Survey (shared to AGOL group)
  • Submissions via S123 (I'm assuming updates go to Hosted Feature Layer (HFL)) and/or an API which updates the '_results' HFL  View
  • Webhooks set during testing on various iterations and combinations of the S123-side webhook, HFL and HFL view.
  • _results layer present to keep submissions private - even between group members (rather than replicate a survey for each sub-group, as it's not scalable or practical)
  • No _form results layer as this is published in an earlier S123 version - just parent HFL and _results HFL view

I'm having real issues testing a webhook (to send an email confirmation of user submission) from AGOL.  Users can submit records to a HFL _results view via an bespoke API - only the API can see the _results HFL view.

A webhook is set on this HFL view and works, although it seems to take 10-20 minutes to trigger for unknown reasons.

So the API submission emails work but are a bit delayed, but OK I can deal with that.

Next issue - email notification should also be sent for submissions via the S123 app.  This is where it gets confusing.  It seems with only the webhook set on the _results HFL View, some submissions trigger the View's webhook and some don't.  These ones are delayed by 4-6 hours if not more, and lead me to think there's some kind of synch check between the parent HFL and the HFL view, but I can't find any details about how this might be working (not to be confused with offline synch as that's disabled for all items).

and the next - OK, so let's put a webhook on the HFL and then that should trigger from S123 submissions (as that's what S123 is POSTing to right?),  again, temperamental and delayed.

next..  even if it works a charm on both, then this update synch process might start generated 2 confirmation emails.

next... OK let's set the S123 website-side webhook.  Now we're talking... that works almost instantly, but we still need the _results HFL view webhook to do emails for API submissions.  This is likely going to cause this double-email with its weird synch/triggering process. 

has anyone else felt my pain with these, any anecdotes, details, docs or interactions with support gurus from Esri who have shed light on this arcane webhook functionality?

Thanks for reading!

 

0 Kudos
1 Reply
ChristopherCounsell
MVP Regular Contributor

We use Survey123 for one-way submissions that generate emails without issue. Our workflow is:

  1. Create a Hosted Feature Layer View. Enable adds and set it so that users cannot see any features, even those they add.
  2. Create the survey in Connect targeting the above view. NEVER the Hosted Feature Layer as it makes access/permissions difficult to control. You can check the target item in XLXSForm settings sheet
  3. Create a new Scenario in Make with the Survey123 module and select watch survey. Use the payload of the survey + an email module to generate the messages.

If you are just using Survey123, you do not need to configure a webhook via the service REST API.

If you are not using Make / Power Automate, you can manually create a webhook via the survey123 website and put in a custom payload URL.

For both scenarios you do not need read access to the Hosted Feature Layer or a view. All the information will be in the payload.

https://doc.arcgis.com/en/survey123/browser/create-surveys/webhooks.htm#GUID-38D2604E-A428-4754-B0E7...

 

0 Kudos