On the form submit I want to pass the following values in Triggered Send DE
- First Name as @first_name
- Last Name as @last_name
- Member Number (This will be a unique number and I would like to set it up as subscriber key) as Member_Number
Email Address as @email
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.