昨日 Twitterで呟いていたとおり、今日は新しい Lightning メールテンプレートのビルダー、
drag-and-drop content builder(ドラッグアンドドロップコンテンツビルダー) の使い方といじってみた感想について書きます。

そのまえにおさらい
現在、Salesforceには
Classicメールテンプレートと
Lightningメールテンプレートがあります。自動化機能には Classicメールテンプレートのみ使用できるので、社内向けの通知用テンプレートばかり作っていると、Lightningメールテンプレートを触る機会はあまりないかと思います。
キャンペーン機能などを使ってリードや取引先責任者へのメール送信を行っている場合は、よく使われているかもしれないですね。メールマーケティングで有名な
Pardot を管理されている方は、もうガンガン凝ったテンプレートを作られているのではないでしょうか。尊敬です
Classicメールテンプレートの例(テキスト)
作成場所:設定 > ホーム > メール > Classicメールテンプレート

Lightningメールテンプレートの例
作成場所:メールテンプレートタブ

はい、というわけで
権限の付与
ドラッグアンドドロップコンテンツビルダーが使えるように、権限セットでを作成してユーザに割り当てます。
今回必要な権限は、「
システム権限」の「
ドラッグアンドドロップコンテンツビルダーにアクセス」です。カタカナばっかり!
権限セットの作成
1.[ 設定(歯車) >ホーム > ユーザ >権限セット] の画面を開き、【新規】をクリックします。

2.表示ラベルとAPI参照名を入力します。「この権限セットを使用するユーザ種別の選択」は、権限セットを付与するユーザをライセンスで制限するときにのみ選択します。今回は特に指定せず、【保存】をクリックします。

3.画面を下へスクロールし、[ システム権限 ]をクリックします。

4.【編集】をクリックします。

5.「
ドラッグアンドドロップコンテンツビルダーにアクセス」にチェックを入れます。

6.【保存】をクリックすると、「権限変更確認」画面が表示されるので、再度【保存】をクリックします。

権限セットの割り当て
1.作成した権限セットを開き、【割り当ての管理】をクリックします。
※【割り当ての管理】アクションは権限セット名をクリックした画面、各設定画面に配置されています。どこから操作しても違いはありません。

2.【割り当ての追加】をクリックします。

3.権限を割り当てたいユーザにチェックを入れ、【割り当て】をクリックします。

4.【完了】をクリックして、権限セットの割り当ては完了です。

テンプレートを作ってみよう
準備ができたので、早速新しいビルダーでメールテンプレートを作ってみます!
1.「メールテンプレート」タブをクリックします。タブが表示されていない場合は、アプリケーションランチャーをクリックして、メールテンプレートを検索し、クリックします。

2.右上の【新規メールテンプレート】をクリックします。

3.とりあえず「メールテンプレート名」「関連エンティティ種別」「フォルダ」の基本情報と、「件名」を入力し、【保存】をクリックします。

4.テンプレートの詳細画面が表示されるので、【ビルダーで編集】をクリックします。

5.ドラッグアンドドロップコンテンツビルダーの画面が表示されました。Lightningアプリケーションビルダーと似ていますね。

画像コンポーネント
1.左のコンポーネント一覧から画像コンポーネントをプレビューにドラッグアンドドロップします。

2.画面右側の[ 内容 ]タブをクリックし、【ファイルから選択】をクリックします。

今回はすでにSalesforce上にある画像ファイルを選んで挿入します。

3.画像のサイズを調整します。
[スタイル]タブをクリックし、%でサイズを調整します。

画像の位置も調整できるようですね。

リッチテキストコンポーネント
1.左のコンポーネント一覧からリッチテキストコンポーネントをプレビューにドラッグアンドドロップします。

2. [内容]タブをクリックして、画面の下の[{}差し込み項目 ]をクリックして、リードの「姓」「名」を挿入します。

このあたりの操作方法は、現行のLightningメールテンプレートのものとあまり変わらないですね。①で項目を検索し、②で選択して、③【挿入】をクリックします。

↓こんな感じで表示されます。

3.テキストを入力して、フォントサイズや色、太さを調整します。詳細は割愛します。

ボタンコンポーネント
1.左のコンポーネント一覧からボタンコンポーネントをプレビューにドラッグアンドドロップします。

2.[ 内容 ]タブでボタンに表示するテキストと、ボタンをクリックしたときに表示されるリンクを入力します。

3.[ スタイル ]タブではボタンの色やサイズなどを設定します。

今回は、Forumのトップ画面に遷移するリンクを仕込みました。
テンプレートの保存とテスト
1.テンプレートの作成が終了したら、①【保存】をクリックし、② [ ← ]をクリックします。

2.テンプレートの詳細画面に、作成したテンプレートが表示されています。

3.リードのテストレコードを開き、「メール」タブをクリックします。

4.左下の「テンプレートを挿入、作成、または更新」のアイコンをクリックします。

5.作成したテンプレートを選択します。

テンプレートが挿入されました!

6.「メールをプレビュー」アイコンをクリックし、差し込み項目などがきちんと表示されていることを確認します。

7.プレビューを確認してOKであれば、いよいよ右下の【送信】をクリックしてメールを送信します。

メールも届きました。

仕込んだボタンも問題なさそうです。

モバイルでも
ビルダーで「デスクトップ」から「電話」に切り替えることで、モバイルでの見え方も確認できます。

背景も彩り豊かに
わりとあっさりしたテンプレートになってしまいましたが、ビルダーでコンポーネント以外の場所をクリックして、右側に「メールテンプレート」全体の設定画面を表示させ、「背景」で色を指定したり画像をアップロードすることで、背景もカスタマイズできます。

Spring'21でメールアラートでも使用可能に?
「Admin Preview Live – Release Readiness LIVE, Winter '21」を視聴していたら、「メールアラートでもLightningメールテンプレートを使いたい」という Ideaについて,
「Spring'21でリリース予定」と話されていたような……(本当に?)。だとしたら内部のメールもにぎやかになりますね。
◇ Salesforce > IdeaExchanges >Ideas >Use Lightning Email Templates in Email Alerts 感想
Lightningアプリケーションビルダーと同じような感覚で操作できます。筆者自身はいままでシンプルなテキストのメールテンプレートしか作ったことがないのですが、視覚的にアピールできる手段は色々あったほうがいいと思いますし、作る側も受信する側も楽しい気持ちになるので、機械があれば使っていきたいです。
参考
◇ Salesforce Winter '21 リリースノート > セールス > 生産性機能 > メールテンプレート >
魅力的なメールテンプレートのインタラクティブな作成公開:2020年10月1日
更新①:2023年8月22日