0

Example: I will send a first email to a data extension and input a button inside the content of the email. My goal is that whoever clicks this button automatically receives another email at the same time.

I schematized it in the Journey Builder with Engajement Split, but the Wait Time handles sending the second email for the given time. Would have a better idea to facilitate the process

0

You can build a CloudPage, which includes a TriggeredSend that you created to send the email. When someone clicks on the CloudPage, you can pass their SubscriberKey as a parameter to handle this process. Example:

Your CloudPage address is: abc.com The link you are using in your email: abc.com?s=%%SubscriberKey%%

In that CloudPage, you can look at this method to get your customers' email addresses based on their subscriberkeys:

Then you can use AMPscript code below for TriggeredSend:

var @emailaddr, @ts, @tsDef, @ts_subkey, @ts_sub, @ts_statusCode, @errorCode
SET @subscriberkey = RequestParameter('s')

   SET @ts = CreateObject("TriggeredSend")
   SET @tsDef = CreateObject("TriggeredSendDefinition")
   SET @ts_subkey = @emailaddr /* after you get it with the method above or another way is encrypting email address in the email, passing that value as the parameter and then decrypting it in the CloudPage */

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

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

   IF NOT EMPTY(@ts_subkey) THEN
       SetObjectProperty(@ts_sub, "SubscriberKey", @ts_subkey)
   ELSE
       SetObjectProperty(@ts_sub, "SubscriberKey", @emailaddr)
   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

Also, you need to be sure that your TriggeredSend is on, activated.

PS: To pass the parameter via the email is easier with this function:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.