Plugin details
Performs search and replace repeatedly over a list of potential text placeholders.
This is more maintainable than a chain of :find & replace, but slightly more costly
The beauty of this plugin's ResolvePlaceholders function is that instead of using an ugly list of :find & replace clauses for every placeholder you might want, instead, you can have one master string in JSON that works for all your data types.
For example, in a Custom Event that takes in a template_string, a User and an Order, you can have one template string of:
"Welcome [UserFirstName],
Your order on [OrderDate] for [OrderAmount] was received.
Your tracking ID is [TrackingURL]"
Then, you can pass a parameter package of possible placeholders in a text field like:
{
"UserFirstName": "<insert dynamic field here>",
"OrderDate": "<insert dynamic field here>",
"OrderAmount": "<insert dynamic field here>",
"TrackingURL": "htps://usps.com/tracking/<insert dynamic field here>",
"Discount": "<insert dynamic field here>",
}
Note, in a case with 25 possible placeholders, it used 0.88 WU. The same placeholder list in a chain of :plug & replace takes 0.08 WU. In my app, I chose the chain :find & replace in the app that inspired this.