JSSP way: Creating real time Recipients in AC from AEM

Adobe Campaign yields solutions that let you personalize and deliver campaigns across all of your online and offline channels. Adobe Experience Manager leading digital experience management solution that helps the business deliver compelling content across experiences. Adobe provides integration points among these tools to provide a very specific targetted experience that typically includes managing content (email or web) in AEM and synchronizing them to AC where the email content is personalized and delivered to target audience at the desired time. Check AEM to Campaign v6 for related details. This blog post, however, provides some insight into another use case where User Accounts are created on AEM hosted web page which in turn triggers simultaneous Recipient profile creation in AC in real time using dynamic javascript templates, in short, JSSP.

The solution involves making a POST request to JSSP web service hosted on AC from AEM environment with data being passed as Request parameters or JSON and using AEM cloud configuration for authenticating the request.


Thus, the solution implementation involves following steps:

  1. Creating JSSP web service to handle POST request
  2. Configuring AEM environment using Cloud configuration
  3. Calling the web service from AEM

Creating JSSP web service to handle POST request

Adobe Campaign provides functionality to host JSSP scripts within AC where one can directly perform CRUD operations on AC database and render response in the desired format which could be a string or rich text or even a complex JSON. The JSSP hosted on the server can be accessed using its public URL which is automatically generated whenever we create a JSSP page within AC.

For example, assume we create a jssp page as mentioned in below screenshot with “cus” is the namespace and JSSP named as “acCreateCustomer.jssp”. We can access this web service using below URL:


Below code that can help you create recipient record once POST request is received from AEM:

One must add safeguards to avoid anonymous access to JSSP service otherwise it will open vulnerabilities.  If you carefully look at above code there are statements that can:

  • Validate user (avoid anonymous access)
  • Only POST calls as permitted
  • Validating recipient parameters prior inserting the record
  • Restricting recipient records with same email address
  • Specifying valid recipient’s folder

Configuring AEM environment using Cloud configuration

Once we set up our JSSP service, we must establish the link between both solutions so that they can communicate. This is possible by configuring AEM Cloud services which can be accessed through

AEM logo> Tools icon > Deployment > Cloud Services


AEM_cloud_services_2API End Point is Adobe Campaign instance URL.

Check out Connecting AEM to Adobe Campaign for more details.

Apart from this, make sure your AEM environment IP addresses (both author and publish instances) are whitelisted in adobe campaign.


Calling the web service from AEM

Once we are able to setup cloud configuration, the last piece is calling our JSSP from AEM environment. For this, a simple servlet is required that using GenericCampaignConnector to connect AC environment followed by calling postGeneric() method to send POST request from AEM to AC.

This is one use case where we utilize AC’s dynamic javascript pages as used to integrate AC and AEM for creating recipients.

We can think to use this solution for sending GET and POST requests to AC using other web technologies 🙂