Walkthrough: Preparing to install an SFMC Content Exchange connector
This topic explains how to prepare for deploying the Sitecore Connect for Salesforce Marketing Cloud - Content Exchange (SFMCCE) connector to Docker and Azure Kubernetes Service.
Before you install SFMCCE for containers, you must have the following:
- Docker Desktop installed and running. For instructions on how to set up the Docker environment, see the documentation.
- If the installation is done on Docker, you must have the Sitecore Docker container files deployed on a local machine . For instructions on how to prepare the Sitecore containers, see the Installation Guide for Developer Workstation with Containers on the Sitecore download page.
- If the installation is done on Kubernetes, you must have the Sitecore AKS container files deployed on a local machine . For instructions on how to prepare a Sitecore environment with Kubernetes, see the Installation Guide for Production Environment with Kubernetes on the Sitecore download page.
- An SFMC account where you can create an installed package with appropriate access rights.
This walkthrough describes how to:
- Add an API integration package to your installation.
- Prepare a Salesforce Marketing Cloud (SFMC) connection string for your Sitecore installation.
- Prepare the installation files.
- Build the Docker images.
Add an API integration package to your installation
To add an API integration package to your SFMC installation:
-
Follow the steps in the Marketing Cloud Package Development documentation for Salesforce, in the Create and Install Packages section.
-
Select the
Server-to-Serverintegration type for the API Integration package. -
Add the following required rights for your connection:
Category Type Rights Assets Documents and images - Read
- Write
Assets Saved content - Read
- Write
Hub Tags - Write
Prepare an SFMC connection string for your Sitecore installation
When you install an SFMC connector you must specify a connection string to allow Sitecore to connect to SFMC.
To construct the SFMC connection string:
-
In Salesforce, in the component you created, in the Components area, make a note of the following values:
- Client Id
- Client Secret
- Authentication Base URI
- REST Base URI
- SOAP Base URI
-
Use the values to construct a connection string with this format:
Prepare the installation files
To prepare the files you need for the installation:
- Download the SFMCCE container deployment package from the Sitecore download page. Extract it to your local workstation with the folder structure intact.
- Go to the folder into which you extracted the SFMCCE container deployment package. Go to the folder for the Windows version and topology you are using, for example,
compose\ltsc2019\xp1. - Open the
.env-examplefile in an editor. Copy all the variables to the clipboard. - Go to the Sitecore container deployment folder on your local machine. Go to the folder for the Windows version and topology you are using, for example,
compose\ltsc2019\xp1. - Open the
.envfile in an editor, and paste in the variables from the SFMCCE.env-examplefile. Replace the default value forSFMC_CONNECTIONSTRINGwith the connection string you prepared in Prepare an SFMC connection string for your Sitecore installation. - From the SFMCCE
compose\<version>\<topology>folder, copy thedocker-compose.override.ymlfile to the Sitecore container deploymentcompose\<version>\<topology>folder (where thedocker.compose.ymlfile is).
Build the Docker images
When you have prepared the installation files, you must create Docker files for each role, and build the Docker images.
For more information on image assets, see the documentation on how to Add Sitecore Modules.
To build the images:
-
Go to the Sitecore container deployment folder on your local machine. Go to the folder for the Windows version and topology you are using, for example,
compose/ltsc2019/xp1. Create a folder and name it module. -
In the
modulefolder, create this subfolder:cm
-
In the subfolder, create a new file and name it
Dockerfile. In theDockerfilefile, enter the following instructions: -
In the
compose\<version>\<topology>\docker-compose.override.ymlfile, add build instructions for each role. If you are using, for example, the XP0 topology, the file will look like this: -
In the
compose\<version>\<topology>\.envfile, add the asset image version. For example:NoteYou can find the image version in the Sitecore Docker Images repository.
-
In the Windows console, go to the folder containing the
docker-compose.override.ymlfile. Run the commanddocker-compose build. -
If you are deploying to Docker, continue with the instructions in Add the SFMCCE connector module to Sitecore in Docker.
If you are deploying to Kubernetes, continue with the instructions in Walkthrough: Adding the SFCRMCE connector module to Sitecore in Azure Kubernetes Service.