1. Help Center
  2. E-mail Triggers
  3. E-mail trigger integrations

Salesforce Marketing Cloud


Implementation of E-mail recommendation and E-mail triggers between Raptor and Salesforce Marketing Cloud Email occurs in 3 steps:

Step 1: REAID synchronization. If you have chosen to set email as RUID, the REAID synchronization must be set up. If you have chosen an external email id as ruid, this step can be skipped. Read about User tracking here.

Step 2: E-mail Recommendation. Set up the desired Raptor E-mail recommendation modules  in Salesforce Marketing Cloud.

Step 3: E-mail Trigger. Configure the desired Email triggers in Salesforce Marketing Cloud.


1. REAID synchronization:
Raptor needs to update all users within your Salesforce Marketing Cloud with a REAID (Raptor Email Address ID). The REAID is an arbitrary ID created by Raptor’s server and represents the user’s email. When a user clicks on a newsletter, the REAID must be included in the URL sent, and subsequently, the same REAID should be set in the tracking for Raptor.

In Salesforce, two data extensions called NoREAID and HasREAID must be created:

NoREAID

Create a data extenstion in Salesforce Marketing Cloud to display only subscribers with no REAID assigned.

The list must contain 2 fields:

field 1: Subscriber Key 

field 2: emailadresse

Screenshot from Salesforce Marketing Cloud:

⚠️ IMPORTANT!
The integration is old and the naming conventions are not ideal. Be aware of case sensitivity. The fields should be created with the exact names specified ‘emailaddresse’ and ‘Subscriber Key’


The External key from the Data Extension must be inserted into Raptor’s control panel in the parameter “NoReaId DataExtensionObject Name”

Find the External Key in Salesforce Marketing Cloud here:
Screenshot from Salesforce Marketing Cloud:
 

👀 If you change the name of the External key, you'll have to insert the name in the Raptor Controlpanel.


HasREAID: 
Create a data extension in Salesforce with two fields
Field 1: Subscriber Key
Field 2: ReaID

Screenshot from Salesforce Marketing Cloud:


This list is updated by Raptor with unique REAIDs for all users. 

⚠️ IMPORTANT!
The integration is old and the naming conventions are not ideal. Be aware of case sensitivity. The fields should be created with the exact names specified ‘Subscriber Key’ and ‘ReaID’


Find the External Key in Salesforce Marketing Cloud here:
Screenshot from Salesforce Marketing Cloud:

👀 If you change the name of the External key, you'll have to insert the name in the Raptor Controlpanel.


Set REAID as a global parameter in Salesforce Marketing Cloud:
The users’ REAIDs should be set as a global parameter for all outgoing links.
Ensure that @reaID is an available parameter in your email templates. Managing @reaID as a global parameter can be accomplished through Salesforce Parameter Management.

Screenshot from Salesforce Marketing Cloud:

Setup REAID in the Raptor Controlpanel:

Navigate to ‘Integrations’ and select ‘Email Marketing Integrations,’ then choose ‘Salesforce.’

Enter your Salesforce credentials in the form provided.

Create an installed package in Salesforce Marketing Cloud for Raptor to get the subdomain, clientid, client secret and account id.
Create an API user for Raptor in SFMC to get the SOAP username and SOAP password.


Screenshot from the Raptor Controlpanel:

👀NOTE!

The External key from the data extension NoReaid must be inserted in the parameter NoReaId DataExtensionObject Name

The External key from the data extension HasReaid must be insterted ine the parameter ReaId DataExtensionObject Name


If you have sister accounts, you can easily clone the integration across them.

How often does the REAID synchronization sync? 

When a new integration has been activated the sync will run once after approximately 4 hours. After the third run it syncs every 24 hours.

2. E-mail Recommendation setup

When you product catalog is ingested to the Data manager and you have created a layout design it is time to setup the Raptor mail merge api's in SFMC.


The setup of the mail merge api is explained in this video.


3. E-mail Trigger setup

The Raptor trigger setup for Salesforce Marketing Cloud uses three different data extensions to send data and an EventDefinitionKey to activate a journey.

👀NOTE!
All Raptor E-mail triggers in Salesforce Marekting Cloud are executed as journeys


Subscriberkey look up

The first data extension is generic and should be utilized in all triggers; it is referred to by Raptor as ‘Subscriberkey Look up.’ Its purpose is to verify whether the users are subscribers

The data extension should contain 2 fields:
field 1: Email
field 2: SubscriberKey

Screenshot from Salesforce Marketing Cloud:

The data extension also serves as a look up, where Raptor retrieves the user’s subscriber key, which should be included in the trigger event.

👀NOTE!
The External key from the Subscriberkey Lookup data extension should be set in the Raptor Parameter: SubscriberKeyLookUpDataExtensionId

 

⚠️IMPORTANT!

The data extension should only contain subscribed users


Send data to Salesforce
:

When Raptor E-mail triggers are set up, there is a distinction between two types of trigger setups where either one item is sent or the trigger sends multiple items.

E-mail Triggers with one item:

Product interest
Category interest
Brand interest
Price drop product interest
Back on stock


E-mail Triggers with multiple Items:

Abandoned Basket
Abandoned Basket Reminder
Abandoned Favorite
Abandoned Favorite Reminder
Price-drop-Basket
Price-drop-favorite

Setup data extensions for E-mail triggers with multiple items:

E- mail Triggers send with multiple items uses two data extension named Add lines data extension and Journey API data extension.

Add Line Data Extension

This is used to send all the products that the user has in their cart or on their favoritelist. Additionally, all attributes from the product catalog can be included in this data extension.

The Data Extension must contain the fields, LineID, BasketIntanceID, BasketID and ProductID where LineID and BasketInstanceID should be set as the Primary keys.

Screenshot from Salesforce Marketing Cloud:

Glossary:

LineID: Is the unique ID of a line and dictates the order of products. LineID also ensures that multiple instances of the same product can be displayed if the customer has added several products with the same product ID to the cart, to ensure that the same product can appear multiple times in the cart. 


BasketInstanceID: The BasketInstanceID is a unique identifier established by Raptor, utilized to associate several lines into a unique basket. The BasketInstanceID is sent within both the ‘Add Lines data extension’ and the ‘Journey API data extension’ to facilitate the merging of data.

BasketID: The BasketID comes from the website tracking and is used to redirect to the customer’s cart on the site. If the BasketID is not available, set the parameter as ‘Nullable.’ 

ProductID: The products that the user has in the cart or on the favoritelist."

👀NOTE!
The External key form the data extension should be set in the Raptor Parameter: SalesForceDataEventsKey

Journey API data extension: 

The Journey Api data extension is set up in the Journey and defines who the trigger should be sent to.

The Data Extension must contain the fields, Subscriber Key, BasketID, Locale, Timestamp, Email and BasketInstanceID, where Subscriber Key and BasketInstanceID should be set as the Primary key.

Screenshot from Salesforce Marketing Cloud:

Glossary

Subscriber Key: The users Subscriberkey

BasketId: The BasketID comes from the website tracking and is used to redirect to the customer’s cart on the site. If the BasketID is not available, set the parameter as ‘Nullable.’ 

Locale: Indicates the country code, used for filtering if you have a multi-national setup. Set the parameter as ‘default’ in Raptor if you operate exclusively in a single country.

Timestamp: The time of the E-mail trigger event, set by Raptor.

Email: The user’s email

BasketInstanceId: The BasketInstanceID is a unique identifier established by Raptor, utilized to associate several lines into a unique basket. The BasketInstanceID is sent within both the ‘Add Lines data extension’ and the ‘Journey API data extension’ to facilitate the merging of data.

👀NOTE!

The External Key from the Journey Api Data Extension should not be set in Raptor.


Instead, set the Event Definition Key from the journey in the Raptor parameter named ‘SalesForceJourneyEventKey’


Merge data from the Add lines data extension and the Journey API data extension:

Once the two data extensions are set up, you have to merge data where the basketinstanceID matches, in order to form E-mail triggers with multiple items. The data should be merged in the email. 
 
E-mail Triggers with one item

When the email trigger only contains one item, all informations are sent in the Journey API data extension.

The Data Extension must contain the fields Subscriber Key, Email, Locale, Timestamp and ProductId.

👀NOTE!
If you are setting up a category interest trigger or brand interest trigger, the field ProductID should be CategoryPath or BrandID.

Screenshot from Salesforce Marketing Cloud:

Glossery

Subscriber Key: The users Subscriberkey

Email: The user’s email

Locale: Indicates the country code, used for filtering if you have a multi-national setup. Set the parameter as ‘default’ in Raptor if you operate exclusively in a single country.

Timestamp: The time of the E-mail trigger event, set by Raptor.

ProductID: The products that the user has in the cart or on the favoritelist.


Once these steps are completed, you are ready to receive data from Raptor’s Email triggers!

👀NOTE!

If you want to add more data from the product catalog, reach out to Raptor professional service at ps@raptor.dk, since the data model has to be expanded.