AggieService Case Intake Form (POC Form)

NOTE: This is referencing the forms created for AG-836.

Overview

The AggieService Case Intake Form (POC Form) is the main form which funnels users to submit any number of actions which create cases in AggieService. Because of the legacy form creation tool and the multivariate, branching nature of the actions possible, the form relies on a complex stack of technologies to route cases to the proper forms with the proper information. More details can be found in AG-774 and AG-836.

Implementation

When a user navigates to the form, we ask them for some preliminary information, and the form has separate checkboxes which correspond to the choices available for each type of employee: Academic, Staff, and Student. Because of how FormAssembly works, creating a redirect as their documentation suggests from this form to the pursuant form chosen, while still passing along the user-submitted choices, would be impossible. 

Instead, we are using a Post Redirect connector which, despite saying it doesn't support 302 redirects, currently works. The redirect posts to an endpoint provided by AWS API Gateway which runs our AWS Lambda python code. The submitted form provides the information to the function, which goes into an S3 bucket and fetches the proper query string for the form to which the user should be taken. 

The routing table in the S3 bucket has the following fields:

  • name: This is the 'primary key' of the routing table. When this is found based on the information submitted by the user, we have the information needed for the rest of the routing. This is created as a combination of action_key, recordtype_key, and requesttype_key.
  • form: The ID of the form to which the user should be sent.
  • action: Whether the form is for an Academic, Staff, or Student
  • action_key: Slugified version of the above
  • recordtype: The appropriate RecordType API name for the operation
  • recordtype_key: Slugified version of the above
  • requesttype: The value of the request type to be chosen on the subsequent form. This has to match the Request Type's label in a case-sensitive manner.
  • requesttype_key: Slugified version of the above
  • action_field: The ID of the FormAssembly field for employee type
  • recordtype_field: The ID of the FormAssembly field for the record type
  • requesttype_field: The ID of the FormAssembly field for the request type

Maintenance

  • Whenever a new route on the POC form is added, the routing table in the AWS S3 bucket needs to be updated with the proper fields.
  • Whenever a request type label is changed in a form, the routing table in the AWS S3 bucket needs to be updated with a new name, requesttype, and requesttype_key.

Resources

The following resources were used to deliver this solution:

  • FormAssembly 5.0.0 with custom JS found in the AG-836 ticket.
  • AWS Lambda running routing code found here.
  • AWS API Gateway returning 302 redirect based on the information provided by the user as processed by the Lambda function.
  • AWS S3 bucket holding the routing table. The Bitbucket repo above has the latest version of this table.