例:
Subject: %%=V(@subject)=%%Body: %%[ SET @dealType = Lookup("Deals", "DealType", "DealCode", DealCode) SET @subject = "Check out the latest deals on %%=V(@dealType)=%%!" SET @dealType = ‘televisions’ ]%%
上記の例では、1回目のパス(評価プロセス)が実行された時点で、件名は以下のように展開されます
Subject: Check out the latest deals on %%=V(@dealType)=%%!
その後、2回目のパスで以下のように完全に解決(展開)されます:
Subject: Check out the latest deals on televisions!
これはあくまで一例に過ぎません。AMPscriptは柔軟性が非常に高いため、メール件名が実際にどのようにレンダリング(生成)されるかは、各アカウントの実装状況によって異なります。
AMPscriptやパーソナライゼーション文字列が、購読者の行ごとにデータエクステンション(DE)のフィールド値として保存されているユースケースは他にもあります。例えば、送信対象となるDE内の「Subject」というフィールドを、シンプルなパーソナライゼーション文字列として参照するようにメール件名を設定している場合です。この場合、件名の設定は以下のようになります。
Subject: %%Subject%%
もし、DE内に格納されている「Subject」の値自体にパーソナライゼーション文字列やAMPscriptが含まれている場合、件名の中でパーソナライゼーションが「ネスト(入れ子)」された状態になります。このパターンでは、値が完全に解決されます。
これは、次のような TreatAsContent() 関数を使用した場合も同様です。
Subject: %%=TreatAsContent(Subject)=%%
これにより、1回目のパスで件名が完全にレンダリングされます。
注意: TreatAsContent() はJavaScriptの eval() 関数と似た挙動を示します。基となるデータのソース(出所)を把握せずにこの関数を使用することにはリスクが伴います。
Salesforceは、メール件名における「二重評価(double evaluation)」機能を廃止します。2026年1月30日をもって新規のお客様への提供を終了し、2026年3月15日にはすべてのアカウントでこの機能が無効化されます。
この変更後もメールキャンペーンが意図通りに動作することを保証するため、新しいAMPscript文字列を導入しました。
%%__SINGLE_RESOLVE%%
%%=TreatAsContent(SubjectLine)=%% %%__SINGLE_RESOLVE%%
-または-
%%=v(@SubjectLine)=%% %%__SINGLE_RESOLVE%%
機能について:
プラットフォームがメールを送信する際、この文字列(%%__SINGLE_RESOLVE%%)は自動的に削除され、件名は一度だけ解決されます。
適用日以降の挙動:
2026年3月15日以降は、すべての件名において「単一評価」がプラットフォームのデフォルトの動作となります。その時点では、この文字列を付加する必要はなくなりますが、残したままにしておいても問題ありません。
重要な注意点:
この文字列は件名でのみ機能します。 本文など他の場所で使用すると、コンテンツ内にプレーンテキストとしてそのまま表示されてしまうためご注意ください。
Subject:
%%SubjectLine%%
SubjectLine field in the sending Dataextension:
"%%Name%% - Your New Offer"
Name field in the sending Dataextension:
Alex
Pass 1:
%%Name%% - Your New Offer
Pass 2:
Alex - Your new offer
How to fix:
件名設定に TREATASCONTENT を利用しその後 %%__SINGLE_RESOLVE%% を追加
Subject:
%%=TREATASCONTENT(SubjectLine)=%% %%__SINGLE_RESOLVE%%
SubjectLine field in the sending Dataextension:
"%%Name%% - Your New Offer"
Name field in the sending Dataextension:
Alex
Pass 1:
Alex - Your new offer
Pass 2:
(There is no pass 2 with %%__SINGLE_RESOLVE%%)
TreatAsContent() の代わりに Concat() を利用する代案
Subject:
%%=v(SubjectLine)=%% %%__SINGLE_RESOLVE%%
Body:
SET @SubjectLine = concat(Name," - Your New Offer")
Name:
Alex
Pass 1:
Alex - Your new offer
Pass 2:
(There is no pass 2 with %%__SINGLE_RESOLVE%%)
件名にAMPScript だけを利用する代案
Subject:
%%=concat(Name," - Your New Offer")=%% %%__SINGLE_RESOLVE%%
Name field in the sending Dataextension:
Alex
Pass 1:
Alex - Your new offer
Pass 2:
(There is no pass 2 with %%__SINGLE_RESOLVE%%)
Subject:
%%=V(@SubjectLine)=%%
Name:
Alex
SpendDollars:
$100
Body:
SET @SubjectLine = "%%=ProperCase(@Name)=%%, you have spent %%=V(@SpentDollars)=%% this month"
Pass 1:
%%=ProperCase(@Name)=%%, you have spent %%=V(@SpentDollars)=%% this month
Pass 2:
Alex, you have spent $100 this month
How to fix:
件名設定に TreatAsContent() を利用しその後 %%__SINGLE_RESOLVE%% を追加
Subject:
%%=TREATASCONTENT(@SubjectLine)=%% %%__SINGLE_RESOLVE%%
Name:
Alex
SpendDollars:
$100
Body:
SET @SubjectLine = "%%=ProperCase(@Name)=%%, you have spent %%=V(@SpentDollars)=%% this month"
Pass 1:
Alex, you have spent $100 this month
Pass 2
(There is no pass 2 with %%__SINGLE_RESOLVE%%)
TreatAsContent() の代わりに Concat() を利用る代案
Subject:
%%=v(@SubjectLine)=%% %%__SINGLE_RESOLVE%%
Name:
Alex
SpendDollars:
$100
Body:
SET @SubjectLine = concat(ProperCase(@Name),", you have spent ",@SpentDollars," this month")
Pass 1:
Alex, you have spent $100 this month
Pass 2:
(There is no pass 2 with %%__SINGLE_RESOLVE%%)
件名にAMPScript だけを利用する代案
Subject:
%%=concat(ProperCase(@Name),", you have spent ",@SpentDollars," this month")=%% %%__SINGLE_RESOLVE%%
Name:
Alex
SpendDollars:
$100
Pass 1:
Alex, you have spent $100 this month
Pass 2:
(There is no pass 2 with %%__SINGLE_RESOLVE%%)
Subject:
%%=V(@subj)=%%
Subject_Data:
%%First_Name%%'s Weekly Update.
First_Name:
Alex
Body:
%%[
SET @subjRow = LookupRows("Subject_Data", "SubscriberKey", _subscriberkey)
IF RowCount(@subjRow) > 0 THEN
SET @subj = Field(Row(@subjRow, 1), "SubjectLineContent")
ELSE
SET @subj = "Your Weekly Update"
ENDIF
]%%
Pass 1:
%%First_Name%%'s Weekly Update.
Pass 2:
Alex Weekly Update
How to fix:
件名が一度だけ解決されることを強制適用するため、件名設定に TreatAsContent() を利用しその後 %%__SINGLE_RESOLVE%% を追加
Subject:
%%=TREATASCONTENT(@subj)=%% %%__SINGLE_RESOLVE%%
SubjectLineContent:
%%First_Name%%'s Weekly Update.
First_Name:
Alex
Body:
%%[
SET @subjRow = LookupRows("Subject_Data", "SubscriberKey", _subscriberkey)
IF RowCount(@subjRow) > 0 THEN
SET @subj = Field(Row(@subjRow, 1), "SubjectLineContent")
ELSE
SET @subj = "Your Weekly Update"
ENDIF
]%%
Pass 1:
Alex’s Weekly Update
Pass 2:
(There is no pass 2 with %%__SINGLE_RESOLVE%%)
Subject:
%%=v(@subjectLine)=%%
widgetType:
springs.
subscriberName:
Alex
Body:
%%[
SET @subjectLine = "You have sent %%=v(@subscriberName)=%% %%=v(@widgetType)=%%"
]%%
<script runat="server">
var payload = Platform.Recipient.GetAttributeValue("payload");
payload = Platform.Function.ParseJSON(payload);
var Content = payload.emailSend.emailContent;
Platform.Variable.SetValue("@subscriberName", Content.subscriberName);
Platform.Variable.SetValue("@widgetType", Content.widgetType);
</script>
Pass 1:
You have sent %%=v(@subscriberName)=%% %%=v(@widgetType)=%%
Pass 2:
You have sent Alex springs.
How to fix:
件名設定に TreatAsContent() を利用しその後 %%__SINGLE_RESOLVE%% を追加
Subject:
%%=TREATASCONTENT(@subjectLine)=%% %%__SINGLE_RESOLVE%%
widgetType:
springs.
subscriberName:
Alex
Body:
%%[
SET @subjectLine = "You have sent %%=v(@subscriberName)=%% %%=v(@widgetType)=%%"
]%%
<script runat="server">
var payload = Platform.Recipient.GetAttributeValue("payload");
payload = Platform.Function.ParseJSON(payload);
var Content = payload.emailSend.emailContent;
Platform.Variable.SetValue("@subscriberName", Content.subscriberName);
Platform.Variable.SetValue("@widgetType", Content.widgetType);
</script>
Pass 1:
You have sent Alex springs
Pass 2:
(There is no pass 2 with %%__SINGLE_RESOLVE%%)
1. 現在使用中のメール、または将来的に使用する予定のあるメールを更新してください。例えば、先週作成して一度だけ使用し、今後再利用する予定のないメールについては、対応の必要はありません。しかし、古いメールを将来的に再利用する計画がある場合は、送信前に更新を行う必要があります。
2. トリガー送信(Journey Builderのメールを含む)は、再パブリッシュを行うまでメールの変更内容が反映されません。トリガー送信に使用しているメールを更新した際は、メール自体の更新だけでなく、関連するトリガー送信の再パブリッシュを必ず実行してください。
000391994

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.