0

Ampscript 投稿は有効なユーザーを返しません。何かアイデアはありますか? これはエンタープライズ アカウントであり、正確なターゲットはあまり役に立ちません。API 呼び出しを作成し、サーバー側の js を試しましたが、さらに悪い応答が返されます。

%%[

var @emailaddr
SET @emailaddr = 'email@gmail.com'
SET @ts = CreateObject("TriggeredSend")
SET @tsDef = CreateObject("TriggeredSendDefinition")
SET @ts_subkey = 'email@gmail.com'

SetObjectProperty(@tsDef, "CustomerKey", "ET_Support_LS")
SetObjectProperty(@ts, "TriggeredSendDefinition", @tsDef)

SET @ts_sub = CreateObject("Subscriber")
SetObjectProperty(@ts_sub, "EmailAddress", @emailaddr)  
SetObjectProperty(@ts_sub, "SubscriberKey", @ts_subkey)

SET @ts_attr = CreateObject("Attribute")
SetObjectProperty(@ts_attr, "Name", "Subscriber Key")
SetObjectProperty(@ts_attr, "Value", @ts_subkey)
AddObjectArrayItem(@ts_sub, "Attributes", @ts_attr)

AddObjectArrayItem(@ts, "Subscribers", @ts_sub)
SET @ts_statusCode = InvokeCreate(@ts, @ts_statusMsg, @errorCode)
 ]%%
4

1 に答える 1

3

ExactTarget のエンタープライズ アカウントには、「代理」アカウントと呼ばれるサブアカウントがあります。購読者がアカウントに追加されるか、TriggeredSend を使用して電子メールが送信されるたびに、関連するサブアカウントを指定するために値を渡す必要があります。TriggeredSend では、購読者の属性に ChannelMemberID フィールドを設定することでこれを実現できます。サブアカウントのリストは、ExactTarget UI で [管理] タブ、[エンタープライズ管理]、[組織図] の順に移動すると表示されます。

追加する必要があるコード:

SET @attr = CreateObject("Attribute")
SetObjectProperty(@attr, "Name", "ChannelMemberID")
SetObjectProperty(@attr, "Value", "PUT THE NUMERIC VALUE FOR AN OYB ACCOUNT HERE")
AddObjectArrayItem(@ts_sub, "Attributes", @attr)

完全な例: %%[

var @emailaddr
SET @emailaddr = 'email@gmail.com'
SET @ts = CreateObject("TriggeredSend")
SET @tsDef = CreateObject("TriggeredSendDefinition")
SET @ts_subkey = 'email@gmail.com'

SetObjectProperty(@tsDef, "CustomerKey", "ET_Support_LS")
SetObjectProperty(@ts, "TriggeredSendDefinition", @tsDef)

SET @ts_sub = CreateObject("Subscriber")
SetObjectProperty(@ts_sub, "EmailAddress", @emailaddr)  
SetObjectProperty(@ts_sub, "SubscriberKey", @ts_subkey)  

SET @attr = CreateObject("Attribute")
SetObjectProperty(@attr, "Name", "ChannelMemberID")
SetObjectProperty(@attr, "Value", "PUT THE NUMERIC VALUE FOR AN OYB ACCOUNT HERE")
AddObjectArrayItem(@ts_sub, "Attributes", @attr)

AddObjectArrayItem(@ts, "Subscribers", @ts_sub)
SET @ts_statusCode = InvokeCreate(@ts, @ts_statusMsg, @errorCode)
 ]%%

また、サブスクライバー キーの値を 2 回渡す必要がないため、次のセクションは例から削除されました。

SET @ts_attr = CreateObject("Attribute")
SetObjectProperty(@ts_attr, "Name", "Subscriber Key")
SetObjectProperty(@ts_attr, "Value", @ts_subkey)
AddObjectArrayItem(@ts_sub, "Attributes", @ts_attr)

ExactTarget 固有の質問については、https://code.exacttarget.com/questions/newest の Code@ Q&A セクションを確認してください。

于 2013-04-08T18:59:56.907 に答える