2

Our marketing team recently moved to Marketing Cloud. I need to transfer our transactional emails to MC.

Our current system uses Mandrill to send transactional emails using the following workflow:

  • User requests a password reset
  • I queue up the request into our own queue with the required Mandrill TemplateId and replacement info (first_name: Johnny, token: 181821829138192831293)
  • Our email processor grabs the queue, using .NET to connect to Mandrill, and sends the email

Can this same workflow work with Marketing Cloud? Everything I have read suggests not. I can create Triggered Sends but they seemed to be tied to actions/events stored in SF and uses SF Contact data for the replacement/merge tags. The replacement tag data (ex: password reset link) will only live in our custom Db and not in SF.

2

Implementing such a functionality is possible, but it greatly depends on your SubscriberKey setup. If you have a Sales/Service Cloud or any CRM connected and your SubscriberKey is tied to an id in this system, your reciepient needs to have such an id, so a record (a Contact if it is Salesforce CRM) needs to be present/created. If you are using the email address as SubscriberKey, no record needs to be present.

Any additional data needed in the email can be passed to the triggered send as additional contact attributes via API (see example below).

Your request could look like this:

POST Request to: messaging/v1/messageDefinitionSends/key:[external key of triggered send]/send

{
  "To": {
    "Address": "to@subscriber.com",
    "SubscriberKey": "SUBSCRIBER_KEY",
    "ContactAttributes": {
      "SubscriberAttributes": {
        "passwordResetLink": "https://example.com/pwreset?code=123456"
      }
    }
  },
  "From": {
    "Address": "you@company.com",
    "Name": "your company"
  },
  "OPTIONS": {
    "RequestType": "SYNC"
  }
}

Reading that value in the email:

You can access this value using AMPscript in your email:

%%[
    Var @link
    Set @link = AttributeValue("passwordResetLink")
]%%
<a href="%%=RedirectTo(@link)=%%">Reset password</a>

Further reading:

  • That helps. I can send. I still cannot add replacement tags. I might have to use the HTML__TAGNAME but I am not sure (developer.salesforce.com/docs/…). I am currently fighting MC emails that wont validate. Will give an update and Mark as Correct when possible. Thanks – Spike2000 Jun 14 '17 at 21:02
  • Ok. I got it. I ended up using a Nuget package. But a key part was that I had to use the AMPScript you provide so thank you. Another key part is that after you edit the email template, you need to stop the triggered send, republish the triggered send, and then start the triggered send again (a little confusing). A recap is here: codelocker.net/30831/… – Spike2000 Jun 14 '17 at 21:43
  • Glad my answer helped and you got your use case working! – Markus Slabina Jun 14 '17 at 21:44
  • Just a precision here: If you edit the email template, you need to edit the email and the apply the new template, before you republishing the triggered send. Also, you can do a lookup to Salesforce to retrieve the ID if they exist, and if not, use insert to create them (looping through contacts and leads, would be ideal) :) depends on if it is within the scope of the solution :) – Kenneth Wagner Jun 15 '17 at 8:42

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.