The user can save a letter template. They can use parameters like {CompanyEmail} {CustomerFirstName} etc in the template
Then when we sent the letter it will give the attributes to the letter template before it sends the letter. It needs to dynamically resolve the correct attributes not showing {CompanyEmail} .
I have like 35 diff {Attributes} I want to resolve. The only solution I can think of is a shit ton of find and replaces… Seems there must be a better and more scalable and faster way to do this?
Thoughts. @tylerboodman usually has tips and tricks on this…?
But you want it easier to read you could make a custom event that takes in the whole Letter-Record’s Text and have another parameter for what the Find and another parameter for what to Replace it with. then within the custom event return the whole text with the replaced value. then chain together the custom events instead and you can rename the custom event trigger actions
Your best bet is to use/build a plugin or in my case, I just ran a script with Toolbox. Just so happens I had one in my sandbox for testing. You can just turn the script into a plugin just to make it easier.