I recently obtained my first American nonprofit client for my tax receipting application. Very exciting, as all my previous clients were Canadian.
The app allows you to create multiple receipt templates and you can use automation to assign a template to a specific opportunity.
As observed during the discovery process, this US client uses a “thank you letter code”. The code is determined using a complex process, and based on this code, a receipt template needs to be selected.
There were 38 different codes, stored in a field on the opportunity. Thus 38 receipt templates were needed, one per code.
Rather than hardcode which template is selected from this code, a data-driven architecture was implemented.
This meant
- Creating a custom object called “Receipt Template Mapping”
- Adding a field to store the thank you letter code (picklist)
- Adding a field to store the receipt template (lookup)
- Creating a record-triggered flow, so that when the code is set or changed, the appropriate template is chosen and saved on the opportunity
This approach made it super easy for the client to add or update mappings without having to modify any automations.
The takeaway
Whenever designing something, see if it makes sense to use a data-driven approach. Although it will take longer to set up, your client will thank you in the long run.