ASU RFI Middleware
At ASU, we host many different RFI (request for information) forms across a large number of websites. The purpose of these forms are to allow a student to express interest in a particular school or major; this interest is registered and the student signed up to receive information about that interest in the future. Each RFI form is slightly different, yet they all need to perform essentially the same task. The ASU RFI Middleware was created to support this.
The RFI Middleware exposes a web service endpoint that any RFI form may call upon submission. This endpoint collects the submitted information and saves it to the middleware's database. It then commences to processing it, running it through a complex set of deduplication logic. At each step of the way, the RFI Middleware communicates with ASU's Salesforce org, querying for information to be used in deduplicating, or inserting data about the student and his or her interest.
The Middleware was built in Drupal and is powered by the Salesforce Query Drupal module. The complex logic is defined in-code but is written in such a way as to be easily configurable - all processing actions are defined in a single object which may easily be modified to accomodate future logic.
Access to the Middleware is tightly controlled using an application protocol. A shared secret key is used to authenticate incoming requests, with some sanity checking to ensure that a key has not been stolen or reused in an inappropriate context. The middleware is set up to communicate with the remote form software to ensure that the secret key is never visible to a human.
All submissions are logged and processed using Drupal's Cron, ensuring that the module can process the high volume of RFI submissions that ASU receives each day.
Note that this was the first of many middlewares built and hosted in Drupal that use the Salesforce Query module to communicate with Salesforce. All subsequent middlewares are based off of the RFI middleware's template.