Let’s forge impactful marketing campaigns with consistent content and branding by harnessing Salesforce CMS within the Marketing Cloud. This hybrid CMS empowers teams to create centralized content for distribution across various digital touchpoints, whether Salesforce-driven or external.Prior to integration, gather prerequisites:
- Salesforce Account with CMS App
- Marketing Cloud Account
- Github Account
- Heroku Account
A step-by-step roadmap for integrating Salesforce CMS with Marketing Cloud.Step 1: Create a Headless Marketing Cloud Channel in Salesforce CMS
- Create a headless Marketing Cloud channel in Salesforce CMS by naming it "Marketing Channel" with a public connection type.
- Select the Marketing Channel in your CMS Workspace and note down the channelId.
- Retrieve the channelId by logging into Workbench, navigating to Rest Explorer, and executing the GET http method for the service URI: `/services/data/v50.0/connect/cms/delivery/channels`.
- Copy the channelId associated with the "Marketing Channel" from the expanded results.
Your Salesforce CMS content is now ready for use across various platforms, such as emails, websites, and custom apps.
In this phase, craft your content within the Salesforce CMS Workspace to seamlessly incorporate it into the integration. Follow these steps:
- Within the Salesforce CMS app, access the workspace linked to the designated public channel, "Marketing Channel.
- Initiate the process by clicking on "Add Content".
- Opt for your desired content type—be it Document, Image, or News—and proceed to create it. Fill in the necessary fields, then save your draft.
- Once satisfied, click "Publish" to finalize the content.
This content is now ready for utilization within an email marketing campaign, streamlining your marketing endeavors.Step 3: Generate a Private Key and Self-Signed Digital Certificate
For the purpose of a server-to-server integration between Salesforce CMS and Marketing Cloud using the OAuth 2.0 JWT bearer flow, certain prerequisites must be met. This flow necessitates a digital certificate and a corresponding private key for proper functioning. The digital certificate needs to be uploaded to the custom connected app, which is a crucial element in the JWT bearer authorization flow. This certificate can either be provided by a recognized certification authority or, as an alternative, you can craft a private key and a self-signed digital certificate using OpenSSL. This step ensures the secure and seamless operation of the integration, establishing a robust foundation for the communication between the two platforms.Step 4: Establish a Connected App
In order to seamlessly access Salesforce CMS content through APIs and ensure a smooth integration, the creation of a connected app is essential. This app allows for OAuth-invoked Salesforce API interactions from a NodeJS App hosted on Heroku. Follow these concise steps:
- Access "App Manager" from Setup and click "New Connected App."
- Provide the connected app name and associated email address.
- Enable OAuth settings and input a callback URL (even though it won't be used).
- Opt for digital signatures and upload your server.crt file.
- Specify OAuth scopes, including data access, requests on behalf of users, and web access.
- Save the configuration and securely store the consumer key.
- Edit policies to enable a streamlined login process by selecting "Admin approved users are pre-authorized."
- Create a permission set, such as "CMS Connected App Permission Set," and assign it to pre-authorized users like the CMS User.
- Within the permission set, assign the connected app by clicking "Assign Connected Apps," then selecting "CMS for Marketing Cloud."
By adhering to these steps, you establish a connected app that enhances API interactions and expedites the integration process while maintaining security and convenience.Step 5: Deploy Github Repo to Heroku
Demonstrating a powerful approach for seamless integration, this step involves deploying a sample NodeJS app from a Github repository onto Heroku. This app exemplifies the utilization of the Block SDK to pull Salesforce CMS data into Marketing Cloud Content Builder, serving as an illustrative tool.Prerequisites:
- Heroku.com account for hosting the NodeJS App.
- Github account for code hosting and Heroku deployment.
Sample app code repository: [https://github.com/salesforce-marketingcloud/salesforce-cms-content.git]
- Fork the Github repo and utilize the "Deploy to Heroku" button for a straightforward deployment process onto your Heroku account.
- Configure essential Heroku config variables: In "Setup," access "Reveal Config Vars."
- channelID: Enter the previously copied Salesforce CMS channelID.
- clientID: Input the Consumer Key from your Connected App.
- cmsUser: Specify the Salesforce CMS Username.
- instanceURL: Enter the Salesforce login URL, which could be https://login.salesforce.com or https://test.salesforce.com
- limit: Set the count of CMS records to display (default: 25, max: 100).
- privateKey: Copy the contents of the server.key file.
By following these steps, you successfully deploy the NodeJS app, unlocking its potential for streamlined Salesforce CMS data integration within Marketing Cloud Content Builder.Step 6: Develop a Marketing Cloud Package
Marketing Cloud's Content Builder serves as a versatile cross-channel content management system, catering to diverse workflows – whether coding or employing plug-n-play HTML.
Given our aim to seamlessly import content from Salesforce CMS into Marketing Cloud Content Builder using APIs, proceed with the following steps to craft a custom App within Marketing Cloud:
- Within Marketing Cloud setup, establish a new package: Navigate to Setup > Installed Packages > New.
- Provide a Name and Description for the package, then save your configuration.
- Select "Add Component," opt for "Custom Content Block," and proceed.
- Enter the Component Name, Description, and the Endpoint URL (URL linked to your Heroku-deployed app), then save.
By completing these concise actions, you set the stage for content integration, harnessing the capabilities of Marketing Cloud's Content Builder to enhance your workflows effectively.Step 7: Craft an Email in Marketing Cloud Content Builder with CMS Content
Commence the email creation process within Content Builder. Choose your preferred template and proceed by clicking on the content type icon, which includes Images, Docs, or News. Here, you'll have access to your Salesforce CMS content. Seamlessly integrate this content into the Email template that aligns with your campaign's essence by selecting the pertinent CMS resource. This step ensures a cohesive and impactful campaign communication.Step 8: Sample App for Retrieving Salesforce CMS Content App Overview:
Explore this Content Block SDK app, designed to fetch Salesforce CMS content based on image, news, or document content types through a channel. Subsequently, this content can be incorporated into emails. Utilizing Node.js, Express as the framework, and Salesforce Marketing Cloud Block SDK for interaction, the app exemplifies seamless integration.Code Overview:
The app comprises 3 total routes within 1 view:
- View: index- This homepage provides the user interface. Selection of a content type icon leads to one of the following routes.
- Route: getCMSDocuments - Fetches CMS documents based on the standard cms_document content type for a specific channelId.
- Route: getCMSImages - Retrieves CMS images based on the standard cms_image content type for the specified channelId.
- Route: getCMSNews- Fetches CMS news content based on the standard news content type for the channelId.
Discover the full code and detailed implementation by exploring the Sample App Repository https://github.com/salesforce-marketingcloud/salesforce-cms-content This app enables the dynamic integration of Salesforce CMS content into Marketing Cloud, enhancing the email creation process.In Summary
This guide underscores the seamless utilization of Salesforce CMS content within Marketing Cloud to bolster marketing campaigns. A pivotal strategy to harmonize digital experiences involves a robust integration between marketing automation platforms like Marketing Cloud and content management systems like Salesforce CMS. This synergy empowers efficient and impactful marketing endeavors.
- Explore the features and benefits of Salesforce Experience Cloud
- Driving Success with Dotsquares: 5 Key Benefits of Salesforce Managed Services
- Collaborative Expansion: Strengthened Ties Between Salesforce and Google
- Unveiling the Salesforce Einstein Analytics Powerhouse: From Insights to Action
- Revolutionizing Retail with Salesforce Commerce Cloud
- Mastering Automation in Salesforce: A Comparative Exploration of Flow and Apex
- Salesforce Unveils New Slack User Experience Designed for Focus and Productivity
- Utilizing AI and Data Strategies in Salesforce CRM for eCommerce Success
- The Future of Online Retail: A Deep Dive into Salesforce B2C Commerce
- Understanding the Role of RAML in MuleSoft: Benefits for End Users