事前に、WhatsApp チャットメッセージングの連絡先とオプトアウト要求を保存するために必要なデータエクステンションが作成済みであることを確認してください。
「Whatsapp_Subscribers」という名前の送信不能データエクステンションを作成します。これは、外部インポート処理を使用して毎時更新される必要があります。このエクステンションには次の 3 つの列が必要です。
| 項目名 | プライマリキー | データ型 | 必須 |
|---|---|---|---|
| Contactkey | はい | テキスト | はい |
| Mobilenumber | いいえ | 電話番号 | はい |
| ロケール | いいえ | ロケール | はい |
注: 2 文字のロケール値のみを使用してください。
次に、「Whatsapp_OptOut_Requests」という名前の送信不能データエクステンションを作成します。このエクステンションはすべてのオプトアウト要求を保存するものであり、保存期間は 7 日間に設定する必要があります。次の列が必要になります。
| 項目名 | プライマリキー | データ型 | 必須 |
|---|---|---|---|
| Contactkey | はい | テキスト | はい |
| Mobilenumber | はい | 電話番号 | はい |
| Optoutstatus | いいえ | 数値 | はい |
| ロケール | いいえ | ロケール | はい |
その後、「Whatsapp_QuickReply_OptOuts」という名前の送信可能データエクステンションを作成し、クイック返信ボタンからのオプトアウト要求を保存します。保存期間は 7 日間に設定する必要があります。次の 2 つの列が必要になります。
| 項目名 | プライマリキー | データ型 | 必須 |
|---|---|---|---|
| Contactkey | いいえ | テキスト | はい |
| Optoutstatus | いいえ | 数値 | はい |
最後に、「Whatsapp_OptOut_History」という名前の送信不能データエクステンションを作成し、WhatsApp のオプトアウト成功履歴を記録します。次の列を含める必要があります。
| 項目名 | プライマリキー | データ型 | 必須 |
|---|---|---|---|
| Contactkey | いいえ | テキスト | はい |
| Mobilenumber | いいえ | 電話番号 | はい |
| Date_optedout | いいえ | 日付 | はい |
注: Date_optedout については [Use current datetime (現在の日時を使用)] を選択します。
Call To Action (CTA) メッセージテンプレートを使用してオプトアウトを処理するステップは次のとおりです。
注: この WhatsApp メッセージを送信するジャーニーを作成するとき、入力データエクステンション内にモバイル番号と連絡先キーの 2 つの列があります。上記の例では、これらの列は「mobilenumber」、「Contactkey」と呼ばれています。
%%[
var @mobilenumber, @Contactkey, @insertRow, @locale
/* Retrieve the URL parameters */
set @mobilenumber = QueryParameter('mobilenumber')
set @Contactkey = QueryParameter('Contactkey')
/* Lookup locale from the "Whatsapp_Subscribers" Data Extension */
set @locale = Lookup('Whatsapp_Subscribers', 'locale', 'Contactkey', @Contactkey)
/* Insert data into your Data Extension */
set @insertRow = InsertDE('Whatsapp_OptOut_Requests', 'mobilenumber', @mobilenumber, 'Contactkey', @Contactkey, 'locale', @locale, 'optOutStatus', '1')
]%%
/*
Only for testing to see if the values are coming through
Mobile: %%=v(@mobilenumber)=%%
Contactkey: %%=v(@Contactkey)=%%
Locale: %%=v(@locale)=%%
*/
クイック返信メッセージテンプレートを使用したオプトアウト処理については、次のステップに従ってください。
使用するクエリ:
select WS.contactkey as Contactkey, WS.mobilenumber as mobilenumber, WS.locale as locale, WQR.optoutstatus as optoutstatus from [Whatsapp_Subscribers] as WS join [Whatsapp_QuickReply_OptOuts] as WQR on WS.contactkey = WQR.Contactkey
注: 詳細については、次の「WhatsAppのオプトアウト要求に対処するオートメーション設定」を参照してください。
使用するクエリ:
select Contactkey as Contactkey, mobilenumber as mobilenumber from [Whatsapp_OptOut_Requests]
000395648

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.