The Emarsys Salesforce Commerce Cloud plug-in was certified by Salesforce in August 2021. The integration and documentation are available on Salesforce Marketplace.
The Emarsys for Salesforce integration allows you to use Emarsys functionality without leaving your Salesforce Commerce Cloud site. You can maximize customer engagement and conversion rates by providing a highly customized customer experience, including product recommendations.
By implementing the Emarsys solutions on your Salesforce platform, you can collect data from customer interaction with your web shop, gain insights into their behavior and reach them through email campaigns and tailored recommendations.
If you are interested in using this integration, please contact Emarsys Support.
Features and use cases
The Emarsys integration cartridges will allow you to use the Emarsys Business Manager module extension to make the necessary configurations for the following:
- Newsletter subscriptions methods (global footer subscription, checkout process subscription, and my account subscription):
- Define the opt-in strategy for each newsletter subscription method (please see below details regarding the opt-in strategies)
- Configure external events to be triggered once the end user has subscribed
- Transactional emails (order and shipping confirmation emails):
- Define and map the fields that will be added to the transactional emails
- Configure the external event that will trigger the transactional email
- Catalog configuration (Product data feed):
- Define and map the fields that will be added to the product export feed
- Choose the type of catalog product export:
- Export only main product
- Export product variations
- Smart Insight configuration (Order export feed):
- Define and map the fields that will be added to the order export feed
- Initial database load:
- Define the mapping between B2C Commerce and Emarsys fields - this mapping will be used to create the auto-import profile (calling an Emarsys endpoint) and to send data directly tp Emarsys using the API.
The Emarsys integration cartridges also allow end users to subscribe to newsletters from the website storefront using the subscription methods:
- Global footer newsletter subscription
- Newsletter subscription during the checkout process
- Newsletter subscription from My account section for registered users
The Emarsys integration cartridges allow registered end users to unsubscribe from newsletters.
As stated above, you have the option to set the desired opt-in strategy for each one of the three storefront subscription methods. The available values for the opt-in strategy are the following:
- Single opt-in: the customer records get the system field
opt-inin the Emarsys Platform set to
- Double opt-in: the customer (end user) needs to click a link in a confirmation email in order to get the system field
opt-inin the Emarsys Platform set to
External events: an external event is an Emarsys instance. Every external event has ID that can be used to run some programs or send emails using Emarsys API. External events used not only to subscribe customers for newsletters. There are also some other cases where external events are triggered:
- On the Contact Us page after form is submitted
- In the Emarsys-OrderStatusСhangeNotification job to notify Emarsys about shipped and canceled orders
- On the Login page when a customer sends an email to reset password
- On the Login page when a new customer account is created (registration form submitted)
cart: on the page where the cart is shown
category: on pages which lists products in a category
purchase: on the order confirmation page
setCustomerId: on every page as soon as the
setEmail: on every page as soon as the email address is known
view: on every product detail page
searchTerm: on the search results page
Business Manager configurations
A new Business Manager extension has been created in order to allow you to configure the behavior for newsletter subscriptions and to define the B2C Commerce fields that will be added to transactional emails (order and shipping confirmation emails) that will be sent through the Emarsys Platform. The extension will also allow you to map B2C Commerce with Emarsys fields for the initial database load feature.
Newsletter subscription box - global footer/checkout process/My account page
- The page opens with the Global/checkout/account footer tab selected by default.
- You need to select the Opt-in strategy. There are two options available:
Single Opt-In (the recipient gets the
opt-insystem field set to
trueimmediately in the Emarsys Platform). Optionally, you can select an external event that gets fired after the user record was transmitted to Emarsys.
Double Opt-In (the recipient needs to click a confirmation link in an email to get the system field
opt-inin Emarsys Suite set to
true). If double opt-in is selected, then you must select the external event that should be triggered in the Emarsys Platform to send out the confirmation email. Optionally, you can set a second event that will be triggered as soon an end user clicks the confirmation link (e.g. to send a welcome email).
Transactional emails - order confirmation
As soon as an end user finishes a transaction, the order data should be transmitted to the Emarsys Platform and the corresponding external event must be triggered. The external event will trigger an order confirmation email. B2C Commerce will check in the Emarsys Platform if the user record already exists and based on the result it will update the record or create a new one. Also, you have the option to choose what fields will be included in the order confirmation email.
Transactional emails - shipping confirmation
As soon as a shipment was finished, an email should be sent to the end user and the corresponding external event must be triggered. The external event will trigger a shipping confirmation email.
Transactional emails - order cancelled
As soon as a shipment was finished, an email should be sent to the end user and the corresponding external event must be triggered. The external event will trigger an order cancelled email.
Initial Database Load - configuration screen
The initial database load feature will upload the existing B2C Commerce customers to the Emarsys Platform. Please find below the steps required to accomplish this:
- Create the mapping between B2C Commerce and Emarsys fields using the initial database load configuration screen. The mapping will be used to generate an auto-import profile on the Emarsys side and to send data directly to Emarsys using the API.
In order to generate the mapping, a new configuration screen has been created.
Send Order Confirmation Email - send email
You can manually send order an confirmation email to the customer at the order number via the Emarsys Platform.
After sending the message, the order changes the status of
External events page
After successful execution of the Emarsys-Setup job, all initial event configuration is already set. The External events page is developed to change event configuration easily. In order to get there, follow the instructions below:
1. All external events are separated by their type into two tables: Newsletter Subscription Events and Other Events. Event mapping is taken from the appropriate fields of the
EmarsysExternalEvents custom object.
2. Each table has an Add event button over the top right corner. Click this button to map new SFCC events. Depending on the type of the event, a new SFCC event should be listed in one of the
EmarsysExternalEvents source fields (
otherSource) but should not be on the page (should not yet be mapped).
3. If the appropriate Emarsys event is chosen for mapping, this event will be created using the Emarsys API. If there are any issues during this request, an error notification will be shown at the top of the Events page.
By installing the Emarsys cartridge, you can provide your end users with the option of subscribing to newsletters from the website storefront. There are 3 ways for an end user to accomplish this:
- using the newsletter subscription box displayed on the global footer,
- during the checkout process, by selecting the Please add me to the B2C Commerce email list. B2C Commerce does not share or sell personal info checkbox on the Billing page,
- from the B2C Commerce My Account page.
All these options are detailed below.
Newsletter subscription box - global footer
The end user can subscribe to newsletters from the footer on every page of the storefront. There are 2 ways to do that:
- Subscribe directly by typing the email address in the subscription box and clicking the Subscribe button.
- Clicking on the Subscribe button without entering any data into field. This will redirect the user to the Sign up form. The user can subscribe by completing all the necessary fields and clicking the Sign me up for email button. The data is sent to Emarsys.
Newsletter subscription during checkout process
The end user also has the option to subscribe to a newsletter during the checkout process, as described below but you need to add this option to the default subscription is false.
- As a guest or registered user add a product to the cart.
- Proceed to checkout.
- At the billing step, type your email address in the E-mail field.
- Complete all the mandatory fields and proceed to the next step, so that the end user data is sent to the Emarsys Platform.
Newsletter subscription or unsubscription - My Account
Registered users can subscribe to or unsubscribe from a newsletter from their Profile page but this functionality needs to be added on the Storefront:
- Open the Storefront and log in.
- In the left navigation bar, clickthe Email Settings link.
- Click the Subscribe button to open an email sign up form. Complete the fields and click the Sign me up for email button to subscribe to newsletters.
- By clicking the Unsubscribe button, end users will unsubscribe from newsletters.
B2C Commerce landing pages
Depending on which opt-in strategy has been configured for the subscriptions methods and on the unsubscription strategy (direct or indirect), the end user can be redirected to several landing pages as follows:
- Thank you page - Single Opt-in strategy
- Data submitted page - Double Opt-in strategy
- Thank you page - Double Opt-in strategy
- Thank you page - Unsubscribe
Emarsys Predict is being used to recommend products based on a self-learning algorithm. Recommended products can be rendered within shop pages and within emails. Emarsys has its own system called ScarabResearch that renders the recommendations.
The user browsing information is pushed into Emarsys on the following pages:
- Cart page: list of items in the visitor's shopping cart
- Category page: category currently browsed by the visitor
- Order Confirmation Page: list of items purchased by the customer
- Search Page: Push search term entered by the visitor
- Product Page: Push the unique ID of the product being browsed
While browsing the site the user should be able to see the recommendations on the following pages:
- Product detail page
- Home page
- Cart page
- Search results page
- Category page
- Order confirmation page
Recommendations are displayed based on previous user actions from the recommendation catalog exported into Emarsys.
- A user enters the site.
- The customer visits a product detail page of a product.
- The customer adds a product to the basket.
- The customer goes to the Cart page.
- The list of products recommended by Emarsys Scarabresearch is displayed.
Once the cartridges are installed and the credentials have been configured inside the Business Manager, a job schedule needs to be run in order to get all the data that is necessary from the Emarsys Platform for the integration to work:
- Emarsys profile fields (profile fields are stored in a custom object on the Salesforce Commerce Cloud side:
- External event configuration (whitelisted SFCC side events and their mapping with Emarsys side events:
- The source id defined in Emarsys (will be saved on the Salesforce Commerce Cloud side in a custom preference attribute: Merchant Tools > Site Preferences > Custom Site Preferences > Emarsys > Emarsys Source ID)
- All available values for Emarsys single choice fields (will be saved on the Salesforce Commerce Cloud side in a custom preference attribute: Merchant Tools > Site Preferences > Custom Site Preferences > Emarsys DB Init Configuration > Emarsys Single Choice Value Mapping)
All this data will be automatically stored in the Salesforce Commerce Cloud when the job is successfully executed.
EmarsysExportOrders will export order data into a CSV file through a new job schedule. Every field in the CSV file will be mapped to a corresponding field defined in the Emarsys documentation.
This job generates a user profile and sends profile data directly to Emarsys.
The new job schedule Emarsys-ExportCatalog will export catalog data into a CSV file. Every field in the CSV file will be mapped to a corresponding field defined in the Emarsys documentation.