Procedures are custom scripts that are run on our servers. They are similar to Validations, but are triggered manually instead of when a submission is saved or created. Procedures can be triggered with a HTTP POST Request by scripts or external services. Procedures are included with our Development Plan.
Listing Procedures
From the Form Editor, click the Options link in the menu bar at the top. Click the Procedures option in the sidebar to open a list of Procedures for the current form.
Creating Procedures
To create a new Procedure, click the Add a New Procedure button. If you have any existing procedures, you can edit them by clicking on their names.
Enter your Procedure's Name and Endpoint, then write your code in the editor. The endpoint is the last section of the URL used to trigger the procedure, which is:
https://{{organization}}.sonadier.io/api/rest/v1/forms/{{form}}/procedures/{{procedure_endpoint}}
Replace {{organization}} with your organization's subdomain, {{form}} with your form's 10-character permalink, and {{procedure_endpoint}} with your procedure's endpoint. When you've finished writing your code, save your procedure with the Save Procedure button in the top right. At the time of writing, additional options for permissions and authorization of procedures are under development.
Scheduling Procedures with Intervals
Procedures can be run automatically at repeated intervals. To set up an automatic interval from the Procedure Editor, open the Advanced tab in the menu bar and change the Interval field. At the time of writing, procedures can be run:
- Every Fifteen Minutes
- Every Thirty Minutes
- Every Hour
- Every Day
- Every Week
- Every Month