Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 359

How pass additional values in Triggered Send DE and update the All Subscriber List with the updated email address

$
0
0

On the form submit I want to pass the following values in Triggered Send DE

  1. First Name as @first_name
  2. Last Name as @last_name
  3. Member Number (This will be a unique number and I would like to set it up as subscriber key) as Member_Number
  4. Email Address as @email

  5. URL as @DEColumn2

I tried to excute the following ampscript for the triggered send

%%[SET @ts = CreateObject("TriggeredSend")   SET @tsDef = CreateObject("TriggeredSendDefinition")   SET @ts_subkey = @email     SetObjectProperty(@tsDef, "CustomerKey", "External Key of the triggered send")   SetObjectProperty(@ts, "TriggeredSendDefinition", @tsDef)   SET @ts_sub = CreateObject("Subscriber")   SetObjectProperty(@ts_sub, "EmailAddress", @email)     IF NOT EMPTY(@ts_subkey) THEN       SetObjectProperty(@ts_sub, "SubscriberKey", @ts_subkey)   ELSE       SetObjectProperty(@ts_sub, "SubscriberKey", @email)   ENDIF    AddObjectArrayItem(@ts, "Subscribers", @ts_sub)   SET @ts_statusCode = InvokeCreate(@ts, @ts_statusMsg, @errorCode)   IF @ts_statusCode != "OK" THEN       RaiseError(@ts_statusMsg, 0, @ts_statusCode, @errorCode)   ENDIF ]%%  

The above code executed successfully and I received the email.

At the moment Email Address is passed as Subscriber Key in the Triggered Send DE.

Is there any documenation to pass these additional fields in the Triggered Send DE.

Also if I make the Member_Number as subscriber key and if a subscriber updates the email address what would be the best way to update the All Subscriber List, as the All Subscriber will still be using the old email address.


Viewing all articles
Browse latest Browse all 359

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>