I’m working with a client who’s had a very difficult time updating their outgoing emails and SMS messages. And no wonder, the previous consultant set them up this way.

Emails used Visualforce pages, with tons of extra html and css syntax. It looks like they were written using a free online editor, and then copied+pasted in Salesforce.

Within a few minutes, I converted them to Lightning Email Templates (LET) and Enhanced Letterheads. Now editing them is as simple as updating a Word document.

One of the original emails also contained order information. Since LETs don’t support related objects, I proposed creating and adding a .pdf to the email.

There’s a relatively new and open-source document generator available. It works well for smaller organizations that don’t want to use a heavy or expensive document generator. It needs a little finessing, but I recommend it.

SMSs were hardcoded in apex, and the Twilio connection configuration was also hardcoded.

Within a few more minutes (and using AI), I converted them to LETs as well. Named Credentials stored the Twilio connection information.

The takeaway
If users need to modify something, don’t hardcode it. There are many great options to allow them to more easily edit content.

Category:
Salesforce