Email Marketing and ForgeRock CIAM

Stéphane Orluc
7 min readNov 8, 2021

--

According to market analysts, the ForgeRock Identity Platform is a leader in Customer Identity and Access Management (CIAM), so I spend a lot of my time to prepare demos and PoC for CIAM use cases. When it comes to CIAM you talk to marketing teams and really frequently they have an Email Marketing Service (EMS) they want to integrate with ForgeRock. Let’s see why you should do this and how it can be done in a few minutes.

What is an Email Marketing Service ?

An Email Marketing Service/Software (EMS) — also sometimes called Email Marketing Platform (EMP), Email platform or Email Service Provider (ESP) — is a company — most of the time a Cloud company — that helps another company to send email and track them. For instance let’s imagine a retail company wants to organize an emailing marketing campaign, then this retail company will use an EMS to send these mails and followup with the campaign. Most of the time, the followup consist in knowing how many email have been opened, trashed without reading, etc… The following figure is a screenshot of Send In Blue dashboard for transactional emails.

Send In Blue Transactional email realtime dashboard

With time, EMS added more and more features : statistics (with mesure of success, bounce, etc…), contact directory with rating, email templates, web-hooks & forms, etc…

For these reasons more and more marketing teams are using EMS instead of a classical SMTP server. If you need more reasons why using and EMS, I suggest you google it ;).

The 5 EMS I have seen these days are:

Why integrate it with ForgeRock ?

The ForgeRock Identity Platform embeds the most powerful user access journey tool you can dream of: Intelligent Access. This engine consiste in an easy to use drag and drop designer where you can draw the user journey you want (for instance, Register, login, password/username forgot, MFA authentication, password less/username less journey, …).

During user journey we frequently want to send email : send a welcome email after registering, send an OTP, send a security alert email, send an opt-in confirmation, etc… The ForgeRock platform can be configured to use an SMTP server and we include a WYSIWYG email template designer, which is more than enough most of the time.

ForgeRock CIAM and EMS integration

But sometimes our customers wants to use their EMS for the following reasons:

  • Have a centralized dashboard and statistics of all email / communication sent to customer,
  • Continue to use a unique email designer the marketing team already knows,
  • Use Marketing automation features of the platform,
  • Being able to resend the email.

For these reasons, sometime we have to integrate with EMS during user journeys. Let’s see it with Send In blue EMS.

Integrate with Send In Blue

The integration of ForgeRock with an EMS can be done is different ways:

  1. SMTP integration: with this method you configure ForgeRock to use your EMS as a SMTP server, you use ForgeRock Email templating features to design your emails and you use the OOTB Email Template Node in user journeys.
    This is the easiest and fastest way to integrate an EMS, I recommend this method if you don’t need to centralize the design of email templates in your EMS.
  2. API Integration: with this approach we will simply use a scripted decision node to call the REST API of the EMS.
    This method is easy to configure and allow the use of more integrated features of the EMS: using the EMS template system, trigger campaign, etc…

Note: In this blog post, I will detail the second method, because the first one is really straightforward and OOTB.

For the needs of this blog note, let’s assume we want to send a welcome email when a user registers (as illustrated before). In this use case we will use ForgeRock Platform to design the register journey and we will use Send In blue EMS to send and track the welcome email.

Create a register journey in ForgeRock

When you setup the ForgeRock platform or when you connect to your ForgeRock Identity Cloud tenant there are a few default users journeys ready to use out of the box. We will use the default register journey to create our own. Follow theses steps:

Registration Journey creation, Step 3
  1. Login to ForgeRock Platform console (https://<YOURTENANT>/platform) and browse to the Journey menu,
  2. Find the Registration journey and click on the three dots (...), then click on Duplicate
  3. On the duplicate form enter “Registration with EMS” for the Name, leave “Alpha realm — Users” for Identity Object, enter any description you want and click Save,
  4. You will be redirected to ForgeRock journey designer. Click on Save go back to Journey menu.
  5. That’s it, you’ve just created a news registration journey, you can access at: https://<YOURTENANT>/am/XUI/?realms=/alpha&authIndexType=service&authIndexValue=Registration%20with%20EMS#/

Create an Email Template and an Automation Workflows in Send In Blue

To create our email template follow these steps:

Send In blue template creation
  1. Login to SendInBlue console (https://app.sendinblue.com/account/login)and browse to Transactional menu,
  2. On this page you can see the realtime dashboard. Browser to Templates menu,
  3. Click on New template. Fill in the form with theses informations: Template Name: “Welcome”, Subject Line: “Welcome onboard PRENOM!” (you add PRENOM with the Add Personalization button), Preview text: “Welcome onboard!”, From Email: select the sender email you want, From Name: enter the name you want. Then click on Next Step,
  4. On the next page click on Template Gallery, sort the result with Welcome filter and click on the first one (it should be TheSpace template).
  5. On this page leave the email template as it is and click on Continue,
  6. On the preview page, click on Save & Activate and then Save & Quit,
  7. That’s it! Now you’ve a got an email Template that can be used to send a welcome email.

Note: In this blog post, I am not explaining how to customize and personalize your email template with Send In Blue but keep in mind that this is one of the main reasons for using an EMS.

Once the Email Template has been created we will create a simple Automation Workflows that will send the welcome email when the user is added to the contact list in Send In blue. To do this, follow these steps:

Automation Workflow — Welcome Onboard
  1. Login to SendInBlue console (https://app.sendinblue.com/account/login)and browse to Automation menu,
  2. On this page you can see all the workflows you created. Click on Create a workflow button. then click on Create a custom workflow,
  3. Fill in the form with theses informations: Name: “Welcome onboard!”, Description: enter the description you want. Then click on Start automating,
  4. On the next page, click Add an entry point, and select Contact Details> A contact is added to a list, then select “identified_contacts” list and click OK,
  5. Then click on the +, select Send an email. On the new screen select the template email we created previously (Welcome template), then click OK.
  6. Now your automation workflow is ready as soon a a user is added to “identifier_contacts” list he will receive a welcome email.

Finalize the register journey with the welcome email

To finalize the our new registration journey, follow theses steps:

Registration with EMS journey in ForgeRock
  1. Login to ForgeRock Platform console (https://<YOURTENANT>/platform) and browse to the Journey menu,
  2. Find the Registration with EMS journey, click on it and then click on Edit on the image,
  3. In the designer search for the Scripted Decision node and drag and drop it on the journey,
  4. On the Scripted Decision node configuration pane, enter the following informations: Name: “Create contact and send welcome message”, Script: leave it blank for now, Outcome: “true”, leave the default values for the other parameters (equals to an *),
  5. Link the output of the node Increment Login Count to the input of Create contact and send welcome message node and link the output of Create contact and send welcome message Node to the Success end (green circle). Click Save.
  6. Now on the Create contact and send welcome message node configuration page, click on Script, use the little + and create a new Script with these informations: Name: “createContact”, Description: enter the description you want, JavaScript: Copy/past the Javascript below, then click Save.
  7. That’s it, you’ve just finalized the registration journey with a welcome message emitted by SendInBlue EMS. You can test it here: https://<YOURTENANT>/am/XUI/?realms=/alpha&authIndexType=service&authIndexValue=Registration%20with%20EMS#/

Below, the code to copy/paste in the Javascript field in step 6:

Don’ forget to specify in your script:

  • <YOUR SEND IN BLUE KEY> : this is the key that Send In Blue uses to identify you and verify you’re allowed to use the service. More info here.
  • <YOUR CONTACT LIST ID> : this is the Send In Blue Id of the contact list where you want to add the contact. In SendInBlue interface it appears just before your contact list name in [].

Demo

The following gif shows a user registering in ForgeRock and receiving a welcome email coming from Send In blue.

ForgeRock and SendInBlue

Conclusion

In this post we’ve seen an example of an integration of the ForgeRock Identity Platform and an Email Marketing Solution. It’s quick and easy to do in just a few lines of Javascript.

--

--

Stéphane Orluc
Stéphane Orluc

Written by Stéphane Orluc

Sales Engineer at Ping Identity (historic ForgeRock) www.linkedin.com/in/sorluc (posts are my own and do not necessarily reflect the views of my company)

No responses yet