We have published before how Adobe I/O can polish some of the rough edges of Adobe Experience Cloud solutions. This article explains in more detail a specific example using Adobe I/O Runtime.
These days, personalisation is key to retaining consumers’ attention, and the best attention requires top-notch content for keeping consumers entertained.
The use case covered by this article is to leverage content recommendations in email via Adobe Target and Adobe I/O Runtime in Adobe Campaign. The types of recommendations include scenarios such as most viewed, most popular, best rated, or best seller.
- In the food industry, it could be recommendations of popular recipes
- In the insurance industry, it could be add-on products based on existing product ownership type or similar
- In the retail industry, it could be best seller or best rated
- In the travel industry, it could be most popular destinations
These scenarios use consumer preferences to narrow down the contents to display, and they do not require the customer identifier to be executed.
As a result, everyone with the same preferences will receive the same recommendations. This point is important for the realisation of this use case.
Adobe Target Recommendations implementation on the website tracks visitor engagement and captures the contents that are viewed. A recommendations activity within Target can be set up to return contents based on algorithms such as “Popularity — most viewed,” “Popularity — best rated,” or “Popularity — best seller.”
Adobe Target can return content information such as images and click-thought URLs for a given piece of content. Other information such as price or star rating could be either known by Adobe Target or available via a Product Information Management solution.
Adobe Target requires the ability to filter contents based on classifications / tags related to consumer preferences
Because preferences aren’t very volatile between the time of sending and opening an email, the content recommendations can be made just before sending the emails (as opposed when opening an email). It also brings advantages to:
- Display a piece of content with enriched information such as price, discount, rating, or extended CTAs that are not possible to realise while opening an email (image-based recommendation only)
- Being able to send emails to most valuable people during flash sales with the latest prices and discounts information
Finally, you need to have an understanding of Adobe Target API.
The following diagram shows the products in play to realise the use case.
The main systems are the following:
- Adobe Campaign: Multi-channel marketing solution
- Adobe Target: Adobe experience optimization solution
- Adobe I/O Runtime: Adobe serverless solution
- PIM: Customer Product Information Management solution (depends on customer)
While the list of interfaces are:
- 01 — Get Content Recommendations: Main interface responsible to get the recommendations from Adobe Target back to Adobe Campaign
- 02 — batchmBox: Standard Adobe Target recommendation API
- 03 — Get Product Information: Depending of the deployment of Adobe Target and your solution, it may be required to get product information from the PIM solution prior returning information to Adobe Campaign
The use case requires an Adobe I/O Runtime endpoint that invokes Adobe Target API and returns a series of content recommendations to show in email or other channels.
The user case consists of three elements:
Adobe Target Activity Definition: Each Adobe Target activity is configured in Adobe Campaign in a new custom resource “Target Activity Definition,” the metadata of Target activity are used to define it in Adobe Campaign, information such such as Target instance, property, activity name, input parameters, and returned field names. Such information is provided by the implementer of the Target activity.
Adobe I/O Runtime: An end-point that does the following:
- Call Adobe Target API
- Transform Target JSON to a ready-to-use file for Adobe Campaign to consume
Workflow: This workflow does the following:
- Get a list of profiles
- Get the Activity Definition
- Call the new endpoint that produces a CSV flat file of content recommendations to show
- Merge the first three recommendations returned by Adobe Target to the targeted profile to be used in the email within that Target data
- The workflow looks like below and more detail will be given further down.
Adobe Campaign configuration
As mentioned previously, Adobe Target activities are configured within Adobe Campaign within a new entity “Target Affinity Definition” allowing to describe Adobe Target API as metadata.
The definition of the activity is a direct one-to-one mapping with Adobe Target API JSON.
Adobe Target Input Parameters
Adobe Target API POST Configuration
We will use a sample of Adobe Target API to explain the input parameters related to the configuration of Target activity in Adobe Campaign. Such information will be provided by Adobe Target team.
Adobe Target API POST: https://[[client_tenant]].tt.omtrdc.net/rest/v2/batchmbox?client=[[client_tenant]]&sessionId=[[Randome_SessionId]]
The picture below provides the mapping between Adobe Target URL and the fields in Adobe Campaign.
Now that we’ve got the URL mapping done, it’s time to define the URL Request body mapping.
Below is a sample of the JSON body of the Adobe Target request.
The picture below provides the mapping between Adobe Target JSON body and the fields in Adobe Campaign.
These parameters are specific per activity and are used to filter out the content in Adobe Target or other means. Parameters represent for instance consumers preferences such as diet preference or consumer conditions such as skin type (dry / oily / neutral).
The picture below provides the mapping between Adobe Target JSON input parameters and the fields in Adobe Campaign. Sample is taken from the food industry.
Adobe Target output parameters
We will use a sample of Adobe Target API to explain the input parameters related to the configuration of Target activity in Adobe Campaign.
The picture below provides the mapping between Adobe Target JSON output and the fields in Adobe Campaign.
The list of fields expected to be provided are the following:
- content — mBox Response Array: Name of the array in the JSON representing the list of returned contents returned. This field should always be present in the JSON returned by Adobe Target
- contentName_x — Content Display Name: First part of the field representing the content display name. This field should always be present in the JSON returned by Adobe Target
- contentURL_x — Content Relative URL: First part of the field representing the relative URL associated to the content, it is important that the URL being relative to the website domain. If the URL is a full URL, it will be stripped out from its website part to be made relative, (required for tracked links in Adobe Campaign). This field should always be present in the JSON returned by Adobe Target
- contentImage_x — Content Image URL: First part of the field representing the full image URL. This field should always be present in the JSON returned by Adobe Target
Depending of the use case, you would have the following fields available to you to be used in an email:
- Content Short Description: First part of the field representing a short description (plain text only) of a content
- Content Discount: First part of the field representing a discount of a content
- Content Price: First part of the field representing a price (including currency) of a content
- Content CTA Text: First part of the field representing the text for a 2nd CTA for a content, such as Download, Add to basket
- Content CTA Relative URL: First part of the field representing the relative URL for a 2nd CTA for a content, such as Download, Add to basket
- Content Time: First part of the field representing a star rating of a content
- Content Difficulty: First part of the field representing a difficulty of a content, it could be a recipe difficulty to realise or an event difficulty (walk, trekking, etc…)
- Content Rating: First part of the field representing a time / duration of a content, it could be a recipe preparation time or an event duration (walk, trekking, etc…)
Adobe I/O Runtime
This part describes the Adobe I/O Runtime endpoint that is deployed for this use case.
As a reminder, the endpoint is responsible to:
- Get all the input and output parameters set in the “Target Activity Definition”
- Call Adobe Target API to get the content recommendations
- Create a CSV file of that is then returned to Adobe Campaign
Invoking the endpoint from a browser results to download a CSV file.
The Adobe I/O Runtime endpoint has the following structure:
As you can see, the endpoint is taking all the information from the “Target Activity Definition” record as query string.
Input parameters for the Target activity are also passed as input parameters, up to 10, If any format are required, it should be done in Adobe Campaign
It returns 11 fields in the following order:
These three fields are expected to be always returned by Adobe Target:
- Content Display Name: This is the name of the content as seen on the web / email
- Content Relative URL: Relative click URL of the content. For tracked link in ACS, links should be relative, the sender domain is therefore removed from it
- Content Image URL: Fully qualified URL of the content image
The following fields are optionally returned by Target and they may make sense depending on the use case.
- Content Short Description: Short description as plain text for a piece of content, presentaiton layer is left to the calling system
- Content Price: Price (including currency) of a piece of content
- Content Discount: Discount applicable of a piece of content
- CTA Text: Text of the extra action that could be done directly from the email: it could be download, add to basket
- CTA URL: Relative URL of the action that could be done directly from the email: it could be download, add to basket
- Time: Time allocated to a piece of content. For instance, a duration for a recipe or the duration of a journey or event
- Difficulty: Difficulty associated to a piece of content, for instance difficult to prepare a recipe, difficulty of an event
- Rating: Rating of a piece of content collected by rating systems such as Bazaarvoice,
The Node.js function has seven steps.
- It requires two libraries: “request” and “queryString”
- It gets the query string parameters from the request and sets them in local variables
- It builds Adobe Target body request
4. It builds Adobe Target API request
5. It invokes Adobe Target API and builds a file out of its output
6. The result is a CSV file with the following structure
7. Invoking the endpoint via a browser downloads a file
You are now ready to create your workflow Adobe Campaign workflow.
Adobe Campaign workflow
The workflow will use the new endpoint and the Target Activity Definition to enrich the targeted profiles with the content recommendations related to their preferences.
The following picture provides the steps of the workflow.
Step 1: Get Profiles
This step will be specific to each use case from a filtering point of view, but it has a common purpose that the targeted profiles should have the same preferences that will be used by Adobe Target to recommend contents.
For instance, it should return profiles with the same diet preference or the same skin type or the same clothing style.
The Additional Data to provide are as per the picture below.
Step 2: Get Target Activity Definition
This step is retrieving the activity definition set up in “Adobe Campaign — Configuration” section.
- Filter criteria: The filter criteria proposed at minimum should be:
2. Additional data: A series of additional data are set and are all mandatory, but some of them should be adapted to match the expected input parameters for the future request
Step 3: Build Query String
This step is taking the previous additional data to build the future query string to be passed to the endpoint.
The query string is set as additional data and since additional data are limited to 255 characters, it may be required to modify them by adding a new field.
All the fields defined in the Additional Data of step 2 are required to be present uniquely in the query string fields.
Step 4: Get Content Recommendations
This step is loading a file via a HTTPS request to an Adobe I/O Runtime endpoint doing the following:
- Build Adobe Target request using the query string information
- Call Adobe Target API
- Produce a file with content information to display and return the content information declared in the “(Target) Content” fields
- If a piece of information is not provided by Adobe Target, an empty value is provided for this information:
It then returns the file back to Adobe Campaign and is then loaded in the next activity.
Step 5: Load File
This step is loading the file returned by Adobe I/O Runtime endpoint from Step 4.
The file structure is fixed and is composed of a series of recommendations with 11 fields each. Each recommendation is able to show the following information:
- contentDisplayNameField: Display name of the first piece of content
- contentRelativeUrlField: Relative click-through URL of the first piece of content
- contentImageUrlField: Full image URL of the first piece of content
- contentShortDescriptionField: Short description (plain text on a single line) of the first piece of content
- contentPriceField: Price of the first piece of content
- contentDiscountField: Discount applicable of the first piece of content
- contentCtaTextField: Text of a second action of the first piece of content (Download, Add to Basket, View video…)
- contentCtaRelativeUrlField: Relative click-through URL of a second action of the 1st piece of content (Download, Add to Basket, View video…)
- contentTimeField: Time related to the first piece of content (preparation time, event expected duration, …), expected to be plain text
- contentDifficultyField: Difficulty related to the first piece of content (event difficulty, preparation difficulty, ….), expected to be plain text
- contentRatingField: Star rating of the first piece of content
It is up to you to decide how many recommendations you would need to return. In email, best practice would be to show three recommendations.
Step 6: Add Dummy Reconciliation Key
This step is adding the same dummy reconciliation key to be able to join the contents to the target profile.
Step 7: Add Three Content Recommendations to Targeted Profiles
This step is taking the first three recommendations and is adding them to the targeted profiles.
Step 8: Add Delivery
This step relates to add a single or recurring delivery in the workflow that uses the fields added in the target data in Step 7 to display the contents in the email.
There are some changes to make in the content blocks to use the new generic fields:
Link 1<a href="https://www.customersite/
) %>">Click Here</a>
Link 2<a href=https://www.customersite /
) %>">Click Here</a>
Link 3<a href="https://www. customersite /
) %>">Click Here</a>
Image 1<img src="<%= context.targetData.contentImage_1
Image 2<img src="<%= context.targetData.contentImage_2
Image 3<img src="<%= context.targetData.contentImage_3
Title 1<%= context.targetData.contentDisplayName_1
Title 2<%= context.targetData.contentDisplayName_3
Title 3<%= context.targetData.contentDisplayName_3
A final remark
One more remark, as sort of a disclaimer: The intent of this article has been to show the integration capabilities opened up by the combination of Adobe I/O Runtime with Adobe Campaign and Adobe Target. A final solution will depend on the deployment of Adobe Target and Adobe Campaign within the customer applications landscape.
Adobe I/O Runtime can substantially increase the functionality of Adobe Campaign Standard workflows with enhanced personalisation.