<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nicolas Vanden Bossche on Medium]]></title>
        <description><![CDATA[Stories by Nicolas Vanden Bossche on Medium]]></description>
        <link>https://medium.com/@nvandenbossche?source=rss-9c1a68b0be8e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v_CS4a5henHij9KKrYR3EA.jpeg</url>
            <title>Stories by Nicolas Vanden Bossche on Medium</title>
            <link>https://medium.com/@nvandenbossche?source=rss-9c1a68b0be8e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:58:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nvandenbossche/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[B2C Transactional Messaging]]></title>
            <link>https://medium.com/salesforce-architects/b2c-transactional-messaging-3abd33742fc9?source=rss-9c1a68b0be8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3abd33742fc9</guid>
            <category><![CDATA[salesforce-architect]]></category>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[transactional-messaging]]></category>
            <category><![CDATA[marketing-cloud]]></category>
            <category><![CDATA[cloud-commerce]]></category>
            <dc:creator><![CDATA[Nicolas Vanden Bossche]]></dc:creator>
            <pubDate>Thu, 05 Oct 2023 14:18:00 GMT</pubDate>
            <atom:updated>2023-10-06T06:23:59.606Z</atom:updated>
            <content:encoded><![CDATA[<h4>With Service Cloud, B2C Commerce, and Marketing Cloud</h4><p>Transactional messaging is a key topic in business-to-consumer (B2C) scenarios. It requires fast communication between many systems.</p><p>To give a simple example, customers expect their order confirmation as soon as they place an order. Think of all the systems that must interact in this situation:</p><ul><li>A system for registering a customer’s action such as placing an order.</li><li>A system that sends out a message confirming the user’s transaction.</li><li>A system of record for customer data. (This is needed to tailor the transactional message to the specific customer.)</li></ul><figure><img alt="Diagram showing the key systems that interact in a B2C Messaging Scenario" src="https://cdn-images-1.medium.com/max/1024/1*EDM5C0MuvLvpld2lIfoNXw.png" /></figure><p>This post illustrates how transactional messaging works in such a scenario using B2C Commerce, Marketing Cloud, and Service Cloud. You can also apply the ideas outlined below to other system landscapes, for example ones with a different digital commerce solution or customer system of record.</p><h3>Identifying the challenge</h3><p>Let’s break down the challenge into bite-sized pieces.</p><p>First, you’ll need a near-real-time solution that delivers the message end-to-end in under a minute. Customers don’t want to wait for an order confirmation for much longer. The faster, the better.</p><p>Second, the system calling the <a href="https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/transactional-messaging-api.html">Transactional Messaging API</a> on Marketing Cloud needs to have access to the subscriber key. A subscriber key is a unique identifier for each subscriber in Marketing Cloud. You can only send out a transactional message with this key.</p><p>Finally, you should assume that many systems and channels may want to use this capability. Imagine a promotional gamified mobile app that registers the customer, or a separate loyalty management app. The solution should allow transactional messaging for all those systems in parallel.</p><h3>Brainstorming possible solutions</h3><p>In a setup with the Salesforce Platform and Marketing Cloud, it’s <a href="https://help.salesforce.com/s/articleView?id=sf.icx_b2c_crosscloudengagement_connectors.htm&amp;type=5">recommended</a> to use the Contact / Person Account record ID of Service Cloud as the subscriber key. With that in mind, let’s think about different approaches for tackling the challenge.</p><p>There are three possible avenues you could take. The first avenue is to retrieve the subscriber key in a just-in-time fashion — right before the call to the Transactional Messaging API on Marketing Cloud. The second avenue is syncing the subscriber key to all systems that need to trigger the Transactional Messaging API. The third avenue is to use a middle layer that can match customers with their subscriber key. This needs a mapping between identifiers in different systems.</p><p>All these possibilities seem perfectly valid. That’s because they all are valid, depending on the situation. This is why we need architects — to find the solution that best fits the business. So let’s take a closer look at each of these solutions in turn.</p><p>Keep in mind that the scenario outlined in this post is part of a larger system landscape, as pictured below.</p><figure><img alt="Diagram showing the overall landscape of a B2C Messaging Scenario and how the various systems interact" src="https://cdn-images-1.medium.com/max/1024/1*o8EJo0pM-kekC7xsQh6r5w.png" /></figure><h3>Retrieving the subscriber key in real time</h3><p>In the just-in-time approach, an event is received from the source system. This could come from Commerce Cloud or from another system. In this example, a separate mobile app creates customer accounts in a gamified way. You’ll also see that MuleSoft is part of the overall landscape, serving as an integration layer. This enables API reuse and avoids point-to-point connections.</p><p>The challenge in this scenario is that the sending system is not aware of the subscriber key. It is only aware of the primary customer ID, shared by the customer data management system. It will need to use this customer ID to retrieve the subscriber key. It can then use the subscriber key to call out to the Marketing Cloud Transactional Messaging API.</p><figure><img alt="Diagram showing the steps to retrieve the subscriber key in real time." src="https://cdn-images-1.medium.com/max/1024/1*TL30IOznuFNlFNnxXhAtrg.png" /></figure><p>This looks like a perfect solution, but as architects we need to see the bigger picture. For example, is this solution scalable to millions of messages per day? Can it handle peak traffic days, like Black Friday? What are the incremental costs at such scales? The key factor here will be the number of API calls.</p><p>As you can see, this approach requires an extra API call for each message sent. This might work at small scale, but architects must also consider high-scale situations with increased cost and performance impact. So let’s look at another solution that doesn’t need this extra API call.</p><h3>Syncing the subscriber key to the source system</h3><p>You need to have the subscriber key in the source system if you want to avoid an extra API call. If you look at the <a href="https://help.salesforce.com/s/articleView?id=sf.icx_b2c_crosscloudengagement_dataflow.htm&amp;type=5">solution kit</a> for integrating B2C Commerce, Service Cloud, and Marketing Cloud, you’ll see two options. The first option, covered in this section, is a custom integration that syncs the subscriber key. The second option, covered in the next section, uses a middle layer.</p><p>Within the first option, there are two ways to get the subscriber key into the systems that need it for transactional messaging. You can either sync the subscriber key as part of the customer creation (see diagram below), or set up a publish/subscribe mechanism that generates events on customer creation.</p><figure><img alt="Diagram showing the interactions to sync the subscriber key to the source system" src="https://cdn-images-1.medium.com/max/1024/1*w1Mieny9Y8Dz_qVA2akEyw.png" /></figure><p>This syncing approach is solid. It avoids extra API calls because the source systems have access to the subscriber key. The downside is that you need to set up the syncing mechanisms.</p><p>You can reduce the effort required by reusing existing customer data flows. Or you can look into using standard connectors. One example is <a href="https://help.salesforce.com/s/articleView?id=sf.mc_co_marketing_cloud_connect.htm&amp;type=5">Marketing Cloud Connect</a> for Service Cloud. Another is the <a href="https://github.com/SalesforceCommerceCloud/marketing-cloud-connector">Marketing Cloud Connector</a> for Commerce Cloud. (The latter is only accessible if you have already <a href="https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-github-repo-access.html">linked your GitHub and Commerce Cloud accounts</a>.)</p><h3>Real-time matching with a middle layer</h3><p>For this solution, you need a middle layer that is aware of both the primary customer ID and the subscriber key. All systems have the primary customer ID. The subscriber key is only known to Service Cloud and Marketing Cloud. Let’s look at how to connect the dots with MuleSoft or Data Cloud as the middle layer.</p><p>Since the landscape in this example is already using MuleSoft, let’s first take a look there.</p><p>When creating customers for the first time in Service Cloud, you get back the subscriber key. You can store the mapping between the primary customer ID and the subscriber key in MuleSoft via <a href="https://docs.mulesoft.com/object-store/osv2-faq">Object Store</a>. This can then serve as a caching layer. Or, you can set up an in-memory key-value data store such as <a href="https://devcenter.heroku.com/articles/heroku-redis">Heroku Redis</a> (which provides more persistent storage) and connect MuleSoft to that data store.</p><figure><img alt="Diagram showing real time subscriber key matching via a middleware layer" src="https://cdn-images-1.medium.com/max/1024/1*w37eNaHw8SVwmtPgFN0UqA.png" /></figure><p>This approach requires neither extra API calls nor up-front syncing of the subscriber key. You do, however, need to consider some specifics for both Object Store and Redis.</p><p>Object Store will only store key-value pairs for a limited amount of time. It serves as a cache. So whenever the key-value pair is evicted based on <a href="https://docs.mulesoft.com/object-store/#time-to-live">time-to-live</a>, you’ll need to retrieve it again via an API call. You can <a href="https://devcenter.heroku.com/articles/heroku-redis#persistence">persist</a> Redis data but it requires you to maintain another system. In both cases, you’ll need to educate your team members on how to use these technologies.</p><p>Let’s not forget the elephant… erm… rabbit in the room: Data Cloud! One of Data Cloud’s key features is real-time matching of customers from different systems. Also, it has native connectors to different Salesforce products to make integration easier.</p><p>You’ll need to define data streams coming from the source systems such as Service Cloud, Marketing Cloud, Commerce Cloud, and the SDK of the mobile app. Once these are defined, you can match, in real time, data coming from the <a href="https://help.salesforce.com/s/articleView?id=sf.c360_a_ingestion_api.htm&amp;type=5">Ingestion API</a>, such as an order confirmation event. This matching is based on customer identifiers that are already in the system, such as subscriber key or primary customer ID.</p><p>Data Cloud will then send out a transactional message from Marketing Cloud via a <a href="https://help.salesforce.com/s/articleView?id=sf.c360_a_data_actions_CDP.htm&amp;type=5">Data Action</a>. Data Actions support activation in Marketing Cloud for both batch and streaming objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5KlMa_PBChC_okhI_ZmTjQ.png" /></figure><p>The Data Cloud solution also tackles the issues of extra API calls and subscriber key syncing. Plus, you don’t have to worry about persistence, as Data Cloud stores the data. It does involve introducing a new technology, for which you need to consider cost and available skills.</p><p>The above diagram is only one use case that can be served by Data Cloud. It’s a good idea to take an overall look at the use cases of Data Cloud to confirm whether it’s the right fit for your technology strategy. It’s more of a long-term, strategical solution whereas the MuleSoft solution is more short-term and tactical.</p><h3>Conclusion</h3><p>When sending transactional messages with Marketing Cloud, the subscriber key is essential. This post covered the different challenges this poses and then explored possible solutions: retrieving the subscriber key in real time, syncing the subscriber key up front, and using a middle layer to store the subscriber key and match it in real time.</p><p>Each solution has its own advantages and disadvantages. You can only make a decision by looking at all alternatives and your specific business situation. This is the job of a Salesforce architect, along with making a recommendation based on the facts and your experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3abd33742fc9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/salesforce-architects/b2c-transactional-messaging-3abd33742fc9">B2C Transactional Messaging</a> was originally published in <a href="https://medium.com/salesforce-architects">Salesforce Architects</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>