Integrate Campaign Classic with AEM

27 June 2019by Dylan Reniers

Goal of the article

This blog post is a practical guide on how to set up Adobe Experience Manager (AEM) and Adobe Campaign Classic (ACC), so that you are able to create email templates inside AEM, and use those templates to create campaigns inside ACC. These email templates will allow you to personalize and enrich the content with data coming from ACC.

If you’re looking to connect AEM with Adobe Campaign Standard, you should know that – according to people from Adobe, the setup is pretty much the same, with a difference being that you have to ask Adobe for your username and password to create a connection from AEM to the Adobe Campaign Standard servers.

Since this post will primarily focus on ACC and not ACS, I will not explain the differences in setup here between the 2 products.

Target Audience

Anyone who is a developer of AEM solutions and who (has a client that) needs to integrate with Adobe Campaign Classic. If you’re not familiar with AEM at all, I recommend you let someone with knowledge of the platform take care of this for you.


To integrate Adobe Campaign Classic, there are only a few prerequisites that need to be taken care of:

  • access to an Adobe Campaign Classic (either v6.1 or v7)
  • an AEM author instance and an AEM publish instance (both need to be 6.1 or higher).
  • having some understanding of how AEM and Campaign work. The setup on Campaign is fairly easy, but when we get to the point where we can start customizing to the business’ needs, that’s where things might get very tricky if you’re only just starting out with AEM or Campaign or have no experience at all.
  • install the required dependencies on each platform. On Adobe Campaign, it’s as easy as installing a package onto your instance and configuring it. You can install the package by going to Tools > Advanced > Import Package.

Please note you need actual access to the server, which is hosting ACC, because you’ll have to edit a configuration file that is located somewhere on the device itself. The reason why you need a publish instance, is because when you’re going to use assets in your mails (like images), they should be publicly available. Assets on your author instance shouldn’t be publicly available, so that’s why we have a publish instance for it. This means you’ll also need to set up replication between your author and publish environment.

Select “Install a standard package” and click Next. Scroll down a bit, until you see AEM Integration. Check the install checkbox next to it and click Next and then Start.

It is important to note that at this point, we will need actual access to the server that is hosting Campaign. To allow access from AEM to ACC, we are required to have a security zone in place. Since this is not the focus of this document, I won’t describe how that is done, but here’s a link here to an article that will explain you everything in detail on how to set this up.

After this is done, you shouldn’t need to do any more configuration on Campaign itself if you’re working with the out-of-the-box features that connect Campaign and AEM to each other.
On the AEM side of things, we don’t necessarily have to install something extra to get us started.

Setting up the environments

Making sure that we can set up a connection between both Adobe products is not the hardest task in the world but having knowledge on both products will definitely help you along the way as we move forward.

Adobe Campaign Classic

External account

The first thing we should do is setup a connection from Campaign to AEM. To achieve this, we need to configure an external account. This account will be of type AEM and will contain the required fields, such as URLusername and password.

Creating this account is exactly the same as you would create any other external account on ACC, but for those who are new to ACC, you can check in the following screenshot where to create the user:

Please note that in the screenshot I used the “admin” account of AEM. This is not a requirement, as the documentation states that you can achieve the same thing by setting a password on the campaign-remote user in AEM and use the credentials of that user to set up the connection.

Do not use something like localhost as the server, since the AEM instance and the ACC instance will most likely not be on the same machine. If you want to use a local AEM instance, you can use ngrok for example to expose your local instance to the public internet.

For those of you who have absolutely no experience in ACC (and trust me, I don’t blame you), creating “something” new is done by clicking the blue page icon with the orange star in the top right corner of your client. Keep that in mind when we have to create something else, besides this user, as the icon will always be the same icon, regardless of what you’re creating.

Target mapping

The next thing we should do is add a target mapping. A target mapping is basically a way of ACC to know which fields it should use to reach the end-user in a campaign. For example: when we have an email campaign, it should take the “email” field of the recipient. If we create a SMS campaign, it should take the “phone number” field.

To create a target mapping, go to Administration > Campaign Management > Target mappings. If you do not see a target mapping with the internal name “mapRecipient”, you should create a new mapping (remember, the blue page icon), label it Recipients, set the internal name to mapRecipient and the filtering dimension to nms:recipient. If the mapping already exists and has these values, you shouldn’t have to do anything. Your end result should look like this:

The reason why you should give it the mapRecipient name, is because it is used by AEM as a default. If you go inside CRX, you will find that exact name being used at /libs/mcm/campaign/templates/ac-email-61/jcr:content, as shown here:

If you would change it here, you would have to change it in ACC as well for ACC to be able to fetch the email templates from AEM.

The aemserver operator

Another thing we have to do is to create a user inside ACC for AEM to create a connection from AEM to ACC. To do this, go to Administration > Access Management > Operators. You should see an “aemserver” account. Double click it to edit it and click on “Reset password…” and pick a new password for this user. Remember it as we will need it later.

Adobe Experience Manager

Cloud configuration

In AEM up we now need to configure a cloud configuration. Depending on which version of AEM you’re using, this can be a little bit different. If you’re using AEM 6.3, you must go to Tools > Deployment > Cloud services. In AEM 6.4 and higher, you should go to Tools > Cloud services > Legacy Cloud Services.

Once you’re on the cloud services page, scroll down to “Adobe Campaign” and click “Configure now”.

Once you’ve clicked on it, it will ask you for a title. This can be pretty much anything you’d like and then click Create.

Remember that duplicated “aemserver” user we created earlier in ACC? Well, we are going to have to use its credentials right now! Fill in the username and password for your aemserver account. For the API End Point, just set it to the URL (and potentially port) on which your ACC is available. Make sure not to add a trailing slash! Click on “Connect to Adobe Campaign” to verify that the connection works and click OK to save your configuration.

Should you run into issues here, make sure that your AEM instance can reach ACC without any proxies and that your username/password combination is correct, as well as the API End Point.

Now that’s done, we should be set to start creating email templates inside of AEM and use them for our email campaigns in ACC.


If you want to send a mail that contains an image, you need to make sure that your externalizer is configured correctly. To configure it, go to http://youraemauthor:port/system/console/configMgr and search for “Day CQ Link Externalizer”. If you look at it, it will use http://localhost:4503, but obviously that address is not reachable from your mail server. Change this value to a value that is publicly accessible. If you want to use a local instance here, use something like ngrok again to expose it to the public internet. Also, make sure that your images are published before using them. Save the configuration.

Creating your email template

Creating a campaign in AEM

Now that setting up and configuration is done, we can finally start deep diving into what we are really here for. But before we can start creating an actual email template, we should start by creating a campaign inside of AEM. For illustration purposes, I’ll make use of the We Retail implementation, which we all know and love, and is provided by Adobe.

Navigate to the sites section, go to Campaigns > We.Retail > Master Area and create a new of type Campaign. Feel free to fill in the properties of this page as you like.

When that’s done, click on your newly created campaign, click the Create button again, and create another page, only this time: use the Adobe Campaign Email (AC 6.1) template. (Don’t worry, this works for AC 7 too)

Creating the email

If you open your page, you are provided with a template that has been created by Adobe to help you create your first email template.

Unfortunately, at the writing of this article, the template is still an old-fashioned static template, that doesn’t care for responsive grids or anything. If you have enough experience in AEM, you should still be able to create a template of your own and make it available as a template underneath your campaign pages. If you would do this, make sure that you also add all the required properties at the right places of your template. I would highly recommend looking at the nodes that exist at the current template, which can be found under /libs/mcm/campaign/templates/ac-email-61.

This article does not describe how to create this template, but if there is demand for it, I’ll write a separate blog post.

If you happen to see “Missing or invalid Adobe Campaign webservice config” message at the top of your page, you should open the properties of campaign page we created earlier. Go to the Cloud Services tab, select Adobe Campaign and the configuration you created earlier.

Upon refreshing your page, the notification bar at the top shouldn’t display the message anymore. Inside the email page, you can now start constructing the look and feel of your email. Now the interesting part starts.

Personalizing your email!

When you want to insert a specific field from your recipient stored in ACC, you can easily take an out-of-the-box “Text & Personalization” component and drag it onto your page. If you edit the component inline, you should see an Adobe Target icon appearing in the menu.

Upon clicking on this icon, you will be presented with all the fields that are available to you to start personalizing your email with data from ACC. Let’s take the first name for example.

Once you click on the Confirm button, you should see “<%= recipient.firstName %>” in the text field.

We can also add a subject line to our email. To do that, open the properties of your email template. Click on the Email tab and fill in the Subject. Note that you can also add properties here from ACC to personalize the subject line of your email.

Making the email template available in ACC

Once you did that, we need to approve the usage of this email template, so we can use it in ACC for our campaigns.

Select the “Approve for Adobe Campaign” workflow model and fill in a title of your choice.

After this, you should see a blue banner on the top of your page with the options “Complete” and “Step back”. If you don’t see it, try refreshing your page and it should be there. Click on “Complete” and then “Ok”. Click on “Complete” again and select “Newsletter approval” and click “Ok”. Your page should refresh and a blue banner with “STATUS Approved.” After this is done, start another workflow, but this time, make sure to take “Publish to Adobe Campaign”. This is only one step. After, this, you should see a blue banner with the text “STATUS Being edited (XXXXX)”. That XXXXX is something that we need to remember for later.

If you see that you get errors, check if the replication to your publish instance is working fine and check your error.log file to see if something else might be wrong.

Creating your campaign

Creating an email delivery

So now we have a template we can use in ACC for sending our mails, we can create a campaign to use that template to send mails to our recipients.

The first step in achieving our goal is to create a delivery. To create a delivery, go in your ACC console client to Campaign management > Deliveries and there you should see an “Email delivery with AEM content”, with the status “Being edited”. Click on it and verify that the same code is there as the code you see in AEM (in my case it is DM1870). Double click to edit it.

If you don’t see anything yet in your HTML content, click “Refresh content” and it should fetch the HTML from your AEM instance.

If something goes wrong with fetching the HTML of the email template, go to the Properties at the top of the screen, select Advanced and see if the “AEM account” points to the account that you’ve created.

If you want to see what your email would like if it is sent to a recipient, click on the Preview button at the bottom, click on “Test personalization” > “Recipient” and select a recipient. If you don’t have any recipient yet, you can create one under Profiles and Targets > Recipients.

Sending the email

We could now create a complete email delivery with a workflow and everything, but to keep this simple and to the point, we are going to select a recipient and send our mail. At the top, click on “To”. In the Main target tab, click on Add next to Delivery target population. Select “A recipient” and click Next. Select a recipient you want to send the mail to and click Finish. Click Ok to close. Next, click on “Send” at the top of the screen, select “Deliver as soon as possible”, “Analyze”, “Confirm delivery” and finally Yes.

Congratulations, you did it!

If you’re stuck with something, you can always reach me by email:

CONTACTMain office
Klaverbladstraat 7a b5,
3560 Lummen - BE
YOUNG & HIP?Use our social links
You are also able to reach
us through our social media channels.
JOBSWant to be a Joker?
Visit our careers page
for open job vacancies.
ContactMain office
Klaverbladstraat 7a b5, 3560 Lummen - BE
YOUNG & HIP?Use our Social links
You are also able to reach us through our social media channels.