arborrow / montserrat

A retreat management application written in Laravel
12 stars 4 forks source link

Mailgun: Implement processing of Gift Certificate Regristration #547

Closed arborrow closed 1 year ago

arborrow commented 1 year ago

When someone is using a gift certificate to register for a retreat, we need to pull the information out of the Squarespace email and see how to use it. To help ensure that the gift certificate number is correct, it may be a good idea to modify the Squarespace custom form to ask for the gift certificate year and then the number (rather than having text).

Fields to be extracted include: Subject: Form Submission - Gift Certificate Registration Gift Certificate Number: Please select the retreat would you like to attend: Title: Name: Address: Email: Mobile Phone: Home Phone: Work Phone: Emergency Contact: Emergency Contact Relationship: Emergency Contact Phone Number: Dietary Restrictions, Food Allergies or Other Special Needs: Room Preference: Preferred Language: Date of Birth: Parish: Comments / Questions:

I'm thinking this should result in the creation of a Squarespace Order to be verified and processed (correct person and retreat).

After the Squarespace Order has been processed, the gift certificate should be marked as having been applied/used for the retreat. Will need to check with finance about how to create the Donation (pledge) and/or payment. I think at that point, if it is a funded gift certificate that it can be created but again will want to make sure that the donation date and payment dates align to the finance workflow.

arborrow commented 1 year ago

I have coded the basic processing of a mailgun message for a Squarespace Gift Certificate Registration. This data comes from a form on the Squarespace on the Gift Certificates page which allows someone to claim or use a gift certificate to register for a retreat.

It may be worthwhile, the facilitate the processing of the data, to require the gift certificate year issued and number. That will prevent text data from being inserted and make it possible to link to the gift certificate record in the Polanco database. Prior to pushing to production, we will want to double check and verify that the Squarespace field names match what is listed in Polanco for that custom form.

I still need to work on how to properly display a Squarespace Order for a Gift Certificate Registration and also how to process it. The process should be similar to a regular order of verifying the correct retreatant and retreat. Then we will want to register the person, make touchpoints, etc. as normal. In addition, I need to check with Finance to see how best to create the Donation record and to see if we can determine the difference between a funded and unfunded gift certificate. Finally, we will want to update the gift certificate record to indicate that the certificate has in fact been used.