Salesforce Marketing Cloud
Overview
As part of the customer's journey, transactional emails need to be sent based on their activity. The LoginRadius Salesforce Marketing Cloud integration allows you to send these transactional emails via your Email Studio configurations.
Note: To enable this integration within LoginRadius please contact LoginRadius Support.
LoginRadius Transactional Email List
As part of our identity workflows, transactional emails need to be sent based on the customer's activity. Please see below for a list of transactional emails that may be sent by LoginRadius.
- Verification Email
- Forgot Password Email
- Welcome Email
- Delete Account Email
- Smart Login Email
- Add Email
- Password Reset Confirmation Email
- One Touch Login
- Passwordless Login
- Suspicious Country Email
- Suspicious Browser Email
- Suspicious City Email
- Suspicious Ip Email
- Risk Identified Admin Email
Configuration in Salesforce Marketing Cloud (SFMC) Email Studio
To configure the transactional emails, there are 4 things to set up in SFMC:
- Triggered Send Data Extension
- Email Template
- Triggered Send Definition
Triggered Send Data Extension
The Triggered Send Data Extension is used to store the email content variables, which are sent by the REST API (through LoginRadius), and this data can be used to make the email content dynamic. For ex. If the email content has the FirstName and LastName placeholders, when the email is triggered, the FirstName and LastName placeholders will be replaced with the user’s actual first name and last name.
Triggered Send Data Extension stores the variables sent by the REST API, and those variables are used to change the content placeholders.
- In Marketing Cloud, navigate to Email Studio.
- Under Subscribers, click Data Extensions | Create.
- Select Standard Data Extension (Default) | OK.
- Select Create from Template.
- Select TriggeredSendDataExtension | OK.
- Rename the new data extension (optional) | Next.
- Select Data Retention Policies or accept the default as Off | Next.
- Add the following fields (SubscriberKey and EmailAddress is already there, add following fields to) and save these fields:
Name | Data Type | Length | Primary Key (unchecked) | Nullable (checked) | Default Value |
---|---|---|---|---|---|
GUID | Text | 100 | 𐄂 | ☑ | |
Url | Text | 254 | 𐄂 | ☑ | |
uid | Text | 100 | 𐄂 | ☑ | |
Link | Text | 254 | 𐄂 | ☑ | |
Otp | Text | 50 | 𐄂 | ☑ | |
Text | 100 | 𐄂 | ☑ | ||
FirstName | Text | 50 | 𐄂 | ☑ | |
LastName | Text | 50 | 𐄂 | ☑ | |
UserName | Text | 50 | 𐄂 | ☑ | |
Name | Text | 50 | 𐄂 | ☑ | |
Uid | Text | 100 | 𐄂 | ☑ | |
Address1 | Text | 254 | 𐄂 | ☑ | |
Address2 | Text | 254 | 𐄂 | ☑ | |
City | Text | 50 | 𐄂 | ☑ | |
Country | Text | 50 | 𐄂 | ☑ | |
PostalCode | Text | 50 | 𐄂 | ☑ | |
Region | Text | 50 | 𐄂 | ☑ | |
State | Text | 50 | 𐄂 | ☑ | |
IpAddress | Text | 50 | 𐄂 | ☑ | |
UserAgent | Text | 254 | 𐄂 | ☑ | |
redirecturl | Text | 254 | 𐄂 | ☑ | |
FPass | Text | 50 | 𐄂 | ☑ | |
FProv | Text | 50 | 𐄂 | ☑ | |
FUName | Text | 50 | 𐄂 | ☑ | |
AppName | Text | 50 | 𐄂 | ☑ | |
CoreDomain | Text | 254 | 𐄂 | ☑ | |
Providers | Text | 100 | 𐄂 | ☑ | |
welcomeemailtemplate | Text | 100 | 𐄂 | ☑ | |
SuspiciousFactor | Text | 254 | 𐄂 | ☑ | |
SuspiciousValue | Text | 254 | 𐄂 | ☑ | |
SuspiciousLoginTime | Text | 100 | 𐄂 | ☑ |
Create Email Templates
- In Marketing Cloud, navigate to Email Studio.
- Click Content | Create (in the right top bar).
- Select Template form the dropdown.| Paste your custom HTML or from the Existing Template.
- Switch to code view.
- To get the data extension variable , AMP Script will be used. Using AMP script, fetch the variable from the triggered send data extension. For ex. forgotpassword Email template.
%%[
var @FirstName, @Url, @Vtoken;
SET @FirstName = AttributeValue('FirstName')
SET @Url = AttributeValue('url')
SET @Vtoken = AttributeValue('GUID')
]%%
<p>Hello %%FirstName%%</p>,
<p>#FPassPlease reset your password by clicking on the link.
To Reset your password, please click on the following link and if your browser does not open it, please copy and paste it into your browser address bar.</p>
<p>%%Url%%?vtype=reset&vtoken=%%Vtoken%%</p>
<p>Regards<br />Your Organization name</p>
In the above “forgot password” template example, FirstName, url, and GUID are the Data send extension variables, which are used in the template.
- Click on save.
- Provide name and description for the template.
- Save the template.
- Repeat the steps to create all email templates for the LoginRadius emails listed at LoginRadius Transactional Email List.
Create Email
- In Marketing Cloud, navigate to Email Studio.
- Click Content | Create (in the right top bar).
- Select Email form the dropdown.
- In the Define Property tab, select Template form the Create Email dropdown.
- From the save tab, select the template which is built in the previous step of the particular email.
- Click on Select.
- Now provide Name and Description of that email | Next.
- In the add content section, Provide the Subject and Preheader | click Next.
- Save the Email.
- Repeat the steps to create an Email for every email template.
Create Triggered Send Definition
- In Marketing Cloud, navigate to Email Studio.
- Click Interaction | Triggered Emails.
- Click on Create.
- Provide the Name and Description.
- Leave blank External key or give a custom key.
- In the Send Classification select “Transactional”.
- In the Content Section, select the email from the content builder block which is created in the previous step.
- In the Subscriber management section, click on the Data Extension and select the Data Extension created in the first step from the Triggered Send Data Extension block.
- Uncheck the “Add subscribers to this list” checkbox.
- Leave other fields as they are and save the Triggered Email.
- Form the Triggered Email listing: select the newly created Triggered Email and click on the Start/Restart.
- This will publish the Triggered Email.
- Find the External Key from Triggered Email Listing (which is used to send email by the LoginRadius.)
- Create seperate Triggered Email for every email type.
- Provide all the External Keys to the LoginRadius.
Custom Template Emails
- For custom template Emails, create Email Template and Email in the content section.
- Create new Triggered Email for this.
- Provide LoginRadius with the External Key and TemplateName which is passing in the LoginRadius APIs.
Note: For every email, there is a separate Email Template, Email and Triggered Email, and Triggered Send Data Extension which will be shared in the all Triggered Emails.